Commit 55f07e43c0d8e7cc8c9132fa6034c002c03d3341
1 parent
c8c957e4
新出生的初始化
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
src/adv/AdvBlock.lua
@@ -61,6 +61,7 @@ function Block:randomEvent() | @@ -61,6 +61,7 @@ function Block:randomEvent() | ||
61 | enemy:unlock(self.event.mId) | 61 | enemy:unlock(self.event.mId) |
62 | else | 62 | else |
63 | enemy = adv.battle:addEnemy(room, self, map.mapIdx) | 63 | enemy = adv.battle:addEnemy(room, self, map.mapIdx) |
64 | + enemy:initAfter(self.event.enemy) | ||
64 | end | 65 | end |
65 | enemy:triggerPassive(Passive.BORN_ONCE) | 66 | enemy:triggerPassive(Passive.BORN_ONCE) |
66 | 67 | ||
@@ -143,6 +144,7 @@ function Block:randomEvent() | @@ -143,6 +144,7 @@ function Block:randomEvent() | ||
143 | build:unlock() | 144 | build:unlock() |
144 | else | 145 | else |
145 | build = adv.battle:addEnemy(room, self, map.mapIdx) | 146 | build = adv.battle:addEnemy(room, self, map.mapIdx) |
147 | + build:initAfter(self.event.build) | ||
146 | end | 148 | end |
147 | build:triggerPassive(Passive.BORN_ONCE) | 149 | build:triggerPassive(Passive.BORN_ONCE) |
148 | end | 150 | end |
src/adv/AdvPlayer.lua
@@ -697,7 +697,6 @@ local Build = class("Build", BaseObject) | @@ -697,7 +697,6 @@ local Build = class("Build", BaseObject) | ||
697 | function Build:ctor(battle, id, roomId, blockId, lock, build, mapIdx) | 697 | function Build:ctor(battle, id, roomId, blockId, lock, build, mapIdx) |
698 | Enemy.super.ctor(self, battle) | 698 | Enemy.super.ctor(self, battle) |
699 | self.id = id | 699 | self.id = id |
700 | - self.monsterId = monsterId --数据id | ||
701 | self.roomId = roomId | 700 | self.roomId = roomId |
702 | self.blockId = blockId | 701 | self.blockId = blockId |
703 | self.lock = lock | 702 | self.lock = lock |