On Mon, 2006-03-13 at 10:46 -0600, Bruno Wolff III wrote:
> On Mon, Mar 13, 2006 at 17:18:46 +1100,
> Rusty Russell <[EMAIL PROTECTED]> wrote:
> >
> > Current poison semantics is that a curer can cure any number of poisoned
> > units at a time "for free" (whether it actually does that seems to
> > depend on ordering of units). If we stick with this, it makes sense
> > that you can be cured of poison multiple times (once by your own healer,
> > once by an allied healer).
> >
> > If we decide that the healing cost of curing poison should be 8 (or
> > whatever cure value is configured), then it should be probably be
> > limited by "healed_this_turn" as well, avoiding double-cures.
>
> Other issues:
> What happens if a unit gets damage healed, gets poisoned and then is next
> to a healer? Can you get both damage healed and poison removal in the same
> turn?
Good question. If you can't get poison-cured then healed in the same
turn, so I guess no healed then poison-cured.
It would be simpler to let all healers treat poison at all times, but it
means standing next to an allied curer plus your own is more powerful
than standing next to two of your own.
Mind you, at the moment if you have two allies, they can stand around
your curer and get 18 HP cured *each* per turn, so maybe perfection is
too much to ask.
> You will also probably need a flag to note if posion has been temporarily
> suspended, as poison damage is applied at a different time if an allied
> curer is blocking poison damage, but not removing the poison status.
True: we need unit->poison_cured and unit->poison_stopped flags, too. I
think if your healer stops poison, an allied curer can still cure it,
because otherwise your healer has done you a disservice! But you cannot
have two different treatments in the same turn (with the exception of
poison-stop then poison-cure, in which case it's as if the former never
happened).
Something like this:
// First of all, we treat poisoning.
if (unit->poisoned()) {
// If already treated, then poisoned, too bad.
if (unit->healed == 0 && !unit->poison_cured) {
if (healer->type().heals() >= game_config::cure_amount) {
unit->poison_cured = true;
unit->remove_flag("poisoned");
} else {
unit->poison_stopped = true;
}
}
}
// Can we treat unit? Only if not poisoned or poison-treated, and
// not healed beyond our ability already this turn.
if (!unit->poisoned() &&
unit->hitpoints() < unit->max_hitpoints() &&
unit->healed < healer->type().heals() &&
!unit->poison_cured && !unit->poison_stopped) {
...;
}
Cheers,
Rusty.
--
ccontrol: http://ozlabs.org/~rusty/ccontrol
_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev