[engine] add a [damage_type] special/ability who modify the type of attack used

Brainstorm ideas of possible additions to the game. Read this before posting!

Moderator: Forum Moderators

Forum rules
Before posting a new idea, you must read the following:
Post Reply
newfrenchy83
Code Contributor
Posts: 125
Joined: October 6th, 2017, 12:57 pm

[engine] add a [damage_type] special/ability who modify the type of attack used

Post by newfrenchy83 »

I open this topic to suggest adding the [damage_type] ability/weapon and I have also already posted a git request to https://github.com/wesnoth/wesnoth/pull/7003.

When we want to change the type of an attack we use [object] to apply the change for a limited duration (durtion=end tunr, scenario) or permanently (duration=forever), but it is impossible for this bias to modulate the change of type to specific conditions (fire sword that cannot function in water or opponent immune to holy water).
The case of flaming swords exists in mainline (Httt and Utbs) and I find it quite inconsistent that fighting half submerged can't render the enchantment ineffective until the possessor pulls itself out of the water.

It seems to me that the use of leadership changing attack type exists in Era of Magic, which would suggest that [damage_type] in leadership could be used there to replace quite heavy lua/wml encoding both in volume and for the processor.

Here too I invite you to discuss this idea and refer to the git request for questions on the code itself.
User avatar
Pentarctagon
Project Manager
Posts: 5253
Joined: March 22nd, 2009, 10:50 pm
Location: Earth (occasionally)

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by Pentarctagon »

Well, they are magic after all. They may well be unaffected by water.

If one of the use cases is in Era of Magic, then it'd be good to have inferno8 comment here too.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
newfrenchy83
Code Contributor
Posts: 125
Joined: October 6th, 2017, 12:57 pm

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by newfrenchy83 »

NNot totally, because water can cooler blade and hotest of flame don't be suficient to inflige fire damage.
User avatar
Ravana
Forum Moderator
Posts: 2713
Joined: January 29th, 2012, 12:49 am
Location: Estonia
Contact:

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by Ravana »

There could be interest in way to add multiple different damage types to one attack instead of having to copy the attack and add new type.
gfgtdf
Developer
Posts: 1352
Joined: February 10th, 2013, 2:25 pm

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by gfgtdf »

One could also argue that they are usually only standing in shallow water and not diving, so the sword is probably above the surface and thus uneffected by the water 🤔
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.
User avatar
hermestrismi
Posts: 439
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by hermestrismi »

Ravana wrote: March 18th, 2023, 7:34 pm There could be interest in way to add multiple different damage types to one attack instead of having to copy the attack and add new type.
wait, is that possible ?
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2218
Joined: May 24th, 2010, 5:26 pm
Location: Somewhere in the depths of Irdya, gathering my army to eventually destroy the known world.
Contact:

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by Lord-Knightmare »

hermestrismi wrote: March 20th, 2023, 8:58 pm
Ravana wrote: March 18th, 2023, 7:34 pm There could be interest in way to add multiple different damage types to one attack instead of having to copy the attack and add new type.
wait, is that possible ?
Not for the time being. Might be for the next stable.
Currently, we'd have to make copy-paste attack and just change the type. Like a sword can be both a sword slash (blade) or a sword stab (pierce)
or, a flaming sword is a fire slash or blade slash.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare-:-Friend me on Facebook-:-Follow me on Twitter
User avatar
hermestrismi
Posts: 439
Joined: February 6th, 2016, 11:28 pm
Location: Tunisia
Contact:

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by hermestrismi »

Lord-Knightmare wrote: March 21st, 2023, 7:47 am
hermestrismi wrote: March 20th, 2023, 8:58 pm
Ravana wrote: March 18th, 2023, 7:34 pm There could be interest in way to add multiple different damage types to one attack instead of having to copy the attack and add new type.
wait, is that possible ?
Not for the time being. Might be for the next stable.
Currently, we'd have to make copy-paste attack and just change the type. Like a sword can be both a sword slash (blade) or a sword stab (pierce)
or, a flaming sword is a fire slash or blade slash.
I asked because I tried to do smthg like that before but I didn't completely succeed (it needed a huge work to enable/disable each attack according the terrain and the secondary unit attack) . It will be a nice new function
User avatar
octalot
General Code Maintainer
Posts: 735
Joined: July 17th, 2010, 7:40 pm
Location: Austria

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by octalot »

hermestrismi wrote: March 21st, 2023, 11:32 am I asked because I tried to do smthg like that before but I didn't completely succeed (it needed a huge work to enable/disable each attack according the terrain and the secondary unit attack) . It will be a nice new function
Having a UMC author saying that they'll use it is important, one of the reasons that I've taken so long to respond to these PRs is that I'm wondering about the trade-off between added complexity vs how much will be used. (But most of the delay is that I've had something else in life using up a lot of brainpower.)
  • Would you want different types for different strikes within a single combat?
  • Would you want units to be able to change the attacks of adjacent units, leadership style?
  • What about an ability that changes the opponent's weapon in combat, similar to a "no retaliation" ability?
Changing other units' attacks is difficult, because we need method to work out what happens when two abilities try to change it to different types. That method needs to consistently return the same answer without quirks such as "the ability from the unit on the southeastern hex wins" or "the ability from the unit that was most recently recruited wins".
newfrenchy83
Code Contributor
Posts: 125
Joined: October 6th, 2017, 12:57 pm

Re: [engine] add a [damage_type] special/ability who modify the type of attack used

Post by newfrenchy83 »

octalotwrote:

Having a UMC author saying that they'll use it is important, one of the reasons that I've taken so long to respond to these PRs is that I'm wondering about the trade-off between added complexity vs how much will be used. (But most of the delay is that I've had something else in life using up a lot of brainpower.)

Would you want different types for different strikes within a single combat?
Would you want units to be able to change the attacks of adjacent units, leadership style?
What about an ability that changes the opponent's weapon in combat, similar to a "no retaliation" ability?
my response
Would you want different types for different strikes within a single combat? No, i don't.
Would you want units to be able to change the attacks of adjacent units, leadership style? change type of damage or alignment, yes.
What about an ability that changes the opponent's weapon in combat, similar to a "no retaliation" ability? impose change of alignment or damage typeof opponent, yes, but not impose change of weapon in mid combat.
Post Reply