Adding a new status/condition to a unit

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
Vyncyn
Forum Regular
Posts: 515
Joined: April 6th, 2013, 5:51 pm

Adding a new status/condition to a unit

Post by Vyncyn »

With inspiration form the 4 moon era, I created a new debuff/curse for units.
Basic idea is that they could work like poison and slow and add more variety to the gameplay.

It works by adding a ability or weapon special to the hit enemy, which can get removed either at the end of the turn or when standing in a village. With filter_adjacent it could also be removed via an healing ability, but that's not implemented yet.

The code of one of them is attached:
Weapon special Blinding can add a blind to the enemy attacks (reduces their hitchance and sets vision to 0). Status gets removed at the end of their turn, just like slow. Also adds a blind.png overlay while the unit is affected.

I would like the option to make the status a bit more visible to the user, by coloring the unit, but couldn't figure out how to do that yet. Help would be appreciated
Attachments
blinded.jpg
blinded.jpg (53.04 KiB) Viewed 309 times
blind.png
blind.png (490 Bytes) Viewed 309 times
condition_blind.cfg
(3.67 KiB) Downloaded 21 times
Post Reply