Object giving Regeneration does not work

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
Luke the Flaming
Posts: 215
Joined: October 18th, 2006, 6:25 pm

Object giving Regeneration does not work

Post by Luke the Flaming »

I'm trying to assign (in the side definition) an object to the leader that gives him the "Regeneration" ability (albeit it'll be called "Coral Crown", since it's supposed to be an effect of the item rather than an innate skill of the unit).
It doesn't work and I do not undertand why (I did something similar with [resistance], hitpoints, etc. and they all work; it's only regeneration that fails).
Thanks to anyone who'll be willing to help me! :)

Code: Select all

    [side]
        side=3
        type=Merman Hoplite
            [modifications]
                {TRAIT_INTELLIGENT}
                {TRAIT_STRONG}
                [object]
                    [effect]
                        apply_to=new_ability
                            [abilities]
                                [regenerate]
                                    name= _ "Coral Crown"
                                    description= _ " ... " # It's not important now.
                                    value=8
                                    poison=cured
                                    cumulative=no
                                    id=coral_crown
                                [/regenerate]
                            [/abilities]
                    [/effect]
                [/object]
            [/modifications]
# etc. etc.
O, Wind, if Winter comes, can Spring be far behind?
mich
Translator
Posts: 134
Joined: November 11th, 2008, 8:54 am
Location: Italy

Re: Object giving Regeneration does not work

Post by mich »

For me this piece of code works. Be sure to not test this on the first turn. Infact it seems that regeneration doesn't work at the start of the first turn (for all sides), but for later turns all seems ok. If this is your problem, maybe you can make a bug report.
User avatar
SkyOne
Posts: 1310
Joined: January 3rd, 2009, 7:23 pm

Re: Object giving Regeneration does not work

Post by SkyOne »

Yes, mich is right. (as usual)
I installed your [modifications] tag into A Simple Campaign to test, then Coral Crown shows on the side bar, and it effects both side=1 and side=2 leaders as well. It seems something else is incorrect.
Fate of a Princess/feedback thread: "What is in own heart that is the most important, not who you are."
Drake Campaign: Brave Wings/feedback thread, Naga Campaign: Return of the Monster, Saurian Campaign: Across the Ocean
Northern Forces - now on 1.12 server
User avatar
Luke the Flaming
Posts: 215
Joined: October 18th, 2006, 6:25 pm

Re: Object giving Regeneration does not work

Post by Luke the Flaming »

mich wrote:For me this piece of code works. Be sure to not test this on the first turn. Infact it seems that regeneration doesn't work at the start of the first turn (for all sides), but for later turns all seems ok. If this is your problem, maybe you can make a bug report.
Thanks.
I was not aware that Regeneration is not working on turn 1 (maybe because units are not supposed to be already damaged).
I tested it on later turns and in fact it works!
SkyOne wrote:Yes, mich is right. (as usual)
I installed your [modifications] tag into A Simple Campaign to test, then Coral Crown shows on the side bar, and it effects both side=1 and side=2 leaders as well. It seems something else is incorrect.
I do not know... it works as intended (only for the leader of side=3) in my campaign. Since turn 2, as noted above.
O, Wind, if Winter comes, can Spring be far behind?
Post Reply