[Question] Is it possible to make a hit and run trait?

Is it possible to make a trait, or special attack, that allows you to attack and then moves you back a space or allows you to move again 1 space?

13,387 views 25 replies
Reply #1 Top

Yes.

Reply #2 Top

How would I go about this?

Reply #3 Top

Look at the rush skill... notice that this grants you another turn immediately after you own. Use the <ApplyToCaster> tag and use that same initiative boost to yourself.

Secondly, look at hobble. Use the <ApplyToCaster> tag on this as well and set a duration of 2 turns.

Thirdly, look at the modifier DefendableDamage (The impale, spear attack, double strike all of these skills use it)

This will allow a character to attack and have a second turn to run away 1 space... or attack again. sort of a quick hit instead of a hit and run.

 

Althouth I haven't tried this you may consider the knockback ability done with the sheild bash and see the effects of this when you use <ApplyToCaster> tag. I'm not sure of the effects this will actually do.

***You could also set the attack to 0 for a duration of 2 rounds as well.*** that would prevent physical attacking.

***You could also add the silence ability for 2 rounds as well*** stop them from casting spells.

Reply #4 Top

Ok, that makes how to make an additional move skill after attack.  Now how do I limit the movement to only 1 square instead of full movement so the skill is not overpowered?

Reply #5 Top

Quoting halmal242, reply 4

Ok, that makes how to make an additional move skill after attack.  Now how do I limit the movement to only 1 square instead of full movement so the skill is not overpowered?

You didn't read the hobble effect did you?

Reply #6 Top

Gah didn't realize that was a two part answer just thought it was a rehash, I will dig now.

Reply #7 Top

No problems ;).

The entire post was a model on how to do what you want it to do. I don't know how to stop ability usage though.

Reply #8 Top

Yeah that is what I was trying to restrict.  I was thinking there might be a way to do a reverse pushback effect but was not sure how to go about it.

Reply #9 Top

Basically the thought was would this effect work but changing the target type to self?

Code: xml
  1. &lt;SpellDef InternalName="Knockback_Effect"&gt;
  2. &lt;DisplayName&gt;Knockback Effect&lt;/DisplayName&gt;
  3. &lt;Description&gt;Knocks victims back 2 tiles unless they resist.&lt;/Description&gt;
  4. &lt;IconFG&gt;T_TitansBreath_Icon.png&lt;/IconFG&gt;
  5. &lt;SpellBookSortCategory&gt;Unit&lt;/SpellBookSortCategory&gt;
  6. &lt;SpellBookSortSubCategory&gt;Other&lt;/SpellBookSortSubCategory&gt;
  7. &lt;SpellType&gt;Tactical&lt;/SpellType&gt;
  8. &lt;SpellClass&gt;Offensive&lt;/SpellClass&gt;
  9. &lt;SpellSubClass&gt;Debuff&lt;/SpellSubClass&gt;
  10. &lt;SpellTargetType&gt;EnemyUnit&lt;/SpellTargetType&gt;
  11. &lt;HideInHiergamenon&gt;1&lt;/HideInHiergamenon&gt;
  12. &lt;IsCastable&gt;0&lt;/IsCastable&gt;
  13. &lt;IsResistable&gt;1&lt;/IsResistable&gt;
  14. &lt;GameModifier&gt;
  15. &lt;ModType&gt;TacticalUnit&lt;/ModType&gt;
  16. &lt;Attribute&gt;TargetMovesBack&lt;/Attribute&gt;
  17. &lt;Value&gt;2&lt;/Value&gt;
  18. &lt;/GameModifier&gt;
  19. &lt;AIData AIPersonality="AI_General"&gt;
  20. &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  21. &lt;/AIData&gt;
  22. &lt;HitSoundFX&gt;Spell_Knockback_01&lt;/HitSoundFX&gt;
  23. &lt;SpellDefEffect&gt;
  24. &lt;EffectName&gt;T_TitansBreath_Particle&lt;/EffectName&gt;
  25. &lt;LocalPosition&gt;0,0,0&lt;/LocalPosition&gt;
  26. &lt;EffectScale&gt;0.25&lt;/EffectScale&gt;
  27. &lt;EffectDelay&gt;0&lt;/EffectDelay&gt;
  28. &lt;SnapToTerrain&gt;1&lt;/SnapToTerrain&gt;
  29. &lt;/SpellDefEffect&gt;
  30. &lt;/SpellDef&gt;

