Author: zookeeper
Date: Mon Jun 30 01:02:50 2008
New Revision: 27600
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27600&view=rev
Log:
Rework Black Flag a bit more: removed the guard towers and made there be 4
incoming transport galleons instead, each heading for a random landing spot.
Modified:
trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg
trunk/data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg
Modified: trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg?rev=27600&r1=27599&r2=27600&view=diff
==============================================================================
--- trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg
(original)
+++ trunk/data/campaigns/Son_Of_The_Black_Eye/scenarios/06_Black_Flag.cfg Mon
Jun 30 01:02:50 2008
@@ -94,6 +94,12 @@
no_leader=yes
team_name=Humans
user_team_name=_"Humans"
+
+ [ai]
+ [avoid]
+ x,y=1-10,1-20
+ [/avoid]
+ [/ai]
[/side]
[side]
@@ -157,27 +163,65 @@
{GRUNT_DEFENDER 32 23}
{ARCHER_DEFENDER 31 25}
- {WATCH_TOWER 21 14 Northern_Tower}
- {WATCH_TOWER 12 19 Western_Tower}
- {WATCH_TOWER 20 21 Eastern_Tower}
+ {TRANSPORT_GALLEON 2 26}
+ {TRANSPORT_GALLEON 3 28}
+ {TRANSPORT_GALLEON 5 29}
+ {TRANSPORT_GALLEON 7 29}
+
+ [store_unit]
+ [filter]
+ type=Transport Galleon
+ [/filter]
+
+ kill=yes
+ variable=stored_transports
+ [/store_unit]
+
+ {FOREACH stored_transports i}
+ [store_locations]
+ x=14-28
+ y=14-29
+ terrain=Ww
+
+ [filter_adjacent_location]
+ terrain=Ds,*^Bw*
+ [/filter_adjacent_location]
+
+ [not]
+ find_in=already_picked_transport_destination_surroundings
+ [/not]
+
+ variable=possible_transport_destinations
+ [/store_locations]
+
+ {VARIABLE_OP transport_destination_index random
"1..$possible_transport_destinations.length"}
+ {VARIABLE_OP transport_destination_index add -1}
+
+ {VARIABLE stored_transports[$i].variables.destination_x
$possible_transport_destinations[$transport_destination_index].x}
+ {VARIABLE stored_transports[$i].variables.destination_y
$possible_transport_destinations[$transport_destination_index].y}
+
+ [store_locations]
+ x=$stored_transports[$i].variables.destination_x
+ y=$stored_transports[$i].variables.destination_y
+ radius=2
+
+ [or]
+ find_in=already_picked_transport_destination_surroundings
+ [/or]
+
+ variable=already_picked_transport_destination_surroundings
+ [/store_locations]
+
+ #{VARIABLE stored_transports[$i].name
"$stored_transports[$i].variables.destination_x|,$stored_transports[$i].variables.destination_y"}
+
+ [unstore_unit]
+ variable=stored_transports[$i]
+ [/unstore_unit]
+ {NEXT i}
[unit]
- x,y=1,30
- side=3
- id="Transport Galleon"
- type=Transport Galleon
- [/unit]
-
- {PIRATE_GALLEON 12 28}
- {PIRATE_GALLEON 3 22}
- {PIRATE_GALLEON 10 26}
- {PIRATE_GALLEON 6 25}
-
- [unit]
- side=3
- id=Lander
+ side=2
id="Landing Galleon"
- name= _ "Landing Galleon"
type=Transport Galleon
ai_special=guardian
x=6
@@ -311,9 +355,6 @@
#[/message]
[/event]
- # this event makes the transport galleon try to sail to the sandy coastline
- # near the orcish castle to unload the attackers
-
[event]
name=turn refresh
first_time_only=no
@@ -327,154 +368,120 @@
[then]
[store_unit]
[filter]
- id=Transport Galleon
+ type=Transport Galleon
+ side=3
+
+ [not]
+ [filter_wml]
+ [variables]
+ landed=yes
+ [/variables]
+ [/filter_wml]
+ [/not]
[/filter]
kill=yes
- variable=stored_transport
+ variable=stored_transports
[/store_unit]
- [if]
- [variable]
- name=landing_spot_picked
- equals=yes
- [/variable]
-
- [variable]
- name=transport_landed
- not_equals=yes
- [/variable]
-
- [then]
- {VARIABLE stored_transport.goto_x
$transport_destination_x}
- {VARIABLE stored_transport.goto_y
$transport_destination_y}
-
- [unstore_unit]
- variable=stored_transport
- [/unstore_unit]
- [/then]
-
- [else]
- {VARIABLE stored_transport.goto_x 25}
- {VARIABLE stored_transport.goto_y 27}
-
- [unstore_unit]
- variable=stored_transport
- [/unstore_unit]
- [/else]
- [/if]
-
- {CLEAR_VARIABLE stored_transport}
+ {FOREACH stored_transports i}
+ {VARIABLE stored_transports[$i].goto_x
$stored_transports[$i].variables.destination_x}
+ {VARIABLE stored_transports[$i].goto_y
$stored_transports[$i].variables.destination_y}
+
+ [unstore_unit]
+ variable=stored_transports[$i]
+ [/unstore_unit]
+ {NEXT i}
+
+ [store_unit]
+ [filter]
+ type=Transport Galleon
+ side=3
+
+ [filter_wml]
+ [variables]
+ landed=yes
+ [/variables]
+ [/filter_wml]
+ [/filter]
+
+ kill=yes
+ variable=stored_transports
+ [/store_unit]
+
+ {FOREACH stored_transports i}
+ {VARIABLE stored_transports[$i].moves 0}
+
+ [unstore_unit]
+ variable=stored_transports[$i]
+ [/unstore_unit]
+ {NEXT i}
+
+ {CLEAR_VARIABLE stored_transports}
[/then]
[/if]
[/event]
[event]
name=moveto
+ first_time_only=no
[filter]
- id=Transport Galleon
- x,y=25,27
+ type=Transport Galleon
+
+ [not]
+ [filter_wml]
+ [variables]
+ landed=yes
+ [/variables]
+ [/filter_wml]
+ [/not]
+
+ [filter_wml]
+ [variables]
+ destination_x=$x1
+ destination_y=$y1
+ [/variables]
+ [/filter_wml]
[/filter]
- [store_locations]
- x=21-30
- y=23-29
- terrain=Ww
-
- [filter_adjacent_location]
- terrain=Ds
- [/filter_adjacent_location]
-
- [not]
- [filter]
- [/filter]
- [/not]
-
- variable=possible_transport_destinations
- [/store_locations]
-
- {VARIABLE_OP transport_destination_index random
"1..$possible_transport_destinations.length"}
- {VARIABLE_OP transport_destination_index add -1}
-
- {VARIABLE transport_destination_x
$possible_transport_destinations[$transport_destination_index].x}
- {VARIABLE transport_destination_y
$possible_transport_destinations[$transport_destination_index].y}
-
- {VARIABLE landing_spot_picked yes}
-
- {CLEAR_VARIABLE
possible_transport_destinations,transport_destination_index}
- [/event]
-
- [event]
- name=moveto
-
- [filter]
- id=Transport Galleon
-
- [filter_location]
- terrain=Ww
-
- [filter_adjacent_location]
- terrain=Ds
- [/filter_adjacent_location]
- [/filter_location]
- [/filter]
-
- {VARIABLE transport_landed yes}
- {CLEAR_VARIABLE transport_destination}
-
- [unit]
- id="J'rem"
- type=Fencer
- x,y=$x1,$y1
+ {VARIABLE unit.variables.landed yes}
+
+ {RANDOM 0..2}
+
+ [switch]
+ variable=random
+
+ [case]
+ value=0
+
+ {GENERIC_UNIT 3 Fencer $x1 $y1}
+ {GENERIC_UNIT 3 Swordsman $x1 $y1}
+ {GENERIC_UNIT 3 Mage $x1 $y1}
+ [/case]
+
+ [case]
+ value=1
+
+ {GENERIC_UNIT 3 Cavalryman $x1 $y1}
+ {GENERIC_UNIT 3 Javelineer $x1 $y1}
+ {GENERIC_UNIT 3 Bowman $x1 $y1}
+ [/case]
+
+ [case]
+ value=2
+
+ {GENERIC_UNIT 3 Pikeman $x1 $y1}
+ {GENERIC_UNIT 3 Bowman $x1 $y1}
+ {GENERIC_UNIT 3 Fencer $x1 $y1}
+ [/case]
+ [/switch]
+
+ [message]
side=3
- name= _ "J'rem"
- random_traits=yes
- [/unit]
- [unit]
- type=Fencer
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [unit]
- type=Swordsman
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [unit]
- type=Mage
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [unit]
- type=Cavalryman
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [unit]
- type=Cavalryman
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [unit]
- type=Cavalryman
- x,y=$x1,$y1
- side=3
- generate_name=yes
- random_traits=yes
- [/unit]
- [message]
- id="J'rem"
+ [filter_adjacent]
+ x,y=$x1,$y1
+ [/filter_adjacent]
message= _ "Pillage! Let's plunder these orcs!"
[/message]
[/event]
@@ -535,15 +542,6 @@
speaker=Grüü
message= _ "Well, we have no choice ... I've never tasted
scorpions but I am sure they are good. This journey promises to be fun."
[/message]
- [kill]
- id=Eastern_Tower
- [/kill]
- [kill]
- id=Northern_Tower
- [/kill]
- [kill]
- id=Western_Tower
- [/kill]
[/event]
[EMAIL PROTECTED]/Son_Of_The_Black_Eye/utils/deaths.cfg}
Modified: trunk/data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg?rev=27600&r1=27599&r2=27600&view=diff
==============================================================================
--- trunk/data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg (original)
+++ trunk/data/campaigns/Son_Of_The_Black_Eye/utils/utils.cfg Mon Jun 30
01:02:50 2008
@@ -174,11 +174,10 @@
[/unit]
#enddef
-#define PIRATE_GALLEON X Y
+#define TRANSPORT_GALLEON X Y
[unit]
side=3
- id= "Pirate Galleon"
- type=Pirate Galleon
+ type=Transport Galleon
x={X}
y={Y}
[/unit]
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits