Ability giving abilities

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
Wecth
Posts: 13
Joined: April 14th, 2023, 9:07 am

Ability giving abilities

Post by Wecth »

Is it possible to create an ability that can give adjacent units another ability? For example, a version of heal that not only heals adjacent units but gives the adjacent units the heal ability as well.
Shiki
Developer
Posts: 350
Joined: July 13th, 2015, 9:53 pm
Location: Germany

Re: Ability giving abilities

Post by Shiki »

It could be done the same way like it is done with this ability: WML_Abilities#Blitz
Try out the dark board theme.
User avatar
Celtic_Minstrel
Developer
Posts: 2241
Joined: August 3rd, 2012, 11:26 pm
Location: Canada
Contact:

Re: Ability giving abilities

Post by Celtic_Minstrel »

An ability that gives another unit an ability on their attack is possible within the ability system, but I believe what you describe is not. It could be done with events, however. You'd probably use the same approach as the built-in distraction ability – every time a unit moves, spawns, or dies, update every unit on the map to give adjacent units the proxy ability while removing it from any units no longer adjacent.

(Though since healing only happens on side turn, I guess for that case it works to do it in side turn instead of move/spawn/die.)
Author of The Black Cross of Aleron campaign and Default++ era.
Former maintainer of Steelhive.
Post Reply