blob: d910f7616aabf4e2f0178cdecd5194a2da96e241 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
extends Plate
func activate(entity : Entity, dungeon):
if entity is Player:
entity.add_action("cor_shake", [0.2])
Global.turns -= int(entity.get_top())
return
if entity is Monster:
if entity.health - 1 <= 0:
entity.alive = false
entity.add_action("cor_dies", [])
dungeon.kill_entity(entity)
else:
entity.health -= 1
entity.add_action("cor_shake", [0.2])
return
|