Follow-up Comment #2, bug #11393 (project wesnoth):
The difficulty is the side of the caster might disappear before the end of
the effect.
My idea is to store somewhere both the side number of the caster
('from_side') and the turn ('until_turn') where whe effect is supposed to end
(turn when the effect was cast +1 for slow).
The idea behind that is to implement slow through a more generic weapon
special WML tag that would set a status (possibly a custom one) on the target
for a limited amount of turns, something like this :
[set_status]
id=slow
status=slowed
duration=1
[/set_status]
This would also allow stoning limited in time, which could be nice for MP.
When the target is hit it would create this variable structure :
[timed_status]
status=slowed
from_side=<side of the caster>
until_turn=<current turn number + duration>
[timed_status]
And set the corresponding status on.
Then on every side turn it would check unit with [timed status].
It would unset the corresponding status if (turn = until_turn and side >=
from_side) or turn > until_turn.
What do you think ?
_______________________________________________________
Reply to this item at:
<http://gna.org/bugs/?11393>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs