Hopefully a definitive cleanup of how the peasants are switched to outlaws.

This commit is contained in:
Lari Nieminen 2008-10-05 17:00:56 +00:00
parent 4a5b30489b
commit 2746bb5140
2 changed files with 40 additions and 20 deletions

View file

@ -267,30 +267,41 @@
message= _ "Today we may no longer be citizens of Wesnoth. I wish it could be otherwise, but we are now outlaws."
[/message]
{CHG_TYPE type=Footpad_Peasant Footpad chaotic}
{CHG_TYPE type=Outlaw_Peasant Outlaw chaotic}
{CHG_TYPE type=Fugitive_Peasant Fugitive chaotic}
{CHG_TYPE type=Thug_Peasant Thug chaotic}
{CHG_TYPE type=Bandit_Peasant Bandit chaotic}
{CHG_TYPE type=Highwayman_Peasant Highwayman chaotic}
{CHG_TYPE type=Poacher_Peasant Poacher chaotic}
{CHG_TYPE type=Trapper_Peasant Trapper chaotic}
{CHG_TYPE type=Huntsman_Peasant Huntsman chaotic}
# Changing the unit type clobbers its portrait pointer if the new
# type has a unit portrait. Make sure Baldras and Harper keep theirs.
{MODIFY_UNIT id=Baldras profile portraits/p_baldras.png}
{MODIFY_UNIT id=Harper profile portraits/p_harper.png}
#clean up duplicates out of the recall list
[store_unit]
variable=cleanup_store
kill=yes
[filter]
type=Footpad_Peasant,Outlaw_Peasant,Fugitive_Peasant,Thug_Peasant,Bandit_Peasant,Highwayman_Peasant,Poacher_Peasant,Trapper_Peasant,Huntsman_Peasant
side=1
[/filter]
kill=yes
variable=stored_peasants
[/store_unit]
{CLEAR_VARIABLE cleanup_store}
{FOREACH stored_peasants i}
[unit]
side=1
type=$stored_peasants[$i].outlaw_type
id=$stored_peasants[$i].id
name=$stored_peasants[$i].name
x,y=$stored_peasants[$i].x,$stored_peasants[$i].y
hitpoints=$stored_peasants[$i].hitpoints
moves=$stored_peasants[$i].moves
experience=$stored_peasants[$i].experience
gender=$stored_peasants[$i].gender
facing=$stored_peasants[$i].facing
profile=$stored_peasants[$i].profile
unrenamable=$stored_peasants[$i].unrenamable
canrecruit=$stored_peasants[$i].canrecruit
overlays=$stored_peasants[$i].overlays
random_traits=$stored_peasants[$i].random_traits
[insert_tag]
name=modifications
variable=stored_peasants[$i].modifications
[/insert_tag]
[/unit]
{NEXT i}
{CLEAR_VARIABLE stored_peasants}
[disallow_recruit]
side=1

View file

@ -12,6 +12,7 @@
id=Thug
[/base_unit]
id=Thug_Peasant
outlaw_type=Thug
name= _ "Peasant"
alignment=neutral
advances_to=Bandit_Peasant
@ -23,6 +24,7 @@
id=Bandit
[/base_unit]
id=Bandit_Peasant
outlaw_type=Bandit
name= _ "Village Elder"
alignment=neutral
advances_to=Highwayman_Peasant
@ -34,6 +36,7 @@
id=Highwayman
[/base_unit]
id=Highwayman_Peasant
outlaw_type=Highwayman
name= _ "Senior Village Elder"
alignment=neutral
hitpoints=67
@ -49,6 +52,7 @@
id=Footpad
[/base_unit]
id=Footpad_Peasant
outlaw_type=Footpad
name= _ "Peasant Youth"
alignment=neutral
hitpoints=28
@ -69,6 +73,7 @@
id=Outlaw
[/base_unit]
id=Outlaw_Peasant
outlaw_type=Outlaw
name= _ "Watchman"
alignment=neutral
hitpoints=40
@ -85,6 +90,7 @@
id=Fugitive
[/base_unit]
id=Fugitive_Peasant
outlaw_type=Fugitive
name= _ "Borderer"
alignment=neutral
hitpoints=61
@ -105,6 +111,7 @@
id=Poacher
[/base_unit]
id=Poacher_Peasant
outlaw_type=Poacher
name= _ "Peasant Hunter"
alignment=neutral
advances_to=Trapper_Peasant
@ -116,6 +123,7 @@
id=Trapper
[/base_unit]
id=Trapper_Peasant
outlaw_type=Trapper
name= _ "Peasant Trapper"
alignment=neutral
experience=98
@ -129,6 +137,7 @@
id=Huntsman
[/base_unit]
id=Huntsman_Peasant
outlaw_type=Huntsman
name= _ "Peasant Huntsman"
alignment=neutral
hitpoints=55