Making CounterBuff actually Work Counterbuff as it is now can't trigger any effect that attacks the monster that you countered, because it fails to pass it's targeting information on to the spell it triggers -- so type="monster" fails due to lack of a monster in the targets. BUT! Counterbuff goes off entirely before the counterattack itself, so you CAN use it to give yourself a one-attack buff that itself has a targetHitEffectBuff that will totally go off on the correct monster. Thusly: Code: (IN SPELLDB) <spell name="Sword Poetry Attack!" type="target"> <effect type="damage" asphyxiative="8" asphyxiativeF=".25" primaryScale="2"/> <anim sprite="sprites/sfx/fleshbore/fleshbore" frames="7" firstframe="0" sfx="fleshbore" framerate="100" centerEffect="0"/> </spell> <spell name="Sword Poetry" type="self"> <buff attacks="1" icon="skills/warrior/swordplay3_64.png" smallicon="skills/warrior/swordplay3_32.png"> <targetHitEffectBuff percentage="100" name="Sword Poetry Attack!"/> </buff> </spell> (IN SKILLDB) <ability name="Sword Poet Laureate" icon="skills/warrior/swordplay3_64.png" skill="0" level="5"> <counterBuff percentage="40" name="Sword Poetry" /> </ability> ...will absolutely end up triggering Sword Poetry Attack! on the monster you counter (though it's Sword Poetry you'll see in the popup text.)
blockBuff can be made to work in a similar way. You can give the player a playerHitEffectBuff buff as the blockBuff to overcome the lack of targeting information. OTOH, this means that subsequent monster attacks get hit by the effect even if you don't block. AFAIK brittle="1" does not actually fix this, since the cancellation only kicks in on the next turn anyway.
I didn't realize that blockBuff didn't pass targeting information along, either. That sucks. Does dodgeBuff have the same problem? (edit: no, it can't, or Adventurer Aikido wouldn't work.) More appropriately, did that get fixed when they repaired Puissant Veil? Because it seems like it would have to be, and I've been told that Veil is working correctly these days. [further edit]Also, if you use the blockBuff to trigger a counter-attack like thing, then using attacks="1" on the PHEB should work perfectly.[/further edit]
Do we truly _know_ that Adventurer Aikido is working? I haven't played with Artful Dodger recently, but I don't remember the words "Adventurer Aikido" ever popping up over my characters head.
I tested it; it works. Should note, however, that it uses triggerondodge, not dogeBuff. DodgeBuff is in fact broken.
Scaling buffs: Code: <!-- Give yourself a buff.--> <spell name="TESTING_SCALING_BUFF_BUFF" type="self" icon="skills/spells/mustache64.png" smallicon="skills/spells/mustache32.png"> <description text="This buff gives you a HP bonus equal to your burliness"/> <buff useTimer="1" time="63" stacksize="99999" allowstacking="1" icon="skills/spells/plumber64.png" smallicon="skills/spells/plumber32.png"> <secondarybuff id="0" amount="1"/> <!-- Health in this case --> </buff> </spell> <!--Apply 1 damage to the dummy monster, then give yourself a stack of the buff. Retrigger the ISNOTDEAD check--> <spell name="TESTING_SCALING_BUFF_DAMAGE_TIME" type="template" templateID="30"> <effect type="damage" righteous="1" self="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_BUFF" amount="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_IS_NOT_DEAD" amount="0"/> </spell> <!--Check the monster isn't dead. If there's a monster on the tile, hit it with the iterative damage, and apply a stack of the buff to yourself--> <spell name="TESTING_SCALING_BUFF_IS_NOT_DEAD" type="targetmonster"> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_TIME" amount="0"/> </spell> <!-- Heal the monster to X*f+1 HP, where X is the stat and f is the scaling rate--> <spell name="TESTING_SCALING_BUFF_HEALING" type="template" templateID="30"> <effect type="heal" amount="0" amountF="1" primaryScale="1"/> </spell> <!-- Take your monster down to 1 HP. Choose the # carefully, 164 was for testing --> <spell name="TESTING_SCALING_BUFF_DAMAGE_INITIAL" type="template" templateID="30"> <effect type="damage" righteous="164" self="0"/> </spell> <!--Make your dummy monster. Note: if you make this, for the love of Krong, add some sanity checking (i.e. check that the tile is empty)--> <spell name="TESTING_SCALING_BUFF_SUMMON" type="template" templateID="30"> <effect type="summon" monsterType="[some monster type with lots of hp and no magic resist]" /> </spell> <!--Initial trigger--> <spell name="T1" type="self" downtime="1" icon="skills/warblade_1.png"> <description text="Description"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_SUMMON" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_INITIAL" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_HEALING" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_TIME" amount="0"/> </spell>
Note the above is imperfect in that monster HP is fairly randomized and casting it on a tile that already has a monster on it will cause some chaos -- but that's purely brilliant, Mining.
I have a fix I'm just about done with. This should work just fine: Code: <!-- Give yourself a buff.--> <spell name="TESTING_SCALING_BUFF_BUFF" type="self" icon="skills/spells/mustache64.png" smallicon="skills/spells/mustache32.png"> <description text="This buff gives you a HP bonus equal to your burliness"/> <buff useTimer="1" time="63" stacksize="99999" allowstacking="1" icon="skills/spells/plumber64.png" smallicon="skills/spells/plumber32.png"> <!-- Put some buffs here --> </buff> </spell> <!--Apply 1 damage to the dummy monster, then give yourself a stack of the buff. Retrigger the ISNOTDEAD check--> <spell name="TESTING_SCALING_BUFF_DAMAGE_TIME" type="template" templateID="30"> <effect type="damage" righteous="1000" self="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_BUFF" amount="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_IS_NOT_DEAD" amount="0"/> </spell> <!--Check the monster isn't dead. If there's a monster on the tile, hit it with the iterative damage, and apply a stack of the buff to yourself--> <spell name="TESTING_SCALING_BUFF_IS_NOT_DEAD" type="targetmonster"> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_TIME" amount="0"/> </spell> <!-- Heal the monster to X*f+1 HP, where X is the stat and f is the scaling rate--> <spell name="TESTING_SCALING_BUFF_HEALING" type="template" templateID="30"> <effect type="heal" amount="0" amountF="1000" primaryScale="1"/> </spell> <!-- Take your monster down to 1 HP. Choose the # carefully, 164 was for testing --> <spell name="TESTING_SCALING_BUFF_DAMAGE_INITIAL" type="template" templateID="30"> <effect type="damage" righteous="999999" self="0"/> <!-- One million -1, woop woop --> </spell> <!--Buff the Dummy Monster with asstons of HP --> <spell name="TESTING_SCALING_BUFF_BUFF_TO_SUMMON" type="template" templateID="30"/> <buff useTimer="0" allowstacking="0" icon="someicon" smallicon="someicon"> <secondarybuff id="0" amount="1000000"/> <!-- One million, woop woop --> </buff> </spell> <!--Make your dummy monster. Note: if you make this, for the love of Krong, add some sanity checking (i.e. check that the tile is empty)--> <spell name="TESTING_SCALING_BUFF_SUMMON" type="template" templateID="30"> <effect type="summon" monsterType="[some monster type with lots of hp and no magic resist]" /> </spell> <!-- Clear out the tile --> <spell name="TESTING_SCALING_BUFF_KNOCKBACK" type="template" templateID="30"> <effect type="knock" unresistable="1"> </spell> <!-- set up the arena for the summon, then summon it and buff it with tons of max HP --> <spell name="TESTING_SCALING_BUFF_SETUP" type="self"> <effect type="trigger" spell="TESTING_SCALING_BUFF_KNOCKBACK"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_SUMMON"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_BUFF_TO_SUMMON"/> </spell> <!--Initial trigger--> <spell name="T1" type="self" downtime="1" icon="skills/warblade_1.png"> <description text="Description"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_SETUP" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_INITIAL" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_HEALING" amount="0" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_TIME" amount="0"/> </spell> Edit: It doesn't, and in fact crashes to desktop... on game load. Will report back after sacrificing some goats.
Ok, I fixed it:: MonDB: Code: <monDB> <monster name="Daggle" level="0" tiny="1" splat="blood" taxa="Animal" diggleHell="1"> <idleSprite left="sprites/monster/diggle/diggle_run_l.spr" right="sprites/monster/diggle/diggle_run_r.spr" up="sprites/monster/diggle/diggle_run_u.spr" down="sprites/monster/diggle/diggle_run_d.spr"/> <attackSprite left="sprites/monster/diggle/diggle_atk_l.spr" right="sprites/monster/diggle/diggle_atk_r.spr" up="sprites/monster/diggle/diggle_atk_u.spr" down="sprites/monster/diggle/diggle_atk_d.spr"/> <hitSprite left="sprites/monster/diggle/diggle_hit_l.spr" right="sprites/monster/diggle/diggle_hit_r.spr" up="sprites/monster/diggle/diggle_hit_u.spr" down="sprites/monster/diggle/diggle_hit_d.spr"/> <morphsprites eatSprite="sprites/monster/diggle/diggle_eat.xml" drinkSprite="sprites/monster/diggle/diggle_drink.xml" levelupmSprite ="sprites/monster/diggle/diggle_levelup_male.xml" levelupfSprite ="sprites/monster/diggle/diggle_levelup_female.xml" vanishSprite="sprites/monster/diggle/diggle_vanish.xml" longidleSprite="sprites/monster/diggle/diggle_long_idle.xml"/> <digSprites downSprite = "sprites/monster/diggle/diggle_dig.xml" upSprite = "sprites/monster/diggle/diggle_pop.xml" /> <dieSprite name="sprites/monster/diggle/diggle_die_r.spr"/> <sfx attack="diggle_attack" hit="diggle_damage" die="diggle_die" spell="diggle_cast" dig_in="diggle_digs_in" dig_out="diggle_digs_out" /> <ai aggressiveness="4" span="10" /> <sight cone="90" modifier="1.10" /> <stats numFig="3" xpValue="10" /> <damage slashing="1" piercing="2"/> <secondarybuff id="4" amount="-10"/> <!-- crit --> <secondarybuff id="6" amount="4"/> <!-- dodge --> <secondarybuff id="0" amount="180"/> <!-- hp --> <info latin="(Poingus Poingus)" text="A strange little bird-thing that tunnels through walls with its odd, rubbery nasal appliance."/> <dig mindistance="3" percent="5" ambushpercent="5" blockedpercent="100" minturns="3" maxTurns="6" /> </monster> </monDB> spellDB:: Code: <spellDB> <!-- Give yourself a buff.--> <spell name="TESTING_SCALING_BUFF_BUFF" type="self" icon="skills/spells/mustache64.png"> <description text="This buff gives you a HP bonus equal to your burliness"/> <buff useTimer="1" time="100" stacksize="10" allowstacking="1" icon="skills/spells/plumber64.png" smallicon="skills/spells/plumber32.png"> <secondarybuff id="0" amount="100"/> </buff> </spell> <!--Recursive calls--> <spell name="TESTING_SCALING_BUFF_ITERATE" type="targetmonster"> <effect type="damage" righteous="20" self="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_BUFF" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_ITERATE" /> </spell> <!--Start the recursive calls--> <spell name="TESTING_SCALING_BUFF_ITERATE_BEGIN" type="template" templateID="31"> <effect type="trigger" spell="TESTING_SCALING_BUFF_ITERATE"/> </spell> <!-- Heal the monster to 20*f HP, where f is the stat--> <spell name="TESTING_SCALING_BUFF_HEALING" type="template" templateID="31"> <effect type="heal" amount="0" amountF="20" secondaryScale="2"/> </spell> <!--Now, damage the monster until it's nearly dead.--> <spell name="TESTING_SCALING_BUFF_DAMAGE_INITIAL" type="template" templateID="31"> <effect type="damage" righteous="180" self="0"/> </spell> <!--Now, buff up the summon's HP - see notes below!--> <spell name="TESTING_SCALING_BUFF_BUFF_TO_SUMMON" type="template" templateID="31" icon="skills/spells/mustache64.png"> <description text="This buff gives you a HP bonus equal to your burliness"/> <buff useTimer="1" time="3" stacksize="1" allowstacking="0" icon="skills/spells/plumber64.png" smallicon="skills/spells/plumber32.png" self="0"> <secondarybuff id="0" amount="180"/> </buff> </spell> <!-- Now, make the dummy summon --> <spell name="TESTING_SCALING_BUFF_SUMMON" type="template" templateID="31"> <effect type="summon" monsterType="Daggle" /> </spell> <!--Set up the field--> <spell name="TESTING_SCALING_BUFF_SETUP" type="template" templateID="31"> <effect type="knock" resistable="0"/> </spell> <!--Initial trigger--> <spell name="TESTING_SCALING_BUFF_TRIGGER" type="self" downtime="1" icon="skills/warblade_1.png"> <description text="Description"/> <!-- First, setup the field--> <effect type="trigger" spell="TESTING_SCALING_BUFF_SETUP" /> <!-- <spell name="TESTING_SCALING_BUFF_SETUP" type="template" templateID="31"> <effect type="knock" resistable="0"/> </spell> --> <!-- Now, make the dummy summon --> <effect type="trigger" spell="TESTING_SCALING_BUFF_SUMMON" /> <!-- <spell name="TESTING_SCALING_BUFF_SUMMON" type="template" templateID="31"> <effect type="summon" monsterType="Summon Slime" /> </spell> --> <!-- Now, take the monster down to less than 20 health --> <effect type="trigger" spell="TESTING_SCALING_BUFF_DAMAGE_INITIAL"/> <!-- <spell name="TESTING_SCALING_BUFF_DAMAGE_INITIAL" type="template" templateID="31"> <effect type="damage" righteous="180" self="0"/> </spell> --> <!-- Here's where the magic happens. Healing that scales to the stat you want to scale your buff to. In this case, we use burliness.--> <effect type="trigger" spell="TESTING_SCALING_BUFF_HEALING"/> <!-- <spell name="TESTING_SCALING_BUFF_HEALING" type="template" templateID="31"> <effect type="heal" amount="0" amountF="20" primaryScale="1"/> </spell> --> <!-- Now, we deal the target 20 damage at a time. Easy as, amiright? This step also gives you buffs, so you want it to work ;)--> <effect type="trigger" spell="TESTING_SCALING_BUFF_ITERATE_BEGIN"/> <!-- <spell name="TESTING_SCALING_BUFF_BUFF" type="self" icon="skills/spells/mustache64.png"> <description text="This buff gives you a HP bonus equal to your burliness"/> <buff useTimer="1" time="100" stacksize="10" allowstacking="1" icon="skills/spells/plumber64.png" smallicon="skills/spells/plumber32.png"> <secondarybuff id="0" amount="100"/> </buff> </spell> <spell name="TESTING_SCALING_BUFF_ITERATE" type="targetmonster"> <effect type="damage" righteous="20" self="0"/> <effect type="trigger" spell="TESTING_SCALING_BUFF_BUFF" /> <effect type="trigger" spell="TESTING_SCALING_BUFF_ITERATE" /> </spell> <spell name="TESTING_SCALING_BUFF_ITERATE_BEGIN" type="template" templateID="31"> <effect type="trigger" spell="TESTING_SCALING_BUFF_ITERATE"/> </spell> --> </spell> </spellDB> Anyway, the issue seemed to be that buffs are only applied at the END of the turn - so even though I was buffing mob HP, it wasn't doing shit for surviving the 180 damage nuke I was dropping.
You can actually pull it off by giving the skill a boozebuff or foodbuff (I don't think you can trigger it on consumables that aren't one of those; at least it failed when I tried it.) My Fairy Princess! mod does it like this: Code: <boozeBuff name="Floral Extractemy"/> <foodBuff name="Floral Extractemy"/> Which is a one turn buff that doesn't do anything. It'll show up whenever you eat something very briefly but it clutters things up less since its only there for a turn. Code: <spell name="Floral Extractemy" type="self" icon="skills/flowermagic32.png"> <buff usetimer="1" time="1" icon="skills/flowermagic64.png" smallicon="skills/flowermagic32.png"/> <description text="Your digestive tract has been augmented with geranium kidneys and tulip intestines, allowing you to harvest flower magic. And possibly even... power. o:"/> </spell> With the items in question calling a launching that checks for the presence of the the buff you got when you ate the food: Code: <food hp="1" effect="Aspect of Love launch"/> Code: <spell name="Aspect of Love launch" type="self"> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="Floral Extractemy" spell="Aspect of Love"/> <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Floral Extractemy" spell="Floral Energy"/> </spell> Its functionally about the same as sticking a permanent dummy buff on the player but has the advantage of going on the moment it becomes relevant and disappearing when its not. The game will treat the item as food or booze, although there's nothing particularly requiring that food items actually be food-y (And if you only have one of food items or booze items that have a modal effect like that, you wouldn't need both foodBuff and boozeBuff.) And I used the if...then...else trick in the Fairy Princess mod as well fairly extensively (because I have no sense of moderation)--it was probably a bit closer in how I used it to a switch control structure but it was achieved with nested if..then...else stuff like this: Code: <spell name="summer check" type="targetfloor"> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="Mantle of Summer" spell="Summer rune launch"/> <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Mantle of Summer" spell="summer check2"/> </spell> <spell name="summer check2" type="targetfloor"> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="Auspicious Mantle of Summer" spell="Summer rune launch"/> <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Auspicious Mantle of Summer" spell="autumn check"/> </spell> <spell name="autumn check" type="targetfloor"> <effect type="trigger" requirebuffontrigger="1" requirebuffontriggername="Mantle of Autumn" spell="Autumn rune launch"/> <effect type="trigger" requirebuffonnottrigger="1" requirebuffonnottriggername="Mantle of Autumn" spell="autumn check2"/> </spell> That's only a portion of the code but I think you can get the pattern from it. Also in the above example, the type is targetfloor because the original spell is targetfloor; and it's triggering the end effect at the location you cast it on. You could probably get away with "self" or other types of targets in a lot of contexts; here it's mostly doing it to remember where you cast the base spell so the effect can eventually be triggered there. Its not an inherent requirement in the control structure. I don't think you'd actually need the "Else" spell in the example mining gave, you could just call "C" directly from the if statement since there's only one effect to call. (Though it does have some potential advantages for readability and these can get huge really fast if you use them a lot.)
There's two good reasons for using an else statement: 1) It's easier to update into an else if when your design changes (no ifs, we both know it'll change ) 2) It's more apparent what's going on to the reader. 2.1) The above reason is why I used an else statement in the example .
Well, you can. As I wrote back when I was posting it, the whole thing did not come from experience since I wasn't writing any code using either of the proposed triggers back then, and even more so I wrote it a week after said triggers were fixed as opposed to you having used it at least two months after that and writing about it now. Thus, my point stands. Though what you proposed would be a much better solution nowadays, due to it not taking up buff space, that I admit. Other than that, if we are talking about the "if, then, else" thing, I have to say that I fully agree with mining. It does appear to be redundant, but that is because it is supposed to be redundant, as a design fail-safe and something to make the whole thing readable. We could write our code in a way that would be unreadable and require an almost complete rewrite if we were to update anything in it - the only question is, why would we want to do that if we plan on updating it in the first place.
This is probably a bad place to make a first post, particularly with something I haven't tested. However this SHOULD work, and if not at least the theory is clear enough. This is a triggered spell- how the trigger occurs hardly matters. Probably on kill though. Code: <spell name="Soul Steal" type="self" icon="skills/diggle_plague32.png" > <buff useTimer="0" allowstacking="1" stacksize="9999" self="1" bad="0" icon="skills/diggle_plague64.png" smallicon="skills/diggle_plague32.png" bad="1" > <secondarybuff id="15" amount="1"/> <!-- Wand use???? --> </buff> <description text="Why buff wand use?" /> </spell> This could be paired with a series of skills which scale off of wand use, essentially allowing you to count stacks of a buff. Code: <spell name="Soul Bomb" type="targetmonster" icon="skills/diggle_plague32.png" > <effect type="damage" aetherial="4" aetherialF="1" secondaryScale="15" affectscaster="1" /> <description text="Oh." /> </spell> Unfortunately only one mod can make use of this at a time.
Time for more buff counting! I just threw together a minimod which showcases a way to use the above trick and sorta avoid conflicts. Still won't work if another mod wants to scale off buffstacks when casting a spell. It also has some pretty nifty recursion which is more general purpose. Here's the meat of it: Code: <spell name="Soul" type="self" icon="skills/spells/syzygy32.png"> <!--triggered on kill--> <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="fireball" centerEffect="0"/> <buff useTimer="0" removable="0" bad="1" manaUpkeep="0" tag="soul" allowstacking="1" stacksize="100" icon="skills/spells/syzygy64.png" smallicon="skills/spells/syzygy32.png"> </buff> <description text="A stolen soul. Beware it's power."/> </spell> <spell name="Soul Power" type="self" icon="skills/spells/zombyfycation32.png"> <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="fireball" centerEffect="0"/> <buff useTimer="0" removable="0" bad="1" manaUpkeep="0" tag="soulpower" allowstacking="1" stacksize="100" icon="skills/spells/zombyfycation64.png" smallicon="skills/spells/zombyfycation32.png"> <secondaryBuff id="15" amount="1"/> </buff> <description text="A count of how many souls you have/have iterated through so far."/> </spell> <spell name="Soul Burn" type="self" icon="skills/spells/zombyfycation32.png"> <effect type="damage" existential="0" existentialF=".33" aethereal="0" aetherealF=".33" secondaryScale="15" affectsCaster="1"/> <anim sprite="sprites/sfx/impactA/impactA" frames="6" framerate="80" sfx="blast" centerEffect="0"/> <description text="Damages you based on soul power" /> </spell> <spell name="Soul Revolt" type="self" icon="skills/spells/zombyfycation32.png"> <!-- triggered on cast --> <effect type="trigger" spell="Soul Power" amount="0" requirebuffontrigger="1" requirebuffontriggername="Soul"/> <effect type="trigger" spell="Soul Burn" amount="0" requirebuffontrigger="1" requirebuffontriggername="Soul"/> <effect type="removebuffbyname" name="Soul" amount="1"/> <effect type="trigger" spell="Soul Revolt" amount="0" requirebuffontrigger="1" requirebuffontriggername="Soul"/> <effect type="trigger" spell="Soul Revert Init" amount="0" requirebuffonnottrigger="1" requirebuffonnottriggername="Soul"/> <!-- Necessary so that the soul revert is not halted by the accrual of a new soul during monster turn--> <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="fireball" centerEffect="0"/> <description text="Recursive spell. Iterates through all souls, changing them to power and damaging you. Then changes all soul power back to souls" /> </spell> <spell name="Soul Revert Init" type="self" icon="skills/spells/zombyfycation32.png"> <effect type="trigger" spell="Soul Revert" amount="1"/> <description text="Recursive spell. Iterates through all soul power, changing them back to souls" /> </spell> <spell name="Soul Revert" type="self" icon="skills/spells/zombyfycation32.png"> <effect type="trigger" spell="Soul" amount="0" requirebuffontrigger="1" requirebuffontriggername="Soul Power"/> <effect type="removebuffbyname" name="Soul Power" amount="1"/> <effect type="trigger" spell="Soul Revert" amount="0" requirebuffontrigger="1" requirebuffontriggername="Soul Power"/> <anim sprite="sprites/sfx/null" frames="1" firstframe="0" framerate="120" sfx="fireball" centerEffect="0"/> <description text="Recursive spell. Iterates through all soul power, changing them back to souls" /> </spell> Skills which scale off of wand affinity will need to be triggered with amount="1" to do anything, otherwise they will hit before you receive the soul power buff. I do not think this can be sped up unfortunately. Full mod's below, but there isn't much beyond the buffcounting
It can, and it wouldn't even be too complicated, according to my standards. But then again, my code tends to strangle people so you can define "not too complicated" in more than just one way.
Oh boy please elaborate. If I can get the whole cycle completed within a single turn that would make this so much more versatile.
The solution depends on whether you wish for your idea to apply to only your spells (meaning: ones you have control over), or if you wish for it to be absolutely fool-proof (meaning: applicable for everyone who would want to expand on your mod by making a mod to a mod). Most of the time the first one is enough. And that means you have full control over what triggers what, meaning it is easy to get it to work the way you want it to. Now, assuming that you choose to take the "easy" path, the solution is to call on the "soul revolt" and "soul revert" spells from another spell, from every spell which your skill tree would add, instead of calling it via "triggerOnCast". Instead of having the skills call on the spells with effects, make them trigger a spell the only purpose of which is to call "soul revolt", then the main spell, and then "soul revert" in a sequence, all in one turn. So it's rather simple, really. You only need basic knowledge about how spells are triggered in order to be able to do that. Now, if you want to get it done the "hard" way, there are methods for that too. But I won't even try to find any efficient methods of doing so unless I hear a good enough reason (meaning any sensible reason, really) - I'm rather busy with various things nowadays (work being a major part of it, but not the only part) and one or two hours I could've spent at musing over someone's idea of a code is time I could spend on writing the story I promised someone to be at least trying to write.
Yeah okay that was pitifully easy. I was under the assumption that buffs got applied at the end of your turn for some reason.
If you use "triggerfromlist" and a group of "spawn" effects you can spawn items selected from a list directly into the player's inventory, instead of on the ground like you get with "spawnitemfromlist". You can also use this technique to spawn stacks of items from a list (by setting "amount" in your "spawn" effects) rather than spawning only single items.