Odd bug, duration command not working as i hoped

What is supposed to happen: you get an elemental damage boost that gradually fades at different rates for each damage type. It does fade as intended, but the buggy portion is this:

each round the spells lasts ADDS a permanent +1 fire damage, which  accumulates.

very odd. The spell has no requirements for testing purposes. The additional test of this spell wsa to check if seperate spell elements could have different durations, and observing the particle effects from round to round.

Code: xml
  1.  
  2. <SpellDef InternalName="EnchantedWeapon_Tactical">
  3.          <DisplayName>Enchanted Weapon</DisplayName>
  4.          <Description>Enchanted champion's weapon does extra damage.</Description>
  5.          <FormattedDescription>Enchanted champion's weapon does 1 fire, 2 cold, 3 electric.</FormattedDescription>
  6.          <Image>S_BurningBlade_Painting.png</Image>
  7.          <IconFG>S_BurningBlade_Icon.png</IconFG>
  8.          <IconBG>S_BurningBlade_Icon_BG.png</IconBG>
  9.          <IconColor>255,158,6</IconColor>
  10.          <AutoUnlock>1</AutoUnlock>
  11.          <CanStack>0</CanStack>
  12.          <SpellBookSortCategory>Unit</SpellBookSortCategory>
  13.          <SpellBookSortSubCategory>UnitEnchantment</SpellBookSortSubCategory>
  14.          <SpellType>Tactical</SpellType>
  15.          <SpellClass>Defensive</SpellClass>
  16.          <SpellSubClass>Buff</SpellSubClass>
  17.          <SpellTargetType>FriendlyUnit</SpellTargetType>
  18.          <HideInHiergamenon>1</HideInHiergamenon>
  19.          <PreventStackingWith>BurningBlade</PreventStackingWith>
  20.           <SpellResourceCost>
  21.              <Resource>Mana</Resource>
  22.              <Amount>7</Amount>
  23.          </SpellResourceCost>
  24.          <GameModifier>
  25.              <ModType>Unit</ModType>
  26.              <Attribute>AdjustUnitStat</Attribute>
  27.              <StrVal>UnitStat_Attack_Fire</StrVal>
  28.              <Duration>4</Duration>
  29.              <Value>1</Value>
  30.              <DisplayName>Enchanted Weapon</DisplayName>
  31.              <Duration>3</Duration>
  32.              <Effect>S_BurningBlade_Particle</Effect>
  33.              <PerTurn>1</PerTurn>
  34.          </GameModifier>
  35.           <GameModifier>
  36.              <ModType>Unit</ModType>
  37.             <Attribute>AdjustUnitStat</Attribute>
  38.              <StrVal>UnitStat_Attack_Cold</StrVal>
  39.              <Duration>3</Duration>
  40.              <Value>2</Value>
  41.          </GameModifier>
  42.           <GameModifier>
  43.              <ModType>Unit</ModType>
  44.              <Attribute>AdjustUnitStat</Attribute>
  45.              <StrVal>UnitStat_Attack_lightning</StrVal>
  46.              <Duration>2</Duration>
  47.              <Value>3</Value>
  48.          </GameModifier>
  49.          <AIData AIPersonality="AI_General">
  50.              <AIPriority>50</AIPriority>
  51.          <ValueCalcWrapper>
  52.              <ValueType>IsTargetWorthy</ValueType>
  53.              <Calculate InternalName="Calc" ValueOwner="TargetUnit">
  54.                  <Expression><![CDATA[[Unit_GetHPCurrent]]]></Expression>
  55.              </Calculate>
  56.              <Calculate InternalName="Value">
  57.                  <Expression><![CDATA[[Calc] > 10]]></Expression>
  58.              </Calculate>
  59.          </ValueCalcWrapper>
  60.          </AIData>
  61.          <HitSoundFX>Spell_BurningBlade_01</HitSoundFX>
  62.          <SpellDefEffect>
  63.              <EffectName>S_BurningBlade_Particle</EffectName>
  64.              <LocalPosition>0,0,0</LocalPosition>
  65.              <EffectScale>0.75</EffectScale>
  66.              <EffectDelay>0.25</EffectDelay>
  67.              <SnapToTerrain>1</SnapToTerrain>
  68.          </SpellDefEffect>
  69.      </SpellDef>

3,470 views 5 replies
Reply #1 Top

Remove this from the fire attack modifier <PerTurn>1</PerTurn> and try again.

Reply #2 Top

will try it.

Reply #3 Top


Ok that did solve the fire damage bug, but i lost my floating burning blade particles.

this is going to take some thought ...

Reply #4 Top

Make a new game modifier that does nothing, but add the effect.

Reply #5 Top


I made  a few changes, i seperated the particles effect into a seperet gamemodifier, unit modifier etc. I have my particles back but the display is a doubling up somehow, will need to test a few more time to catch the oddity - after i get a snack for my wife. uhg.