[possible bug] meleeappliesspell
its seems this thing can only work with 1 modifier at all
i tried many ways but it seems to only apply the first even if i put N modifiers
its seems this thing can only work with 1 modifier at all
i tried many ways but it seems to only apply the first even if i put N modifiers
i made a spell that buff the caster with meleeapplyspell X
X is debuff that changes a few things on target with 3 modifiers
it seems only the first in order of the 3 modifiers actually work (cause i tried changing the order and it changed which one worked)
It must be some special circumstance then. here is an example that works. It is a weapon that calls a spelldef.
the spelldef
It works just as stated, wearer gains 3 spell resist and 3 spell mastery for every time the enemy is stricken, and target loses 3 of both every time.
Not to be picky (ok, to be picky) shouldn't SpellSubClass be Debuff in this case?
You're right. I guess the AI never picks an item based off what spell it may apply.
is it possible the problem is with "canstack" ?
my buff cannot stack
so maybe the bug is that each modifier apply something the game read as stacks and so doesnt put the second after the first modifier is in?
i changed it since it wasnt working ![]()
anyway it was something like this:
<SpellDef InternalName="spell_cripplingpoison">
<DisplayName>crippling poison</DisplayName>
<Description>apply crippling poison to your dagger for 3 turns</Description>
<Image>T_Chaos_Painting.png</Image>
<IconFG>Ability_PathOfTheAssassin_Icon.png</IconFG>
<IconColor>32,45,243</IconColor>
<Cooldown>6</Cooldown>
<AutoUnlock>1</AutoUnlock>
<SpellBookSortCategory>Unit</SpellBookSortCategory>
<SpellBookSortSubCategory>UnitEnchantment</SpellBookSortSubCategory>
<SpellType>Tactical</SpellType>
<SpellClass>Defensive</SpellClass>
<SpellSubClass>Buff</SpellSubClass>
<SpellTargetType>Self</SpellTargetType>
<CastTime>1</CastTime>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>MeleeAppliesSpell</Attribute>
<StrVal>cripplingpoison_effect</StrVal>
<duration>3</duration>
</GameModifier>
<Prereq>
<Type>AbilityBonusOption</Type>
<Attribute>cripplingpoison</Attribute>
</Prereq>
<Prereq>
<Type>UnitStat</Type>
<Attribute>UnitStat_IsUsingDagger</Attribute>
<value>1</value>
</Prereq>
<AIData AIPersonality="AI_General">
<AIPriority>50</AIPriority>
</AIData>
</SpellDefEffect>
</SpellDef>
<SpellDef InternalName="cripplingpoison_effect">
<DisplayName>crippling poison </DisplayName>
<Description>reduce Target enemy unit attack by 25% and movement speed by 1</Description>
<Image>T_Shrink_Painting.png</Image>
<IconFG>T_Shrink_Icon.png</IconFG>
<IconBG>T_Shrink_Icon_BG.png</IconBG>
<IconColor>210,110,210</IconColor>
<SpellType>Tactical</SpellType>
<SpellClass>Offensive</SpellClass>
<SpellSubClass>Damage</SpellSubClass>
<SpellTargetType>EnemyUnit</SpellTargetType>
<IsCastable>0</IsCastable>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Attack_Boost</StrVal>
<DisplayName>Weakened</DisplayName>
<Duration>2</Duration>
<Calculate InternalName="Calc" ValueOwner="TargetUnit">
<Expression><![CDATA[[UnitStat_CombinedAttack] * -0.25]]></Expression>
</Calculate>
<Calculate InternalName="Calc2" ValueOwner="TargetUnit">
<Expression><![CDATA[[Unit_GetTroopCount]]]></Expression>
</Calculate>
<Calculate InternalName="Value">
<Expression><![CDATA[[Calc] / [Calc2]]]></Expression>
</Calculate>
</GameModifier>
<GameModifier>
<ModType>Unit</ModType>
<Attribute>AdjustUnitStat</Attribute>
<StrVal>UnitStat_Moves</StrVal>
<Duration>2</Duration>
<Value>-1</Value>
</GameModifier>
<AIData AIPersonality="AI_General">
<AIPriority>5</AIPriority>
</AIData>
</SpellDef>
Try setting the moves attribute to "setunitstat" with a value of 1. I think 0 moves causes combat to freeze.
It certainly is bugged, only one effect gets applied. If I put <CanStack>1</CanStack> it works, but that's not a solution.
Time to go through my meleeappliesspell stuff and see if I need to change anything. Thanks for posting this bug.
If you want a work-around, make the spell apply a trait instead to the target. The trait can expire after 5 turns, and you obviously don't need to worry about it stacking.
Another solution is to split the effect in two so you do two meleeappliesspell to different spells. A bit spammy but it works.
whats the command to apply a trait?
See this reply first, it's a more elegant solution: https://forums.elementalgame.com/432806/get;3239436
<GameModifier>
<ModType>Unit</ModType>
<Attribute>UnlockUnitAbility</Attribute>
<StrVal>Reliquary_Cursed</StrVal>
</GameModifier>
ok ty, the additional code needed seems to be about the same anyway
or i might just cut the movement part anyway ai will never be able to use this advantage and will never be able to get abused by it so i might just not have it uhmmm
i just noticed that i had the type on the trait giving this spell set to "spell"
is it for ai choices only or it has some purpose ?
Looks like this bug is getting fixed! From the 0.99 changelog
Welcome Guest! Please take the time to register with us.
Select a reason for giving karma:
You're about to visit an external site:
Sign up here to get the latest news, updates, and special offers delivered directly to your inbox.