Skip to content

Commit

Permalink
bug: primal rage activation python error
Browse files Browse the repository at this point in the history
  • Loading branch information
goblinhack committed Jul 13, 2023
1 parent 8f8702e commit 3367559
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
10 changes: 0 additions & 10 deletions python/things/monsters/mummy_necro.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,6 @@ def on_tick(owner, me, x, y):

for follower in followers:
if my.thing_is_dead_or_dying(follower):
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
my.topcon("XXXXXXX")
if my.thing_resurrect(follower, "arise"):
my.thing_stat_con_decr(me, 1)
my.thing_msg(me, "Arise my minion!")
Expand Down
2 changes: 1 addition & 1 deletion python/things/monsters/mummy_pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def on_you_are_declared_leader(me, x, y):

def on_you_are_declared_a_follower(me, leader, x, y):
r = my.non_pcg_randint(1, 100)
if r < 100:
if r < 80:
my.thing_polymorph(me, "snake_asp")
return
my.thing_polymorph(me, "mummy")
Expand Down
2 changes: 1 addition & 1 deletion python/things/skills/skill_primal_rage0.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def tp_init(self):
my.is_loggable(self, True)
my.is_skill(self, True)
my.is_tickable(self, True)
my.on_tick_when_activated_do(self, "mg e.on_tick_when_activated()")
my.on_tick_when_activated_do(self, "me.on_tick_when_activated()")
my.on_tick_when_deactivated_do(self, "me.on_tick_when_deactivated()")
my.on_use_do(self, "me.on_use()")
my.skill_base_name(self, "skill_primal_rage")
Expand Down
2 changes: 1 addition & 1 deletion src/py_thing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ PyObject *thing_resurrect(PyObject *obj, PyObject *args, PyObject *keywds)
Py_RETURN_FALSE;
}

IF_DEBUG { t->log("Resurrected: reason %s", reason); }
IF_DEBUG { t->log("Resurrect attempt: reason %s", reason); }
if (t->resurrect_forced()) {
Py_RETURN_FALSE;
} else {
Expand Down
8 changes: 8 additions & 0 deletions src/thing_resurrect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,11 @@ bool Thing::resurrect(void)
{
TRACE_NO_INDENT();

dbg("Resurrect attempt");
TRACE_AND_INDENT();

if (! is_able_to_be_resurrected()) {
dbg("Cannot be resurrected");
return false;
}

Expand All @@ -20,6 +24,9 @@ bool Thing::resurrect(void)
//
auto v = health_max() / 2;
if (v > 0) {
dbg("Resurrect is possible");
TRACE_AND_INDENT();

is_resurrecting = true;
tile_curr = 0;
animate();
Expand All @@ -43,6 +50,7 @@ bool Thing::resurrect(void)
//
// Must do this after turning off the dead flag, or the monster can appear as "extra dead".
//
dbg("Is being resurrected");
msg("%%fg=orange$%s rises from the grave!%%fg=reset$", text_The().c_str());
return true;
}
Expand Down

0 comments on commit 3367559

Please sign in to comment.