Reply #10 Top

Its the knockback ability done with the shield bash. I just don't know what the effects would be for that.

        <GameModifier>
             <ModType>TacticalUnit</ModType>
            <Attribute>TargetMovesBack</Attribute>
            <ApplyToCaster>1</ApplyToCaster>
             <Value>1</Value>
        </GameModifier>

This is the modifier that you are intending. But I figured you wanted more of a choice of the run with the spell.

Reply #11 Top

Bah, I was just about to post another way to do this. Oh well.

Reply #12 Top

Yeah, try it out and see what happens.

Reply #13 Top

Quoting BlackRainZ, reply 11

Bah, I was just about to post another way to do this. Oh well.

What was your way of accomplishing this effect.

Reply #14 Top

Alright here is the basic idea not sure if it works or not but here it is;

Code: xml
  1. &lt;AbilityBonus InternalName="HitandRunAbility"&gt;
  2. &lt;AbilityBonusType&gt;Unit_Level&lt;/AbilityBonusType&gt;
  3. &lt;AbilityBonusOption InternalName="HitandRun"&gt;
  4. &lt;DisplayName&gt;Hit and Run&lt;/DisplayName&gt;
  5. &lt;Description&gt;Allows the unit to use the Hit and Run ability, allows a normal attack and then moves your character back one square.&lt;/Description&gt;
  6. &lt;Icon&gt;Ability_TrueStrike_Icon.png&lt;/Icon&gt;
  7. &lt;GameModifier&gt;
  8. &lt;ModType&gt;Unit&lt;/ModType&gt;
  9. &lt;Attribute&gt;UnlockCombatAbility&lt;/Attribute&gt;
  10. &lt;StrVal&gt;HitandRunStrike&lt;/StrVal&gt;
  11. &lt;Provides&gt;Attack and then move back one square.&lt;/Provides&gt;
  12. &lt;/GameModifier&gt;
  13. &lt;IsCombatAbility&gt;1&lt;/IsCombatAbility&gt;
  14. &lt;Type&gt;Ability&lt;/Type&gt;
  15. &lt;AIData AIPersonality="AI_General"&gt;
  16. &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  17. &lt;/AIData&gt;
  18. &lt;/AbilityBonusOption&gt;
  19. &lt;/AbilityBonus&gt;
  20. &lt;SpellDef InternalName="HitandRunStrike"&gt;
  21. &lt;DisplayName&gt;Hit and Run&lt;/DisplayName&gt;
  22. &lt;Description&gt;Attack and then move back one square.&lt;/Description&gt;
  23. &lt;IconFG&gt;Ability_TrueStrike_Icon.png&lt;/IconFG&gt;
  24. &lt;Cooldown&gt;3&lt;/Cooldown&gt;
  25. &lt;SpellBookSortCategory&gt;Unit&lt;/SpellBookSortCategory&gt;
  26. &lt;SpellBookSortSubCategory&gt;UnitDamage&lt;/SpellBookSortSubCategory&gt;
  27. &lt;SpellType&gt;Tactical&lt;/SpellType&gt;
  28. &lt;SpellClass&gt;Offensive&lt;/SpellClass&gt;
  29. &lt;SpellSubClass&gt;Damage&lt;/SpellSubClass&gt;
  30. &lt;SpellTargetType&gt;EnemyUnit&lt;/SpellTargetType&gt;
  31. &lt;ApproachTargetTile&gt;1&lt;/ApproachTargetTile&gt;
  32. &lt;HideInHiergamenon&gt;1&lt;/HideInHiergamenon&gt;
  33. &lt;IsCastable&gt;0&lt;/IsCastable&gt;
  34. &lt;CanBeDodged&gt;1&lt;/CanBeDodged&gt;
  35. &lt;IsSpecialAbility&gt;1&lt;/IsSpecialAbility&gt;
  36. &lt;UseWeaponRange&gt;1&lt;/UseWeaponRange&gt;
  37. &lt;GameModifier&gt;
  38. &lt;ModType&gt;Unit&lt;/ModType&gt;
  39. &lt;Attribute&gt;DefendableDamage&lt;/Attribute&gt;
  40. &lt;/GameModifier&gt;
  41. &lt;GameModifier&gt;
  42. &lt;ModType&gt;Unit&lt;/ModType&gt;
  43. &lt;ApplyToCaster&gt;1&lt;/ApplyToCaster&gt;
  44. &lt;Attribute&gt;TargetMovesBack&lt;/Attribute&gt;
  45. &lt;Value&gt;1&lt;/Value&gt;
  46. &lt;/GameModifier&gt;
  47. &lt;AIData AIPersonality="AI_General"&gt;
  48. &lt;AIPriority&gt;5&lt;/AIPriority&gt;
  49. &lt;/AIData&gt;
  50. &lt;CasterAnimationType&gt;27&lt;/CasterAnimationType&gt;
  51. &lt;HitSoundFX&gt;Spell_DoubleStrike_01&lt;/HitSoundFX&gt;
  52. &lt;SpellDefEffect&gt;
  53. &lt;EffectName&gt;Y_DoubleStrike_Particle&lt;/EffectName&gt;
  54. &lt;LocalPosition&gt;0,0,0&lt;/LocalPosition&gt;
  55. &lt;EffectScale&gt;1&lt;/EffectScale&gt;
  56. &lt;EffectDelay&gt;0&lt;/EffectDelay&gt;
  57. &lt;SnapToTerrain&gt;1&lt;/SnapToTerrain&gt;
  58. &lt;/SpellDefEffect&gt;
  59. &lt;/SpellDef&gt;

