-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3b5aeb6
commit 6fa34a8
Showing
36 changed files
with
339 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import my | ||
|
||
|
||
def on_targeted(me, x, y, bonus): | ||
owner = my.thing_top_owner_id_get(me) | ||
if not owner: | ||
return | ||
|
||
existing_mental_load = 0 | ||
for f in my.thing_get_followers(me): | ||
existing_mental_load += my.thing_stat_int_bonus(f) | ||
|
||
for it in my.level_get_all(me, x, y): | ||
if not my.thing_is_monst(it): | ||
continue | ||
|
||
if my.thing_is_dead(it): | ||
my.thing_msg(me, f"The {my.thing_name_get(it)}'s mind is beyond your powers.") | ||
continue | ||
|
||
if my.thing_is_ethereal(it): | ||
my.thing_msg(me, f"The {my.thing_name_get(it)}'s mind evades your grasp.") | ||
continue | ||
|
||
if not my.thing_set_leader(it, owner): | ||
my.thing_msg(me, f"The {my.thing_name_get(it)} cannot be possessed.") | ||
continue | ||
|
||
roll = my.pcg_randint(1, 20) + bonus | ||
if my.thing_stat_psi_total(owner) > roll + my.thing_stat_int_bonus(it) + existing_mental_load: | ||
my.thing_msg(me, f"The {my.thing_name_get(it)}'s mind is beholden to you.") | ||
else: | ||
my.thing_msg(me, f"The {my.thing_name_get(it)} fends off your mental attack.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 9 additions & 7 deletions
16
...n/things/spells/spell_dominate_monst_D.py → ...on/things/spells/spell_dominate_monst4.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,41 @@ | ||
import my | ||
import tp | ||
import spell_dominate_monst0 | ||
|
||
|
||
def on_targeted(me, x, y): | ||
my.place_at(me, "random_monst_class_D", x, y) | ||
return spell_dominate_monst0.on_targeted(me, x, y, 3) | ||
|
||
|
||
def tp_init(name, text_long_name, text_short_name): | ||
global self | ||
self = tp.Tp(name, text_long_name, text_short_name) | ||
# begin sort marker | ||
my.gfx_targeted_projectile(self, "projectile_magical_effect") | ||
my.spell_replaces(self, "spell_dominate_monst_C") | ||
my.spell_replaces(self, "spell_dominate_monst3") | ||
my.is_loggable(self, True) | ||
my.is_spell(self, True) | ||
my.is_target_select(self, True) | ||
my.is_usable(self, True) | ||
my.range_max(self, 7) | ||
my.range_max(self, 8) | ||
my.spell_base_name(self, name) | ||
my.spell_cost(self, 8) | ||
my.text_a_or_an(self, "a") | ||
my.text_description_long(self, "Attempt to dominate a monster with your mind.") | ||
my.text_description_short(self, "Spell, dominate monst D.") | ||
my.text_description_long2(self, "+6 bonus to PSI attack rolls") | ||
my.text_description_short(self, "Spell, dominate monst IV.") | ||
my.text_description_very_short(self, "DomMonstD") | ||
my.z_depth(self, my.MAP_DEPTH_OBJ) | ||
my.z_prio(self, my.MAP_Z_PRIO_BEHIND) | ||
# end sort marker | ||
|
||
my.tile(self, tile="spell_dominate_monst_D") | ||
my.tile(self, tile="spell_dominate_monst_D_activated") | ||
my.tile(self, tile="spell_dominate_monst4") | ||
my.tile(self, tile="spell_dominate_monst4_activated") | ||
my.tp_update(self) | ||
|
||
|
||
def init(): | ||
tp_init(name="spell_dominate_monst_D", text_long_name="dominate monst D", text_short_name="dominate monst D") | ||
tp_init(name="spell_dominate_monst4", text_long_name="dominate monst IV", text_short_name="dominate monst IV") | ||
|
||
|
||
init() |
Oops, something went wrong.