Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified effects/spectralArrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified effects/spectralFireball.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified hero_modern/body/hands/gnoll_bow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_bow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_crossbow_hit_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_crossbow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_crossbow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_heavy_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_heavy_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_none_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_none_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_spear_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_spear_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_staff_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_staff_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_sword_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/gnoll_sword_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_bow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_bow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_crossbow_hit_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_crossbow_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_crossbow_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_heavy_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_heavy_right.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_none_left.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added hero_modern/body/hands/lich_none_right.png
Binary file added hero_modern/body/hands/lich_spear_left.png
Binary file added hero_modern/body/hands/lich_spear_right.png
Binary file added hero_modern/body/hands/lich_staff_left.png
Binary file added hero_modern/body/hands/lich_staff_right.png
Binary file added hero_modern/body/hands/lich_sword_left.png
Binary file added hero_modern/body/hands/lich_sword_right.png
Binary file added hero_modern/body/hands/man_bow_left.png
Binary file added hero_modern/body/hands/man_bow_right.png
Binary file added hero_modern/body/hands/man_crossbow_hit_right.png
Binary file added hero_modern/body/hands/man_crossbow_left.png
Binary file added hero_modern/body/hands/man_crossbow_right.png
Binary file added hero_modern/body/hands/man_heavy_left.png
Binary file added hero_modern/body/hands/man_heavy_right.png
Binary file added hero_modern/body/hands/man_none_left.png
Binary file added hero_modern/body/hands/man_none_right.png
Binary file added hero_modern/body/hands/man_spear_left.png
Binary file added hero_modern/body/hands/man_spear_right.png
Binary file added hero_modern/body/hands/man_staff_left.png
Binary file added hero_modern/body/hands/man_staff_right.png
Binary file added hero_modern/body/hands/man_sword_left.png
Binary file added hero_modern/body/hands/man_sword_right.png
Binary file added hero_modern/body/hands/statue_bow_left.png
Binary file added hero_modern/body/hands/statue_bow_right.png
Binary file added hero_modern/body/hands/statue_crossbow_hit_right.png
Binary file added hero_modern/body/hands/statue_crossbow_left.png
Binary file added hero_modern/body/hands/statue_crossbow_right.png
Binary file added hero_modern/body/hands/statue_heavy_left.png
Binary file added hero_modern/body/hands/statue_heavy_right.png
Binary file added hero_modern/body/hands/statue_none_left.png
Binary file added hero_modern/body/hands/statue_none_right.png
Binary file added hero_modern/body/hands/statue_spear_left.png
Binary file added hero_modern/body/hands/statue_spear_right.png
Binary file added hero_modern/body/hands/statue_staff_left.png
Binary file added hero_modern/body/hands/statue_staff_right.png
Binary file added hero_modern/body/hands/statue_sword_left.png
Binary file added hero_modern/body/hands/statue_sword_right.png
Binary file added hero_modern/body/hands/warlock_bow_left.png
Binary file added hero_modern/body/hands/warlock_bow_right.png
Binary file added hero_modern/body/hands/warlock_crossbow_left.png
Binary file added hero_modern/body/hands/warlock_crossbow_right.png
Binary file added hero_modern/body/hands/warlock_heavy_left.png
Binary file added hero_modern/body/hands/warlock_heavy_right.png
Binary file added hero_modern/body/hands/warlock_none_left.png
Binary file added hero_modern/body/hands/warlock_none_right.png
Binary file added hero_modern/body/hands/warlock_spear_left.png
Binary file added hero_modern/body/hands/warlock_spear_right.png
Binary file added hero_modern/body/hands/warlock_staff_left.png
Binary file added hero_modern/body/hands/warlock_staff_right.png
Binary file added hero_modern/body/hands/warlock_sword_left.png
Binary file added hero_modern/body/hands/warlock_sword_right.png
Binary file added hero_modern/body/hands/woman_bow_left.png
Binary file added hero_modern/body/hands/woman_bow_right.png
Binary file added hero_modern/body/hands/woman_crossbow_hit_right.png
Binary file added hero_modern/body/hands/woman_crossbow_left.png
Binary file added hero_modern/body/hands/woman_crossbow_right.png
Binary file added hero_modern/body/hands/woman_heavy_left.png
Binary file added hero_modern/body/hands/woman_heavy_right.png
Binary file added hero_modern/body/hands/woman_none_left.png
Binary file added hero_modern/body/hands/woman_none_right.png
Binary file added hero_modern/body/hands/woman_spear_left.png
Binary file added hero_modern/body/hands/woman_spear_right.png
Binary file added hero_modern/body/hands/woman_staff_left.png
Binary file added hero_modern/body/hands/woman_staff_right.png
Binary file added hero_modern/body/hands/woman_sword_left.png
Binary file added hero_modern/body/hands/woman_sword_right.png
Binary file modified hero_modern/items/Board_right.png
Binary file modified hero_modern/items/Dagger_left.png
Binary file modified hero_modern/items/Dagger_right.png
Binary file modified hero_modern/items/GoldenSword_left.png
Binary file modified hero_modern/items/GoldenSword_right.png
Binary file modified hero_modern/items/Knuckles_left.png
Binary file modified hero_modern/items/Knuckles_right.png
Binary file modified hero_modern/items/Kusarigama_left.png
Binary file modified hero_modern/items/Kusarigama_right.png
Binary file modified hero_modern/items/Mace_left.png
Binary file modified hero_modern/items/Mace_right.png
Binary file modified hero_modern/items/NecroticShield_left.png
Binary file modified hero_modern/items/NecroticShield_right.png
Binary file modified hero_modern/items/OldShield_right.png
Binary file modified hero_modern/items/Pickaxe_left.png
Binary file modified hero_modern/items/Pickaxe_right.png
Binary file modified hero_modern/items/RoyalShield_left.png
Binary file modified hero_modern/items/RoyalShield_right.png
Binary file modified hero_modern/items/SacrificialSword_left.png
Binary file modified hero_modern/items/SacrificialSword_right.png
Binary file modified hero_modern/items/StrongShield_left.png
Binary file modified hero_modern/items/StrongShield_right.png
Binary file modified hero_modern/items/Sword_left.png
Binary file modified hero_modern/items/TestWeapon1_left.png
Binary file modified hero_modern/items/TestWeapon1_right.png
Binary file modified hero_modern/items/ToughShield_left.png
Binary file modified hero_modern/items/ToughShield_right.png
Binary file modified hero_modern/items/WoodenShield_left.png
Binary file modified hero_modern/items/WoodenShield_right.png
Binary file modified items/materials.png
Binary file modified items/scrolls.png
Binary file modified items/shields.png
Binary file modified items/special.png
6 changes: 4 additions & 2 deletions levelsDesc/Bestiary.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@
"nightmare9":{"ConjoinedCorpse":2, "TheRejected":1, "OmnipotentEye":3, "MazeShadow":5}
},
"PredesignedLevel":{
"desert":{"Mummy":1, "SandWorm":0.01, "CactusMimic":0.1, "Husk":1, "Skeleton":0.5}/*,
"ruinedCastle":{"Rat":5, "Possessed":0.3, "UndeadGuard":0.8, "Statue":0.05, "Skeleton":0.5}*/
"desert":{"Mummy":1, "SandWorm":0.01, "CactusMimic":0.1, "Husk":1, "Skeleton":0.5}
},
"TestLevel":{
"any":{"BlackRat":1}
},
"ShadowLordLevel":{
"any":{"ShadowLord":1}
},
"Feelings":{
"Chance":0.2,
"CHASM":{"AirElemental":1},
Expand Down
4 changes: 2 additions & 2 deletions levelsDesc/Fortune.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"y":3
},
{
"kind":"BlackCatNPC",
"kind":"BlackCat",
"x":3,
"y":4
}],
Expand All @@ -102,4 +102,4 @@
"tiles_roof_base":"tiles_town_inside.png",
"water":"water0.png",
"width":12
}
}
6 changes: 1 addition & 5 deletions levelsDesc/House1.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,7 @@
1, 4, 4, 4, 4, 7, 4, 4, 4, 4, 4, 1,
1, 35, 35, 35, 35, 4, 35, 35, 35, 35, 35, 1],
"mobs":[
{
"kind":"TownsfolkLootNPC",
"x":5,
"y":3
}],
],
"multiexit":[],
"roofBaseTileVar":[
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
Expand Down
26 changes: 25 additions & 1 deletion levelsDesc/Shop.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,31 @@
{
"kind":"Shopkeeper",
"x":7,
"y":4
"y":4,
"items": [
{
"kind": "TomeOfKnowledge",
"identified": true
},
{
"kind": "Keyring"
},
{
"kind": "ScrollHolder"
},
{
"kind": "PotionBelt"
},
{
"kind": "SeedPouch"
},
{
"kind": "Quiver"
},
{
"kind": "WandHolster"
}
]
}],
"multiexit":[],
"roofDecoTileVar":[
Expand Down
Binary file modified mobs/angry_nimbus.png
Binary file modified mobs/ceaseless_void.png
Binary file modified mobs/cocker_spaniel.png
Binary file modified mobs/conjoined_corpse.png
Binary file modified mobs/dark_elemental.png
Binary file modified mobs/dark_mage.png
Binary file modified mobs/earth_mage.png
Binary file modified mobs/european_shorthair.png
Binary file modified mobs/fairy.png
Binary file modified mobs/fairy_overlord.png
Binary file modified mobs/fire_mage.png
Binary file modified mobs/ice_mage.png
Binary file modified mobs/light_elemental.png
Binary file modified mobs/light_mage.png
Binary file modified mobs/omnipotent_eye.png
Binary file modified mobs/split_corpse.png
Binary file modified mobs/the_rejected.png
Binary file modified mobs/undead_spider_mutant.png
Binary file modified mobs/water_mage.png
5 changes: 5 additions & 0 deletions pack.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash

git archive -o Remixed_Additions.zip --prefix='Remixed Additions/' HEAD
cp -f Remixed_Additions.zip ../NYRDS/common

5 changes: 5 additions & 0 deletions scripts/actors/Desert.lua
Original file line number Diff line number Diff line change
Expand Up @@ -60,30 +60,35 @@ return actor.init({
if chance == desertMobChance[desertMobs[1]] then
mob = RPD.MobFactory:mobByName(desertMobs[1])
RPD.setAi(mob, mobAi[math.random(1,#mobAi)])
mob:setPos(pos)
level:spawnMob(mob)
RPD.glogp(desertMobs[1].." has spawned at "..tostring(pos)..".")
end
if chance == desertMobChance[desertMobs[2]] then
mob = RPD.MobFactory:mobByName(desertMobs[2])
RPD.setAi(mob, mobAi[math.random(1,#mobAi)])
mob:setPos(pos)
level:spawnMob(mob)
RPD.glogp(desertMobs[2].." has spawned at "..tostring(pos)..".")
end
if chance == desertMobChance[desertMobs[3]] then
mob = RPD.MobFactory:mobByName(desertMobs[3])
RPD.setAi(mob, mobAi[math.random(1,#mobAi)])
mob:setPos(pos)
level:spawnMob(mob)
RPD.glogp(desertMobs[3].." has spawned at "..tostring(pos)..".")
end
if chance == desertMobChance[desertMobs[4]] then
mob = RPD.MobFactory:mobByName(desertMobs[4])
RPD.setAi(mob, mobAi[math.random(1,#mobAi)])
mob:setPos(pos)
level:spawnMob(mob)
RPD.glogp(desertMobs[4].." has spawned at "..tostring(pos)..".")
end
if chance == desertMobChance[desertMobs[5]] then
mob = RPD.MobFactory:mobByName(desertMobs[5])
RPD.setAi(mob, mobAi[math.random(1,#mobAi)])
mob:setPos(pos)
level:spawnMob(mob)
RPD.glogp(desertMobs[5].." has spawned at "..tostring(pos)..".")
end
Expand Down
6 changes: 3 additions & 3 deletions scripts/buffs/DmgImmune.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ local immuneAbnormal = {"Roots","Paralysis","Vertigo","Invisibility","Levitation
return buff.init{
desc = function ()
return {
icon = 64,
icon = -1,
name = "DmgImmune_Name",
info = "DmgImmune_Info",
}
end,

defenceProc = function(chr, buff, enemy, dmg)
return chr:damage(0, enemy)
defenceProc = function(self, buff, enemy, damage)
return 0
end,

immunities = function(self, buff)
Expand Down
13 changes: 6 additions & 7 deletions scripts/buffs/NecroShieldLeft.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
local RPD = require "scripts/lib/commonClasses"
local buff = require "scripts/lib/buff"
local shields = require "scripts/lib/strongerShields"
local mob = require "scripts/lib/mob"

return buff.init{
icon = function(self, buff)
Expand Down Expand Up @@ -57,17 +56,17 @@ return buff.init{
if level:cellValid(cell) then
local mob
if math.random(1,100) <= 7 then
mob = chrKind
mob = RPD.MobFactory:mobByName(chrKind)
else
mob = RPD.MobFactory:mobByName("Skeleton")
end
if mob:getEntityKind() == "Skeleton" then
if lvl <= 0 then
mob:ht(25)
else
mob:ht(25*lvl)
end
mob:hp(mob:ht()-(damage/2))
mob:ht(25*lvl)
end
mob:hp(mob:ht()-(damage/2))
else
mob:ht(enemy:ht())
mob:hp(enemy:hp()-(damage/2))
Expand All @@ -85,7 +84,7 @@ return buff.init{
return damage
end,

attackProc = function(chr, buff, enemy, dmg)
attackProc = function(self, buff, enemy, dmg)
local chr = buff.target
local chrKind = enemy:getEntityKind()
if chr:name() == "you" then
Expand All @@ -95,7 +94,7 @@ return buff.init{
if enemy:canBePet() and chrKind ~= "MirrorImage" then
if dmg >= enemy:hp() then
if math.random(1,100) <= 8 then
mob:makePet(enemy, chr)
enemy:makePet(chr)
enemy:heal(enemy:ht(), chr)
RPD.setAi(enemy, "Wandering")
return 0
Expand Down
2 changes: 1 addition & 1 deletion scripts/items/ScrollOfWipeOut.lua
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ return item.init{
end,

execute = function(self, item, hero, action)
local immuneMobs = {MirrorImage=true,Shopkeeper=true,ImpShopkeeper=true,TempMoney=true,ShadyNPC=true,BishopNPC=true,BlackCat=true,CockerSpanielNPC=true,Yog=true,YogsEye=true,YogsBrain=true,YogsHeart=true,YogsTeeth=true,RottingFist=true,BurningFist=true}
local immuneMobs = {MirrorImage=true,Shopkeeper=true,ImpShopkeeper=true,TempMoney=true,ShadyNPC=true,BishopNPC=true,BlackCat=true,CockerSpanielNPC=true,Yog=true,YogsEye=true,YogsBrain=true,YogsHeart=true,YogsTeeth=true,RottingFist=true,BurningFist=true,WarriorGhost=true}
local resistMobs = {Goo=true,SpiderQueen=true,Lich=true,Tengu=true,IceGuardianCore=true,IceGuardian=true,DM300=true,King=true,ShadowLord=true}
local healMobs = {BoneDragon=true,GhostWarrior=true,GhostAssassin=true,GhostArcher=true,GhostMage=true}
if action == RPD.Actions.read then
Expand Down
2 changes: 1 addition & 1 deletion scripts/lib/revampedCommonClasses.lua
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ local RPD = {
Dungeon = Dungeon,

System = {
Input = luajava.bindClass("com.nyrds.platform.Input")
Input = luajava.bindClass("com.nyrds.platform.app.Input")
},

Slots = {
Expand Down
5 changes: 3 additions & 2 deletions scripts/mobs/ArcherGhost.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ return mob.init({
die = function(self, cause)
local level = RPD.Dungeon.level
local cellPos = RPD.getXy(self)
local selfPos = self:getPos()
local function deathDmg(cell)
local target = RPD.Actor:findChar(cell)
if target then
Expand All @@ -42,10 +43,10 @@ return mob.init({
local ranPots = math.random(1,#Potions)
if Potions[ranPots] == "ManaPotion" or Potions[ranPots] == "PotionOfExperience" or Potions[ranPots] == "PotionOfStrength" or Potions[ranPot] == "PotionOfMight" then
local item = RPD.createItem(Potions[ranPots], {quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
else
local item = RPD.createItem(Potions[ranPots], {level=PotionAmount*2,quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
end
ScrollAmount = math.random(2,6)
local ranScr = math.random(1,#Scrolls-1)
Expand Down
5 changes: 3 additions & 2 deletions scripts/mobs/AssassinGhost.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ return mob.init({
die = function(self, cause)
local level = RPD.Dungeon.level
local cellPos = RPD.getXy(self)
local selfPos = self:getPos()
local function deathDmg(cell)
local target = RPD.Actor:findChar(cell)
if target then
Expand All @@ -42,10 +43,10 @@ return mob.init({
local ranPots = math.random(1,#Potions)
if Potions[ranPots] == "ManaPotion" or Potions[ranPots] == "PotionOfExperience" or Potions[ranPots] == "PotionOfStrength" or Potions[ranPot] == "PotionOfMight" then
local item = RPD.createItem(Potions[ranPots], {quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
else
local item = RPD.createItem(Potions[ranPots], {level=PotionAmount*2,quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
end
ScrollAmount = math.random(2,6)
local ranScr = math.random(1,#Scrolls-1)
Expand Down
31 changes: 18 additions & 13 deletions scripts/mobs/BoneDragon.lua
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,18 @@ local ItemAmount
local tombPortal = {kind="PortalGateSender",target={levelId="tomb",x=6,y=1}}
local townPortal = {kind="PortalGateSender",target={levelId="snowTown",x=12,y=28}}
local desertTownPortal = {kind="PortalGateSender",target={levelId="home",x=9,y=3}}
local sign = {kind="Sign",text=RPD.textById("TombPortal_Directions"):format(RPD.textById("tombMap_Name"),RPD.textById("snowTownMap_Name"),"Unknown for now"}
local sign = {kind="Sign",
text=RPD.textById("TombPortal_Directions"):format(RPD.textById("tombMap_Name"),RPD.textById("snowTownMap_Name"),"Unknown for now")}

return mob.init({
die = function(self, cause)
local level = RPD.Dungeon.level
local levelId = RPD.Dungeon.levelId
local cellPos = RPD.getXy(self)
local pos = self:getPos()

RPD.Actor:remove(RPD.new(RPD.Objects.Actors.ScriptedActor,"scripts/actors/Bosses/BoneDragon"))

local function deathDmg(cell)
local target = RPD.Actor:findChar(cell)
if target then
Expand All @@ -40,7 +44,8 @@ return mob.init({
RPD.affectBuff(target, RPD.Buffs.Slow, math.random(18,24))
end
end
RPD.forCellsAround(cellPos, deathDmg)

RPD.forCellsAround(pos, deathDmg)
RPD.forCellsAround(level:cell(cellPos[1]-1,cellPos[2]-1), deathDmg)
RPD.forCellsAround(level:cell(cellPos[1]+1,cellPos[2]-1), deathDmg)
RPD.forCellsAround(level:cell(cellPos[1]-1,cellPos[2]+1), deathDmg)
Expand All @@ -58,27 +63,27 @@ return mob.init({
local ranPots = math.random(1,#Potions)
if Potions[ranPots] == "ManaPotion" or Potions[ranPots] == "PotionOfExperience" or Potions[ranPots] == "PotionOfStrength" or Potions[ranPot] == "PotionOfMight" then
local item = RPD.createItem(Potions[ranPots], {quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, pos)
else
local item = RPD.createItem(Potions[ranPots], {level=PotionAmount*2,quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, pos)
end
ScrollAmount = math.random(2,6)
local ranScr = math.random(1,#Scrolls-2)
level:drop(RPD.item(Scrolls[ranScr], ScrollAmount), self:getPos())
level:drop(RPD.item(Scrolls[ranScr], ScrollAmount), pos)
local ranRin = math.random(1,#Rings-1)
level:drop(RPD.createItem(Rings[ranRin], {level=ScrollAmount*2}), self:getPos())
level:drop(RPD.createItem(Rings[ranRin], {level=ScrollAmount*2}), pos)
if i ~= 3 then
level:drop(RPD.item(Items[2]), self:getPos())
level:drop(RPD.item(Items[2]), pos)
end
end
ItemAmount = math.random(2,28)
level:drop(RPD.item(Items[3], ItemAmount/2), self:getPos())
level:drop(RPD.item(Items[4], ItemAmount), self:getPos())
level:drop(RPD.createItem(Items[1], {level=ItemAmount}), self:getPos())
level:drop(RPD.item(Scrolls[#Scrolls]), self:getPos())
level:drop(RPD.item(Scrolls[#Scrolls-1], 5), self:getPos())
level:drop(RPD.item(Rings[#Rings]), self:getPos())
level:drop(RPD.item(Items[3], ItemAmount/2), pos)
level:drop(RPD.item(Items[4], ItemAmount), pos)
level:drop(RPD.createItem(Items[1], {level=ItemAmount}), pos)
level:drop(RPD.item(Scrolls[#Scrolls]), pos)
level:drop(RPD.item(Scrolls[#Scrolls-1], 5), pos)
level:drop(RPD.item(Rings[#Rings]), pos)
end,

defenceProc = function(self, enemy, dmg)
Expand Down
8 changes: 5 additions & 3 deletions scripts/mobs/CockerSpaniel.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ return mob.init({
hero:getSprite():showStatus(0xFF0000, RPD.textById("Str_lose"))
RPD.playSound("snd_cursed.mp3")
else
cause:damage(math.random(1,10), self)
cause:getSprite():emitter():burst(RPD.Sfx.ShadowParticle.CURSE, 6)
RPD.playSound("snd_cursed.mp3")
if cause.damage and cause.getSprite then
cause:damage(math.random(1,10), self)
cause:getSprite():emitter():burst(RPD.Sfx.ShadowParticle.CURSE, 6)
RPD.playSound("snd_cursed.mp3")
end
end
self:getSprite():emitter():burst(RPD.Sfx.ElmoParticle.FACTORY, 6)
end,
Expand Down
4 changes: 2 additions & 2 deletions scripts/mobs/ConjoinedCorpse.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ return mob.init({
local pos = self:getPos()
mob1:setPos(pos)
if self:isPet() then
mob:makePet(mob1, RPD.Dungeon.hero)
RPD.Mob:makePet(mob1, RPD.Dungeon.hero)
end
level:spawnMob(mob1)
end
if math.random(1,100) <= 75 then
local pos = self:getPos()
mob2:setPos(pos)
if self:isPet() then
mob:makePet(mob2, RPD.Dungeon.hero)
RPD.Mob:makePet(mob2, RPD.Dungeon.hero)
end
level:spawnMob(mob2)
end
Expand Down
8 changes: 5 additions & 3 deletions scripts/mobs/EuropeanShorthair.lua
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ return mob.init({
hero:getSprite():showStatus(0xFF0000, RPD.textById("Str_lose"))
RPD.playSound("snd_cursed.mp3")
else
cause:damage(math.random(1,10), self)
cause:getSprite():emitter():burst(RPD.Sfx.ShadowParticle.CURSE, 6)
RPD.playSound("snd_cursed.mp3")
if cause.damage and cause.getSprite then
cause:damage(math.random(1,10), self)
cause:getSprite():emitter():burst(RPD.Sfx.ShadowParticle.CURSE, 6)
RPD.playSound("snd_cursed.mp3")
end
end
self:getSprite():emitter():burst(RPD.Sfx.ElmoParticle.FACTORY, 6)
end,
Expand Down
2 changes: 1 addition & 1 deletion scripts/mobs/FairyOverlord.lua
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ return mob.init({
if levelId == "dreamFinal" then
level:set(level:cell(13,6), 7)
RPD.GameScene:updateMap()
RPD.createLevelObject(portal, cause:getPos())
RPD.createLevelObject(portal, cellPos)
end
-- RPD.stopMusic()
-- RPD.playSound("sound/snd_boss.mp3")
Expand Down
5 changes: 3 additions & 2 deletions scripts/mobs/MageGhost.lua
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ return mob.init({
die = function(self, cause)
local level = RPD.Dungeon.level
local cellPos = RPD.getXy(self)
local selfPos = self:getPos()
RPD.Actor:remove(RPD.new(RPD.Objects.Actors.ScriptedActor,"scripts/actors/Bosses/BoneDragon"))
local function deathDmg(cell)
local target = RPD.Actor:findChar(cell)
Expand Down Expand Up @@ -53,10 +54,10 @@ return mob.init({
local ranPots = math.random(1,#Potions)
if Potions[ranPots] == "ManaPotion" or Potions[ranPots] == "PotionOfExperience" or Potions[ranPots] == "PotionOfStrength" or Potions[ranPot] == "PotionOfMight" then
local item = RPD.createItem(Potions[ranPots], {quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
else
local item = RPD.createItem(Potions[ranPots], {level=PotionAmount*2,quanity=PotionAmount})
level:drop(item, cellPos)
level:drop(item, selfPos)
end
ScrollAmount = math.random(2,6)
local ranScr = math.random(1,#Scrolls-1)
Expand Down
Loading