Adding a new status/condition to a unit
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.
Adding a new status/condition to a unit
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
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 (53.04 KiB) Viewed 309 times
-
- blind.png (490 Bytes) Viewed 309 times
-
- condition_blind.cfg
- (3.67 KiB) Downloaded 21 times