OK - So I've gone ahead and did all the leg work and something is just not quite right. So lets say instead of the Burning Axe doing 9 cutting damage and 2 fire damage, you want it to do 9 cutting, 1 fire, and a further 1 fire damage for each Fire Shard you control. here is the XML I used
Burning Axe Changes (i've marked the only change other than the stat change from 2 to 1 on the fire bit)
Code: xml
- <GameItemType InternalName="Axe_Burning">
- <DisplayName>Burning Axe</DisplayName>
- <Description>This axe smoulders with an internal fire, but when its handle is gripped the blade bursts into flame.</Description>
- <Type>Weapon</Type>
- <WeaponType>Blunt</WeaponType>
- <CanBeEquipped>1</CanBeEquipped>
- <AdditionalTrainingTurns>12</AdditionalTrainingTurns>
- <ShopValue>150</ShopValue>
- <ProductionRequirement>
- <Type>Resource</Type>
- <Attribute>RefinedCrystal</Attribute>
- <Value>3</Value>
- </ProductionRequirement>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Attack_Cutting</StrVal>
- <Value>9</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_CombatSpeed</StrVal>
- <Value>-2</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_CurrentWeight</StrVal>
- <Value>10</Value>
- </GameModifier>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_Attack_Fire</StrVal>
- <Value>1</Value>
- </GameModifier>
- <!-- IMPORTANT PART HERE -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>MeleeAppliesSpell</Attribute>
- <StrVal>FireShard1_Effect</StrVal>
- <Provides>Fire Damage equal to the number of Fire Shards you control</Provides>
- </GameModifier>
- <!-- END IMPORTANT PART -->
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>AdjustUnitStat</Attribute>
- <StrVal>UnitStat_BackswingChance</StrVal>
- <Value>100</Value>
- <Provides>Backswing- If the attack misses the unit gets a second attack against the same target</Provides>
- </GameModifier>
- <IsAvailableForSovereignCustomization>0</IsAvailableForSovereignCustomization>
- <Likelihood>400</Likelihood>
- <RarityDisplay>Common</RarityDisplay>
- <Prereq>
- <Type>Tech</Type>
- <Attribute>Enchantment</Attribute>
- </Prereq>
- <AIData AIPersonality="AI_General">
- <AIPrefType>AIPrefType_CUTTING</AIPrefType>
- <AIPriority>200</AIPriority>
- </AIData>
- <ArtDef>Axe_Burning_ArtDef</ArtDef>
- <GameItemTypeArtDef InternalName="Axe_Burning_ArtDef">
- <GameItemTypeModelPack InternalName="Axe_Burning_Default">
- <IconFile>W_Axe_Burning_Icon_01.png</IconFile>
- <TintR>0</TintR>
- <TintG>0</TintG>
- <TintB>0</TintB>
- <AttackSFX>Hit_Hammer1</AttackSFX>
- <AttackSFX>Hit_Hammer2</AttackSFX>
- <AttackSFX>Hit_Hammer3</AttackSFX>
- <EquipSFX>Equip_WoodenItem_01</EquipSFX>
- <EquipSFX>Equip_WoodenItem_02</EquipSFX>
- <EquipSFX>Equip_WoodenItem_03</EquipSFX>
- <OnHitParticleName>Hit_Fire1</OnHitParticleName>
- <GameItemTypeModel>
- <ModelFile>gfx/hkb/Weapons/W_Axe_Burning_01.hkb</ModelFile>
- <Texture_All>gfx/hkb/Weapons/FE_Weapons_01.png</Texture_All>
- <Attachment>hand_right_Lcf</Attachment>
- <Color_Metal>90,87,87</Color_Metal>
- <EffectAttachment>
- <Attachment>Effect_Loc_01</Attachment>
- <EffectName>A_BurningAxe_Particle</EffectName>
- <EffectPosition>6,0,0</EffectPosition>
- <EffectRotation>0,0,0</EffectRotation>
- <EffectScale>0.25</EffectScale>
- </EffectAttachment>
- </GameItemTypeModel>
- </GameItemTypeModelPack>
- </GameItemTypeArtDef>
- </GameItemType>
and here is the code for FireShard1_Effect
Code: xml
- <SpellDef InternalName="FireShard1_Effect">
- <DisplayName>Fire Shard Damage</DisplayName>
- <Description>Does 1 Fire Damage per Fire Shard</Description>
- <SpellBookSortCategory>Unit</SpellBookSortCategory>
- <SpellBookSortSubCategory>UnitDamage</SpellBookSortSubCategory>
- <SpellType>Tactical</SpellType>
- <SpellClass>Offensive</SpellClass>
- <SpellSubClass>Damage</SpellSubClass>
- <SpellTargetType>EnemyUnit</SpellTargetType>
- <HideInHiergamenon>1</HideInHiergamenon>
- <IsCastable>0</IsCastable>
- <GameModifier>
- <ModType>Unit</ModType>
- <Attribute>DefendableDamage</Attribute>
- <AttackStat>UnitStat_Attack_Fire</AttackStat>
- <Calculate InternalName="Calc" ValueOwner="CastingUnit">
- <Expression><![CDATA[[UnitOwner_GetNumFireShards]]]></Expression>
- </Calculate>
- <Calculate InternalName="Value">
- <Expression><![CDATA[[Calc]]]></Expression>
- </Calculate>
- </GameModifier>
- <AIData AIPersonality="AI_General">
- <AIPriority>5</AIPriority>
- </AIData>
- <HitSoundFX>Spell_Barbs_01</HitSoundFX>
- </SpellDef>
And here is the result when I have ZERO fire shards:
http://www.classicquarter.com/HUH_FE_AXE.jpg
Which as you can see, is NOT what you'd expect. Should be the 9 cutting damage, 1 fire damage with NO chance of fire shard damage as a result of the spell def.
Any help here would be hot