I was thinking about making the prereq for this ability be the Assassin Path going along with the mobile warrior theme and helping keep it alive in direct combat.

Reply #15 Top

Another approach to this although doesn't look that nice is to provide the ability to attack with a range of 2 instead of one. Call it a hit and run and it is effectively the same thing. I think that this approach would work for the mobile warrior effect you are seeking, since it would also make anyone close to the assassin in striking distance.

Reply #16 Top

Meh you are making things to easy :)  I like to make my life more difficult....

Reply #17 Top

Meh for some reason the game doesn't like it.

Reply #18 Top

I didn't think that it would work (or if it did, not anyway predictable) with the knockback ability. So it comes down to the first method I presented or the attack with the range of 2.

Reply #19 Top

Will likely use the attack range 2 as it achieves the same thing I am looking to do.  Thanks for the ideas though.

Reply #20 Top

Is it not working>> Explain to me exactly what you want to do and what isn't working. 

Or if it is working the way you want then there is no need for further help heh.

Reply #21 Top

Alright I set it to unlock within the Assassin Path and the ability shows up but the move back function does not work.  I think its being resisted automatically.

Reply #23 Top

Yeah this doesn't work:

 

  1. <GameModifier>
  2. <ModType>Unit</ModType>
  3. <ApplyToCaster>1</ApplyToCaster>
  4. <Attribute>TargetMovesBack</Attribute>
  5. <Value>1</Value>
  6. </GameModifier>
You will have to use other commands to do what you want. It is easy enough to give yourself another turn after you attack but you will have to limit movement instead and limit attack and spells.
Reply #24 Top

Yup, the 4th post has all those details in it :), but I think the attack within a 2 range is a cleaner (easier) solution.

Reply #25 Top

I just used the range of 2 instead.  It works for the same purpose but does not have the graphics of rushing in attacking and then backing up.