UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050610 Firefox/1.0.4 (Debian package 1.0.4-3) IP: 64.81.113.168 URI: http://wesnoth.slack.it/?WishingWell - - - - - #define START_WISH ID MESSAGE [option] id={ID} message={MESSAGE} [command] [object] x,y=$x1,$x2 duration=forever description= "Your wish shall be fulfilled.." #enddef #define END_WISH [/object] [/command] [/option] #enddef #define ATTEMPT_WISH HERO [if] [have_unit] description={HERO} x,y={X},{Y} [/have_unit] [then] [if] [variable] name={HERO}wish numerical_equals=0 [/variable] [then] [message] description={HERO} message=_ "I have already made my wish..." [/message] [/then] [else] [message] speaker=narrator message= _ "You have come across to a wishing well. What would you like to wish for?" [/message] [message] speaker=unit message= _ "With this golden coin, I wish for..." {START_WISH 1 _"speed to catch my enemies."} id=G_Speed_Hack [effect] apply_to=movement increase=1 [/effect] {END_WISH} {START_WISH 2 _"strength to defeat my enemies."} id=G_Power_Hack [effect] apply_to=attack range=short increase_damage=2 [/effect] {END_WISH} {START_WISH 3 _"resilience to withstand blows from my enemies."} id=H_Tough_Hack [effect] apply_to=hitpoints increase_total=10 heal_full=yes [/effect] {END_WISH} {START_WISH 4 _"intelligence to see my potential."} id=H_Intelligence_Hack [effect] apply_to=max_experience increase=-25% [/effect] {END_WISH} [/message] [gold] amount=-1 [/gold] [set_variable] name={HERO1}wishes add=-1## 1 less wish [/set_variable] [message] description={HERO1} message=_ "It worked! Too bad it`s a one shot wonder." [/message] [/else] [/if] [/then] [/if] #enddef #define WISHING_WELL X Y HERO1 HERO2 [event] name=prestart [set_variable] name={HERO1}wishes value=1 [/set_variable] [set_variable] name={HERO2}wishes value=1 [/set_variable] [/event] [event] name=moveto first_time_only=no [filter] side=1 x,y={X},{Y} [/filter] {ATTEMPT_WISH {HERO1}} {ATTEMPT_WISH {HERO2}} [/event] #enddef
||See Also|| * UsefulWMLFragments _______________________________________________ Wesnoth-wiki-changes mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/wesnoth-wiki-changes
