It would be better to check for race not undead and race not mechanical
instead of just not undead. It may be that currently you don't have any
mechanical units in DiD, but if some get added later thinsg will not work
as intended. That still isn't a "correct" test. What you really need to do
is check for the not_living status of the other unit, but I am not sure how
to do that in WML.

On Sun, Aug 26, 2007 at 14:37:30 -0000,
  [EMAIL PROTECTED] wrote:
> Author: zookeeper
> Date: Sun Aug 26 16:37:29 2007
> New Revision: 19820
> 
> URL: http://svn.gna.org/viewcvs/wesnoth?rev=19820&view=rev
> Log:
> Should fix the growth ability of Ghast in DiD.
> 
> Modified:
>     trunk/data/campaigns/Descent_Into_Darkness/units/ghast.cfg
> 
> Modified: trunk/data/campaigns/Descent_Into_Darkness/units/ghast.cfg
> URL: 
> http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Descent_Into_Darkness/units/ghast.cfg?rev=19820&r1=19819&r2=19820&view=diff
> ==============================================================================
> --- trunk/data/campaigns/Descent_Into_Darkness/units/ghast.cfg (original)
> +++ trunk/data/campaigns/Descent_Into_Darkness/units/ghast.cfg Sun Aug 26 
> 16:37:29 2007
> @@ -22,47 +22,14 @@
>  
>  Special Notes: This unit gains 1 hitpoint added to its maximum whenever it 
> kills a living unit.
>  "+{SPECIAL_NOTES_POISON}
> -    # Growth ability
>      [abilities]
> -        [regenerate]
> -            name=growth
> -            description=_ "Growth"
> -        [/regenerate]
> +        [resistance]
> +            id=growth
> +            name= _ "growth"
> +            description=_ "Growth:
> +This unit gains 1 hitpoint added to its maximum whenever it kills a living 
> unit."
> +        [/resistance]
>      [/abilities]
> -    [event]
> -        name=die
> -        first_time_only=no
> -        [filter]
> -            [not]
> -                race=undead
> -            [/not]
> -        [/filter]
> -        [filter_second]
> -            ability=growth
> -        [/filter_second]
> -        [effect]
> -            unit_type=Ghast
> -            apply_to=hitpoints
> -            increase_total=1
> -        [/effect]
> -        # Store and unstore to show the hitpoint bonus text
> -        [store_unit]
> -            [filter]
> -                x,y=$x2,$y2
> -            [/filter]
> -            kill=yes
> -            variable=ghastTemp
> -        [/store_unit]
> -        [unstore_unit]
> -            variable=ghastTemp
> -            red,green,blue=0,0,255
> -            text="+1"
> -        [/unstore_unit]
> -        [clear_variable]
> -            name=ghastTemp
> -        [/clear_variable]
> -    [/event]
> -
>      die_sound=ghoul-hit.wav
>      {DEFENSE_ANIM "units/ghast-defend.png" "units/ghast.png" ghoul-hit.wav }
>      [movement_costs]
> @@ -144,4 +111,38 @@
>              [/frame]
>          [/animation]
>      [/attack]
> +    [event]
> +        name=die
> +        first_time_only=no
> +        [filter]
> +            [not]
> +                race=undead
> +            [/not]
> +        [/filter]
> +        [filter_second]
> +            type=Ghast
> +        [/filter_second]
> +        [effect]
> +            unit_type=Ghast
> +            apply_to=hitpoints
> +            increase_total=1
> +        [/effect]
> +        # Store and unstore to show the hitpoint bonus text
> +        [store_unit]
> +            [filter]
> +                x,y=$x2,$y2
> +            [/filter]
> +            kill=no
> +            variable=ghast_temp
> +        [/store_unit]
> +        [unstore_unit]
> +            variable=ghast_temp
> +            red,green,blue=0,0,255
> +            text= _ "+1 max HP"
> +        [/unstore_unit]
> +        [clear_variable]
> +            name=ghastTemp
> +            find_vacant=no
> +        [/clear_variable]
> +    [/event]
>  [/unit]
> 
> 
> _______________________________________________
> Wesnoth-commits mailing list
> [EMAIL PROTECTED]
> https://mail.gna.org/listinfo/wesnoth-commits

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to