Need help to create a reverse leadership ability or weapon special

The place to post your WML questions and answers.

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.
Post Reply
User avatar
pipapopinguin
Posts: 35
Joined: November 3rd, 2019, 10:36 am

Need help to create a reverse leadership ability or weapon special

Post by pipapopinguin »

I want to create a ability, which I can give an unit and makes its melee damage sacle with the deference of its level and that of its opponent, if the unit with the ability/special has a lower level. I did atually manage to do it a few days ago, but It was basically boosting the unit on attack and then deleting the object. Problem was, that the extra damage wasn't previewed in the pre-calculation-window before the attack, because it was in an event giving the extra powers. The AI would probably not calculate the damage into account and it was not user-friendly. I already deleted that code. So how can I make this ability/weapon special?
Author of Corpse Mod 2, Breeze-Mod,Reflections and don't click here.
User avatar
Lord-Knightmare
Discord Moderator
Posts: 2337
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: Need help to create a reverse leadership ability or weapon special

Post by Lord-Knightmare »

pipapopinguin wrote: May 23rd, 2021, 6:46 pm I want to create a ability, which I can give an unit and makes its melee damage sacle with the deference of its level and that of its opponent, if the unit with the ability/special has a lower level. I did atually manage to do it a few days ago, but It was basically boosting the unit on attack and then deleting the object. Problem was, that the extra damage wasn't previewed in the pre-calculation-window before the attack, because it was in an event giving the extra powers. The AI would probably not calculate the damage into account and it was not user-friendly. I already deleted that code. So how can I make this ability/weapon special?
most add-ons have code for a reverse leadership ability called terror and a weapon special dread. which are what you might be looking for. You might search them up.
Spoiler:
Creator of "War of Legends"
Creator of the Isle of Mists survival scenario.
Maintainer of Forward They Cried
User:Knyghtmare | My Medium
User avatar
pipapopinguin
Posts: 35
Joined: November 3rd, 2019, 10:36 am

Re: Need help to create a reverse leadership ability or weapon special

Post by pipapopinguin »

I actually want an ability giving the weaker unit an advantage, but maybe I can modify it in a way to make it fitting.
Author of Corpse Mod 2, Breeze-Mod,Reflections and don't click here.
Post Reply