bugBattle for Wesnoth - Bugs: bug #20242, Negative defence values and...

Show feedback again

bug #20242: Negative defence values and [effect]s with apply_to=defense

Submitted by:  None
Submitted on:  Sun 14 Oct 2012 07:03:32 PM UTC  
Category: BugSeverity: 2 - Minor
Priority: 5 - NormalItem Group: WML
Status: FixedPrivacy: Public
Assigned to: J Tyne <jamit>Originator Email: -unavailable-
Open/Closed: ClosedRelease: 1.10+
Operating System: All

Add a New Comment (Rich MarkupRich Markup):

You are not logged in

Please log in, so followups can be emailed to you.


Thu 27 Dec 2012 12:20:46 AM UTC, SVN revision 55936:

Have [effect] apply_to=defense modify absolute values if not replacing the old values.
Thus positive numbers will always make the unit easier to hit, while negative numbers
always make it harder. (bug #20242)

This allows WML authors to not worry about special cases like horsemen in forests. In
addition, should it be decided to change how that case is defined (currently by setting
forest=-70), that change could be done without changing the WML for effects that add to
(or subtract from) defenses.

(Browse SVN revision 55936)

J Tyne <jamit>
Project MemberIn charge of this item.
Sat 20 Oct 2012 01:40:48 AM UTC, comment #4:

Making this report be the primary for the [effect] issue, since it is described clearer here. (Someone looking at bug #20191 could easily overlook the remaining issue.)

J Tyne <jamit>
Project MemberIn charge of this item.
Wed 17 Oct 2012 04:55:01 PM UTC, comment #3:

That workaround would not work quite well for me, but the problem is not serious, it can wait till 1.12.

And it is not a duplicate, that bug is not a bug, just a misunderstanding, but this actually is a bug, related or caused by that misunderstanding.

Tue 16 Oct 2012 06:01:43 PM UTC, comment #2:

This will not change in 1.10.x to avoid OOS problems. It may change in 1.11.

You can probably work around the problem in 1.10 by applying two effects in the object, each with a filter, one of which only applies if the defense is negative and a different one which only applies if the defense is positive.

Simon Forsyth <alarantalara>
Project Member
Tue 16 Oct 2012 05:52:22 PM UTC, comment #1:

Duplicate of bug #20191

Simon Forsyth <alarantalara>
Project Member
Sun 14 Oct 2012 07:03:32 PM UTC, original submission:

This was recently found, if a horseman (might also apply to other units, but I know only about this about horsemen and forests) takes an [object] or [advancement] with apply_to=defense and replace=false, that is supposed to increase his defence on forests, it actually decreases it.

It seems that if the [defense] tag has forest=-70, and the [effect] with say forest=-10 is added to it, it sums up mathematically correctly, gameplay-wise wrongly, resulting in [defense] forest=-80.



(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by shadowmaster (Updated the item)
  • -unavailable- added by jamit (Posted a comment)
  • -unavailable- added by alarantalara (Posted a comment)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.


    Error: not logged in



    Follow 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 26 Mar 2013 12:38:46 PM UTCshadowmasterOpen/ClosedOpen=>Closed
    Thu 27 Dec 2012 12:24:14 AM UTCjamitItem Group None of the others=>WML
      Assigned toNone=>jamit
    Sat 20 Oct 2012 01:40:48 AM UTCjamitStatusDuplicate=>None
    Tue 16 Oct 2012 05:52:22 PM UTCalarantalaraStatusNone=>Duplicate
    Show feedback again

    Back to the top

    Powered by Savane 3.1-cleanup