Author: zookeeper
Date: Sun Apr 6 19:57:14 2008
New Revision: 25640
URL: http://svn.gna.org/viewcvs/wesnoth?rev=25640&view=rev
Log:
Got rid of the MOVE_UNIT_FAKE and RANDOM_TRAIT_UNIT macros in SoF.
Modified:
trunk/data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg
trunk/data/campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg
trunk/data/campaigns/Sceptre_of_Fire/scenarios/7_Outriding_of_Outriders.cfg
trunk/data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg
trunk/data/campaigns/Sceptre_of_Fire/scenarios/9_Caverns_of_Flame.cfg
trunk/data/campaigns/Sceptre_of_Fire/scenarios/Epilogue.cfg
trunk/data/campaigns/Sceptre_of_Fire/utils/utils.cfg
Modified: trunk/data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg
(original)
+++ trunk/data/campaigns/Sceptre_of_Fire/scenarios/2_Closing_the_Gates.cfg Sun
Apr 6 19:57:14 2008
@@ -96,42 +96,20 @@
x= 1-3, 4, 5-6, 7-14,15-16, 17, 18, 19, 20,21-22, 23,
24,12-32
y=5-28,7-28,9-28,13-28,18-28,19-28,20-28,21-28,22-28,23-28,25-28,26-28, 9-13
[/remove_shroud]
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=6,3
- side=3)}
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=6,3
- side=3)}
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=6,3
- side=3)}
-
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=30,25
- side=3)}
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=30,25
- side=3)}
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=30,25
- side=3)}
+
+ {GENERIC_UNIT 3 "Troll Whelp" 6 3}
+ {GENERIC_UNIT 3 "Troll Whelp" 6 3}
+ {GENERIC_UNIT 3 "Troll Whelp" 6 3}
+
+ {GENERIC_UNIT 3 "Troll Whelp" 30 25}
+ {GENERIC_UNIT 3 "Troll Whelp" 30 25}
+ {GENERIC_UNIT 3 "Troll Whelp" 30 25}
+
#ifdef HARD
- {RANDOM_TRAIT_UNIT (
- type=Troll
- x,y=30,25
- side=3)}
+ {GENERIC_UNIT 3 "Troll Whelp" 30 25}
#endif
#ifdef NORMAL
- {RANDOM_TRAIT_UNIT (
- type=Troll Whelp
- x,y=30,25
- side=3)}
+ {GENERIC_UNIT 3 "Troll Whelp" 30 25}
#endif
[item]
@@ -197,32 +175,14 @@
speaker=Glindur
message= _ "Unconditional."
[/message]
- {RANDOM_TRAIT_UNIT (
- type=Dwarvish Guardsman
- generate_name=yes
- x,y=10,13
- side=1)}
- {RANDOM_TRAIT_UNIT (
- type=Dwarvish Guardsman
- generate_name=yes
- x,y=14,15
- side=1)}
- {RANDOM_TRAIT_UNIT (
- type=Dwarvish Guardsman
- generate_name=yes
- x,y=12,12
- side=1)}
- {RANDOM_TRAIT_UNIT (
- type=Dwarvish Guardsman
- generate_name=yes
- x,y=14,13
- side=1)}
+
+ {GENERIC_UNIT 3 "Dwarvish Guardsman" 10 13}
+ {GENERIC_UNIT 3 "Dwarvish Guardsman" 14 15}
+ {GENERIC_UNIT 3 "Dwarvish Guardsman" 12 12}
+ {GENERIC_UNIT 3 "Dwarvish Guardsman" 14 13}
+
#ifdef EASY
- {RANDOM_TRAIT_UNIT (
- type=Dwarvish Guardsman
- generate_name=yes
- x,y=12,14
- side=1)}
+ {GENERIC_UNIT 3 "Dwarvish Guardsman" 12 14}
#endif
[unit]
x,y=22,11
Modified:
trunk/data/campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
---
trunk/data/campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg
(original)
+++
trunk/data/campaigns/Sceptre_of_Fire/scenarios/3_Searching_for_the_Runecrafter.cfg
Sun Apr 6 19:57:14 2008
@@ -379,12 +379,14 @@
x=1,5
y=16,28
[/move_unit_fake]
- {RANDOM_TRAIT_UNIT (
- id=Kawn # wmllint: ignore
- name= _ "Kawn"
- type=Gryphon Rider
- x,y=5,28
- side=1)}
+ [unit]
+ id=Kawn # wmllint: ignore
+ name= _ "Kawn"
+ type=Gryphon Rider
+ x,y=5,28
+ side=1
+ random_traits=yes
+ [/unit]
[allow_recruit]
type=Gryphon Rider
[/allow_recruit]
Modified:
trunk/data/campaigns/Sceptre_of_Fire/scenarios/7_Outriding_of_Outriders.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/7_Outriding_of_Outriders.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/scenarios/7_Outriding_of_Outriders.cfg
(original)
+++ trunk/data/campaigns/Sceptre_of_Fire/scenarios/7_Outriding_of_Outriders.cfg
Sun Apr 6 19:57:14 2008
@@ -205,15 +205,19 @@
speaker=Alanin
message= _ "The villagers here are loyal to Wesnoth. They should
be willing to help me escape these elves!"
[/message]
- {RANDOM_TRAIT_UNIT (
- type=Spearman
- id=Rolin # wmllint: ignore
- name= _ "Rolin"
- x,y=$x1,$y1
- side=1
- upkeep=loyal)}
- [message]
- speaker=Rolin # wmllint: ignore
+ [unit]
+ type=Spearman
+ id=Rolin # wmllint: ignore
+ name= _ "Rolin"
+ x,y=$x1,$y1
+ side=1
+ random_traits=yes
+ [modifications]
+ {TRAIT_LOYAL}
+ [/modifications]
+ [/unit]
+ [message]
+ speaker=Rolin # wmllint: ignore
message= _ "We will certainly help any warrior of Wesnoth who
needs our help!"
[/message]
[/event]
@@ -226,20 +230,30 @@
[/filter]
{RANDOM "Spearman,Bowman"}
- {RANDOM_TRAIT_UNIT (
- type=$random
- generate_name=yes
- x,y=$x1,$y1
- side=1
- upkeep=loyal)}
+
+ [unit]
+ type=$random
+ generate_name=yes
+ x,y=$x1,$y1
+ side=1
+ random_traits=yes
+ [modifications]
+ {TRAIT_LOYAL}
+ [/modifications]
+ [/unit]
{RANDOM "Spearman,Bowman"}
- {RANDOM_TRAIT_UNIT (
- type=$random
- generate_name=yes
- x,y=$x1,$y1
- side=1
- upkeep=loyal)}
+
+ [unit]
+ type=$random
+ generate_name=yes
+ x,y=$x1,$y1
+ side=1
+ random_traits=yes
+ [modifications]
+ {TRAIT_LOYAL}
+ [/modifications]
+ [/unit]
[/event]
[event]
@@ -251,15 +265,20 @@
terrain=Ce,Ke
[/filter_location]
[/filter]
- {RANDOM_TRAIT_UNIT (
- type=Lieutenant
- id=Hadlin # wmllint: ignore
- name= _ "Hadlin"
- x,y=10,63
- side=1
- upkeep=loyal)}
- [message]
- speaker=Hadlin # wmllint: ignore
+ [unit]
+ type=Lieutenant
+ id=Hadlin # wmllint: ignore
+ name= _ "Hadlin"
+ x,y=10,63
+ side=1
+ upkeep=loyal
+ random_traits=no
+ [modifications]
+ {TRAIT_LOYAL}
+ [/modifications]
+ [/unit]
+ [message]
+ speaker=Hadlin # wmllint: ignore
message= _ "Who goes there?"
[/message]
[message]
@@ -267,7 +286,7 @@
message= _ "I'm a dragoon, with Haldric II's personal bodyguard. I
was sent on a mission in the northlands, and now elvish horsemen are chasing
me. I barely evaded them."
[/message]
[message]
- speaker=Hadlin # wmllint: ignore
+ speaker=Hadlin # wmllint: ignore
message= _ "I see. Well, come on in. I doubt they would be able to
capture this fort, even if they did want to start a war, which I doubt."
[/message]
[store_unit]
Modified: trunk/data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg (original)
+++ trunk/data/campaigns/Sceptre_of_Fire/scenarios/8_The_Dragon.cfg Sun Apr 6
19:57:14 2008
@@ -130,10 +130,7 @@
[/event]
#define RANDOM_MERCENARY TYPE
- {RANDOM_TRAIT_UNIT (
- type={TYPE}
- x,y=2,14
- side=2)}
+ {GENERIC_UNIT 2 {TYPE} 2 14}
#enddef
[event]
name=start
Modified: trunk/data/campaigns/Sceptre_of_Fire/scenarios/9_Caverns_of_Flame.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/9_Caverns_of_Flame.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/scenarios/9_Caverns_of_Flame.cfg
(original)
+++ trunk/data/campaigns/Sceptre_of_Fire/scenarios/9_Caverns_of_Flame.cfg Sun
Apr 6 19:57:14 2008
@@ -324,11 +324,7 @@
[/event]
#define RANDOM_MERCENARY_2 TYPE
- {RANDOM_TRAIT_UNIT (
- type={TYPE}
- side=2
- x,y=15,4
- generate_name=yes)}
+ {GENERIC_UNIT 2 {TYPE} 15 4}
#enddef
#elves come
@@ -416,32 +412,32 @@
######NOTICE: I don't know why, but sighted events that trigger upon a
human move no longer work (if they ever did). So consider this event broken.
The following one is broken too, but doesn't cause as many problems, so it will
stay in for now.
#seeing the trapped orcs
- # [event]
- # name=sighted
- # [filter]
- # side=1
- # [/filter]
- # [filter_second]
- # side=3,4
- # [/filter_second]
- # {DEBUG_MSG blah}
- # [if]
- # [variable]
- # name=overlayturn
- # equals=0
- # [/variable]
- # [then]
- # [message]
- # id=Rugnur
- # message= _ "Look, those orcs can't get to us!
There's cave wall in the way!"
- # [/message]
- # [message]
- # id=Thursagan
- # message= _ "True; but, perhaps later they will
find a way out."
- # [/message]
- # [/then]
- # [/if]
- # [/event]
+ # [event]
+ # name=sighted
+ # [filter]
+ # side=1
+ # [/filter]
+ # [filter_second]
+ # side=3,4
+ # [/filter_second]
+ # {DEBUG_MSG blah}
+ # [if]
+ # [variable]
+ # name=overlayturn
+ # equals=0
+ # [/variable]
+ # [then]
+ # [message]
+ # id=Rugnur
+ # message= _ "Look, those orcs can't get to us! There's cave
wall in the way!"
+ # [/message]
+ # [message]
+ # id=Thursagan
+ # message= _ "True; but, perhaps later they will find a way
out."
+ # [/message]
+ # [/then]
+ # [/if]
+ # [/event]
#seeing the guards of the glyph
[event]
Modified: trunk/data/campaigns/Sceptre_of_Fire/scenarios/Epilogue.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/scenarios/Epilogue.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/scenarios/Epilogue.cfg (original)
+++ trunk/data/campaigns/Sceptre_of_Fire/scenarios/Epilogue.cfg Sun Apr 6
19:57:14 2008
@@ -109,7 +109,7 @@
name=start
#dialogue starts
#alanin approaches the city
- {MOVE_UNIT_FAKE 18 5 18 5 17 11}
+ {MOVE_UNIT id=Alanin 17 11}
[message]
speaker=Gatekeeper
message= _ "Halt! What is your business in Weldyn, capital of
Wesnoth?"
@@ -122,7 +122,7 @@
speaker=Gatekeeper
message= _ "Very well. You may pass."
[/message]
- {MOVE_UNIT_FAKE 17 11 17 11 17 20}
+ {MOVE_UNIT id=Alanin 17 20}
[message]
speaker=Guard Captain
message= _ "I hear you desire to speak to the king, Alanin. What
do you have to tell him?"
@@ -135,29 +135,7 @@
speaker=Guard Captain
message= _ "Enter, Alanin, and give the king your message."
[/message]
- #MUF
- [store_unit]
- [filter]
- id=Alanin
- [/filter]
- variable=alanin
- kill=yes
- [/store_unit]
- [move_unit_fake]
- x=17,17
- y=20,25
- side=$alanin.side
- type=$alanin.type
- [/move_unit_fake]
- [set_variable]
- name=alanin.y
- value=25
- [/set_variable]
- [unstore_unit]
- variable=alanin
- [/unstore_unit]
- #/MUF
- {MOVE_UNIT_FAKE 17 20 17 20 17 25}
+ {MOVE_UNIT id=Alanin 17 25}
[message]
speaker=Alanin
message= _ "My King, fifteen years ago you sent me on a mission
into the northlands. I have returned. What do you wish to know of my mission?"
Modified: trunk/data/campaigns/Sceptre_of_Fire/utils/utils.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Sceptre_of_Fire/utils/utils.cfg?rev=25640&r1=25639&r2=25640&view=diff
==============================================================================
--- trunk/data/campaigns/Sceptre_of_Fire/utils/utils.cfg (original)
+++ trunk/data/campaigns/Sceptre_of_Fire/utils/utils.cfg Sun Apr 6 19:57:14
2008
@@ -9,38 +9,6 @@
#ifdef HARD
recruit={H}
#endif
-#enddef
-
-#define MOVE_UNIT_FAKE X1 Y1 XM YM X2 Y2
- [store_unit]
- [filter]
- x,y={X1},{Y1}
- [/filter]
- variable=temp
- kill=yes
- [/store_unit]
- [move_unit_fake]
- x={X1},{XM},{X2}
- y={Y1},{YM},{Y2}
- type=$temp.type
- side=$temp.side
- [/move_unit_fake]
- [set_variable]
- name=temp.x
- value={X2}
- [/set_variable]
- [set_variable]
- name=temp.y
- value={Y2}
- [/set_variable]
- [unstore_unit]
- variable=temp
- [/unstore_unit]
- [clear_variable]
- name=temp
- [/clear_variable]
- [redraw]
- [/redraw]
#enddef
#define SOF_DEATHS
@@ -172,28 +140,3 @@
name=temp{VALUE}
[/clear_variable]
#enddef
-
-###################
-#FOLLOWING MACROS BORROWED
-#FROM "FLIGHT TO FREEDOM"
-#BY MADMAX
-###################
-#to be used like this:
-# {RANDOM_TRAIT_UNIT (
-# type=Elvish Champion
-# x=20
-# y=14
-# )}
-
-#define RANDOM_TRAIT_UNIT STATS_WML
- [unit]
- {STATS_WML}
- random_traits=yes
- [/unit]
-#enddef
-
-###################
-#/FOLLOWING MACROS BORROWED
-#/FROM "FLIGHT TO FREEDOM"
-#/BY MADMAX
-###################
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits