Combo Attack special
Moderator: Forum Moderators
Forum rules
- Please use [code] BBCode tags in your posts for embedding WML snippets.
- To keep your code readable so that others can easily help you, make sure to indent it following our conventions.
Combo Attack special
Hey, I wanted to add a special to one of my attacks where the final hit would deal double damage. Something like
but with a filter to make it only apply to the final attack in the chain. That possible?
Code: Select all
[damage]
id=combostrike
name= _ "combo strike"
description= _ "Your final attack deals double damage."
multiply=2
cumulative=yes
[/damage]
Re: Combo Attack special
No, I don't think there's any way to do that. You could write an event-based hack solution of some kind, but that wouldn't show up in damage calculations which is kind of essential.
Re: Combo Attack special
I don't know when exactly filters for weapon specials are evaluated during attack prediction but since it's possible to have a filter like
If the game enginge does evalulate filters after every hit you can use a lua filter with an internal counter that returns true every third time (asuming your attack has 3 strikes). Of course this is highly dangerous and even if it turned out to be working in the current wesnoth version it may not wokr in a later wesnoth version.
hitpoints < max_hitpoints / 2
It'd make sense that the game calculates the damage again after every hit. If the game enginge does evalulate filters after every hit you can use a lua filter with an internal counter that returns true every third time (asuming your attack has 3 strikes). Of course this is highly dangerous and even if it turned out to be working in the current wesnoth version it may not wokr in a later wesnoth version.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.
Re: Combo Attack special
Slows affects damage mid-battle, and damage calculations take it into account... maybe (maybe?) you could slow him at the beginning of the battle, and unslow him before the last hit?
The last few months have been nothing but one big, painful reminder that TIMTLTW.
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Creator of Armory Mod, The Rising Underworld, and Voyage of a Drake: an RPG
Re: Combo Attack special
That's because the damage calculations code is hardcoded to specifically take slows into account.Samonella wrote:Slows affects damage mid-battle, and damage calculations take it into account...
This would still be an event-based solution which the damage calculations code couldn't have any knowledge of.Samonella wrote:maybe (maybe?) you could slow him at the beginning of the battle, and unslow him before the last hit?
Re: Combo Attack special
Ok i tested this and it turned out that although in the actual fight the damage does change during the fight it does not during the attack prediction. I filed a bugreport at https://github.com/wesnoth/wesnoth/issues/1836gfgtdf wrote:I don't know when exactly filters for weapon specials are evaluated during attack prediction but since it's possible to have a filter likehitpoints < max_hitpoints / 2
It'd make sense that the game calculates the damage again after every hit.
Scenario with Robots SP scenario (1.11/1.12), allows you to build your units with components, PYR No preperation turn 1.12 mp-mod that allows you to select your units immideately after the game begins.