[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:
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2365
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 »

Another (less important and more complicated) feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time.
You can already do this via EventWML but having an easier to use [damage_style] can be very convenient as well.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
newfrenchy83
Code Contributor
Posts: 172
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 »

i added https://github.com/wesnoth/wesnoth/pull ... 99614d4e10 commit for what [damage_type] choose between primary type or secondary type depending resistance of opponent to each type without have specifie in[filter_oppoent]formula that what will be redundant. i also added code for both type showed in report bar :
double typeshowed in report unit
double typeshowed in report unit
and in attac_prediction windows
double type showed in window
double type showed in window
If concept intessting please return comment.
newfrenchy83
Code Contributor
Posts: 172
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 »

Lord-Knightmare wrote: May 8th, 2023, 4:51 pm
Another (less important and more complicated) feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time.
You can already do this via EventWML but having an easier to use [damage_style] can be very convenient as well.
I hesitate between three possible behaviors for [damage_type]
1) the purely substitutional approach, damage_type replaces the type of the attack by another when the conditions are met.
2) a semi-substitutive approach: the replacement can only be done if the adversary is more vulnerable to the type imposed by [damage_type] than to the original type (this avoids programming a [damage_type] for each original type to be checked ), for the player and the wml developer, it remains more intuitive than the last option below and applicable in the mainline
3) the approach mentioned above, feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time. interesting for extension developers who use wml to achieve this approach

I can program two options out of the three but I have to choose which one will be excluded for me it will be the 1st ([effect]set_type already exists.

I therefore invite those who read this topic to share their opinion with me.
User avatar
Pentarctagon
Project Manager
Posts: 5567
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 »

(3) would likely have implications for things that need to calculate predicted damage (the AI, the damage calculations window, etc). I haven't looked, but I wouldn't expect them to be able to currently handle an attack that deals multiple types of damage at the same time.
99 little bugs in the code, 99 little bugs
take one down, patch it around
-2,147,483,648 little bugs in the code
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2365
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 »

newfrenchy83 wrote: June 18th, 2023, 3:46 pm
Lord-Knightmare wrote: May 8th, 2023, 4:51 pm
Another (less important and more complicated) feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time.
You can already do this via EventWML but having an easier to use [damage_style] can be very convenient as well.
I hesitate between three possible behaviors for [damage_type]
1) the purely substitutional approach, damage_type replaces the type of the attack by another when the conditions are met.
2) a semi-substitutive approach: the replacement can only be done if the adversary is more vulnerable to the type imposed by [damage_type] than to the original type (this avoids programming a [damage_type] for each original type to be checked ), for the player and the wml developer, it remains more intuitive than the last option below and applicable in the mainline
3) the approach mentioned above, feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time. interesting for extension developers who use wml to achieve this approach

I can program two options out of the three but I have to choose which one will be excluded for me it will be the 1st ([effect]set_type already exists.

I therefore invite those who read this topic to share their opinion with me.
All three seem good to me. I have uses for each.
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
newfrenchy83
Code Contributor
Posts: 172
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 »

newfrenchy83 wrote: June 18th, 2023, 3:46 pm

I hesitate between three possible behaviors for [damage_type]
1) the purely substitutional approach, damage_type replaces the type of the attack by another when the conditions are met.
2) a semi-substitutive approach: the replacement can only be done if the adversary is more vulnerable to the type imposed by [damage_type] than to the original type (this avoids programming a [damage_type] for each original type to be checked ), for the player and the wml developer, it remains more intuitive than the last option below and applicable in the mainline
3) the approach mentioned above, feature would be to have mixed damage, e.g. a fire sword that does 50% blade and 50% fire damage at the same time. interesting for extension developers who use wml to achieve this approach

I can program two options out of the three but I have to choose which one will be excluded for me it will be the 1st ([effect]set_type already exists.

I therefore invite those who read this topic to share their opinion with me.
i make my choices: this will be 1) by default and 2) with cumulative=yes
Post Reply