merged syncpoint_gettext1_2 from trunk
18
configure.ac
|
@ -23,6 +23,23 @@ AM_GNU_GETTEXT
|
|||
|
||||
AC_PROG_CXX
|
||||
AC_PROG_CC
|
||||
have_libx11='no'
|
||||
if test "$with_x" != 'no'; then
|
||||
|
||||
dnl Locate X include files and libraries
|
||||
AC_PATH_XTRA
|
||||
NEW_LIBS="$X_LIBS -lX11"
|
||||
|
||||
AC_CHECK_LIB(X11, XOpenDisplay, have_libx11='yes',have_libx11='no',$X_LIBS)
|
||||
if test "$have_libx11" != 'no'; then
|
||||
AC_DEFINE(HAVE_LIBX11,,Define if you have X11 libraries)
|
||||
X_LIBS="$NEW_LIBS"
|
||||
CPPFLAGS="$X_CFLAGS $CPPFLAGS"
|
||||
LIBS="$X_LIBS $LIBS"
|
||||
fi
|
||||
fi
|
||||
|
||||
AM_CONDITIONAL([X11], [test "$have_libx11" = 'yes'])
|
||||
|
||||
# SDL_CONFIG
|
||||
|
||||
|
@ -383,7 +400,6 @@ AM_CONDITIONAL([GNOME1], [test x$gnome = xyes && test x$gnome1found = xyes])
|
|||
AM_CONDITIONAL([GNOME2], [test x$gnome = xyes && test x$gnome1found = xno])
|
||||
AM_CONDITIONAL([GCC], [test x$GXX = xyes])
|
||||
AM_CONDITIONAL([WZIP], [test x$wzip = xyes])
|
||||
AM_CONDITIONAL([X11], [false])
|
||||
AM_CONDITIONAL([INCLUDEDINTL], [test x$nls_cv_use_gnu_gettext = xyes])
|
||||
|
||||
#######################################################################
|
||||
|
|
|
@ -1083,6 +1083,7 @@
|
|||
# XXX Campaigns separation not enabled in 0.7.10-CVS for backward compatibility
|
||||
# of savegames. To be enabled sometime in the future...
|
||||
# ifdef CAMPAIGN_HEIR_TO_THE_THRONE
|
||||
{scenarios/Heir_To_The_Throne_Map.cfg}
|
||||
{scenarios/Heir_To_The_Throne}
|
||||
# endif
|
||||
# ifdef CAMPAIGN_THE_DARK_HORDES
|
||||
|
|
|
@ -10,8 +10,8 @@ ggggggggggggggggggggggggggggggggggggg
|
|||
ggggggggggggggggggggggggggggggggggggg
|
||||
ggggggggggggggggggggggggggggggggggggg
|
||||
ggggggggggggggggggggggggggggggggggggg
|
||||
ggggggggggggggggggggggggggggggggggggg
|
||||
ggggggggggggggggggggggggggggggggggggg
|
||||
gggggggggggggggggggggCCCggggggggggggg
|
||||
gggggggggggggggggggggCCCggggggggggggg
|
||||
ggggggggggggggggggggggggggggggggggggg
|
||||
ggnnKnggggggggggggggggggggggggggggggg
|
||||
gggnngggggggggggggggggggggggggggggggg
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[scenario]
|
||||
name="A Choice Must Be Made"
|
||||
map_data="{maps/Heir_To_The_Throne/A_Choice_Must_Be_Made}"
|
||||
turns=40
|
||||
turns=30
|
||||
|
||||
id=A_Choice_Must_Be_Made
|
||||
|
||||
|
@ -12,6 +12,8 @@
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
{BIGMAP_A_CHOICE_MUST_BE_MADE}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
@Defeat either of the enemy leaders
|
||||
|
@ -51,7 +53,7 @@ Defeat:
|
|||
side=3
|
||||
controller=ai
|
||||
canrecruit=1
|
||||
{GOLD 250 300 500}
|
||||
{GOLD 150 250 400}
|
||||
|
||||
#ifdef EASY
|
||||
recruit=Skeleton,Revenant,Chocobone,Blood Bat,Ghost,Bone Shooter
|
||||
|
|
|
@ -24,6 +24,8 @@ Defeat:
|
|||
#Death of Konrad
|
||||
#Turns run out"
|
||||
|
||||
{BIGMAP_BAY_OF_PEARLS}
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 188 414}
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
{BIGMAP_BLACKWATER_PORT}
|
||||
|
||||
turns=12
|
||||
|
||||
id=Blackwater_Port
|
||||
|
@ -25,16 +27,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Death of Sir Kaylan"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 250 341}
|
||||
{DOT 242 337}
|
||||
{DOT 234 341}
|
||||
{DOT 226 345}
|
||||
{DOT 221 354}
|
||||
{DOT 219 364}
|
||||
{CROSS 219 377}
|
||||
[/bigmap]
|
||||
{BIGMAP_BLACKWATER_PORT}
|
||||
|
||||
[label]
|
||||
x,y=26,8
|
||||
|
|
|
@ -14,14 +14,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Death of Kalenz"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 128 297}
|
||||
{DOT 144 292}
|
||||
{DOT 154 284}
|
||||
{DOT 173 283}
|
||||
{CROSS 189 282}
|
||||
[/bigmap]
|
||||
{BIGMAP_CROSSROADS}
|
||||
|
||||
{DAWN}
|
||||
{MORNING}
|
||||
|
|
|
@ -15,10 +15,7 @@
|
|||
|
||||
music="wesnoth-4.ogg"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{CROSS 378 140}
|
||||
[/bigmap]
|
||||
{BIGMAP_DWARVEN_DOORS}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
|
|
|
@ -7,13 +7,13 @@ ffffffffffccffffffff
|
|||
fffffffffffcffffffff
|
||||
fffffffffffcffffffff
|
||||
fffffffffffccfffffff
|
||||
ffffffffffvfcfffffff
|
||||
fffffffvCCCfcfffffff
|
||||
ffffffCCC1Cvcfffffff
|
||||
fffffffffftfcfffffff
|
||||
ffffffftCCCfcfffffff
|
||||
ffffffCCC1Ctcfffffff
|
||||
ffffffC2CCCfcfffffff
|
||||
fffffvCCC3Cvcfffffff
|
||||
fffffffCCvCfcfffffff
|
||||
fffffffvffffcfffffff
|
||||
ffffftCCC3Ctcfffffff
|
||||
fffffffCCtCfcfffffff
|
||||
ffffffftffffcfffffff
|
||||
ffffffffffffcfffffff
|
||||
ffffffffffffccffffff
|
||||
fffffffffffffcffffff
|
||||
|
@ -30,6 +30,8 @@ fffffffffffffcffffff"
|
|||
id=Elven_Council
|
||||
next_scenario=valley_statue
|
||||
|
||||
{BIGMAP_HOME_OF_THE_NORTH_ELVES}
|
||||
|
||||
{DAWN}
|
||||
{MORNING}
|
||||
{AFTERNOON}
|
||||
|
@ -309,7 +311,7 @@ fffffffffffffcffffff"
|
|||
message="All routes are dangerous, though there is some hope along this path. Rest, and then go forth, friends. Fortune has smiled upon you so far, despite great dangers. Perhaps she will continue to do so."
|
||||
[/message]
|
||||
[endlevel]
|
||||
result=continue
|
||||
result=continue_no_save
|
||||
[/endlevel]
|
||||
[/event]
|
||||
[/scenario]
|
||||
|
|
|
@ -24,19 +24,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 406 311}
|
||||
{DOT 387 313}
|
||||
{DOT 369 318}
|
||||
{DOT 353 320}
|
||||
{DOT 340 322}
|
||||
{DOT 326 322}
|
||||
{DOT 309 326}
|
||||
{DOT 291 328}
|
||||
{DOT 272 338}
|
||||
{CROSS 259 352}
|
||||
[/bigmap]
|
||||
{BIGMAP_ELVES_BESIEGED}
|
||||
|
||||
{STARTING_VILLAGES 5 10}
|
||||
{STARTING_VILLAGES 6 10}
|
||||
|
|
|
@ -15,13 +15,7 @@
|
|||
|
||||
music="wesnoth-2.ogg"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 305 202}
|
||||
{DOT 313 195}
|
||||
{DOT 321 188}
|
||||
{CROSS 321 182}
|
||||
[/bigmap]
|
||||
{BIGMAP_FORD_OF_ABEZ}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
|
|
|
@ -23,18 +23,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Death of Kalenz"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[dot]
|
||||
{DOT 262 225}
|
||||
{DOT 272 214}
|
||||
{DOT 288 207}
|
||||
{CROSS 298 208}
|
||||
type=cross
|
||||
x=187
|
||||
y=187
|
||||
[/dot]
|
||||
[/bigmap]
|
||||
{BIGMAP_GRYPHON_MOUNTAIN}
|
||||
|
||||
[item]
|
||||
x=10
|
||||
|
|
|
@ -19,14 +19,7 @@ Defeat:
|
|||
#Death of Kalenz
|
||||
#Death of Li'sar"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[dot]
|
||||
type=cross
|
||||
x=127
|
||||
y=226
|
||||
[/dot]
|
||||
[/bigmap]
|
||||
{BIGMAP_HASTY_ALLIANCE}
|
||||
|
||||
[side]
|
||||
type=Commander
|
||||
|
|
|
@ -24,12 +24,7 @@ Defeat:
|
|||
#Death of Li'sar
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 336 180}
|
||||
{DOT 344 174}
|
||||
{CROSS 354 167}
|
||||
[/bigmap]
|
||||
{BIGMAP_TEST_OF_THE_CLANS}
|
||||
|
||||
[side]
|
||||
team_name=elves
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
turns=30
|
||||
turns=18
|
||||
id=North_Elves
|
||||
next_scenario=Elven_Council
|
||||
|
||||
|
@ -24,12 +24,7 @@ Defeat:
|
|||
#Death of Li'sar
|
||||
#Turns run out before reaching the forest"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 336 180}
|
||||
{DOT 344 174}
|
||||
{CROSS 354 167}
|
||||
[/bigmap]
|
||||
{BIGMAP_HOME_OF_THE_NORTH_ELVES}
|
||||
|
||||
[side]
|
||||
team_name=elves
|
||||
|
@ -52,6 +47,16 @@ Defeat:
|
|||
[ai]
|
||||
recruitment_pattern=scout,scout,fighter,fighter,archer
|
||||
[/ai]
|
||||
[ai]
|
||||
time_of_day=dusk
|
||||
aggression=0.7
|
||||
caution=0.25
|
||||
[/ai]
|
||||
[ai]
|
||||
time_of_day=first_watch,second_watch
|
||||
aggression=1.0
|
||||
caution=0.0
|
||||
[/ai]
|
||||
{GOLD 200 300 400}
|
||||
{INCOME 20 20 30}
|
||||
[/side]
|
||||
|
@ -80,6 +85,16 @@ Defeat:
|
|||
value=100
|
||||
[/target]
|
||||
[/ai]
|
||||
[ai]
|
||||
time_of_day=dawn
|
||||
aggression=0.7
|
||||
caution=0.25
|
||||
[/ai]
|
||||
[ai]
|
||||
time_of_day=morning,afternoon
|
||||
aggression=1.0
|
||||
caution=0.0
|
||||
[/ai]
|
||||
{GOLD 200 300 400}
|
||||
{INCOME 15 30 40}
|
||||
|
||||
|
|
|
@ -31,14 +31,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 219 377}
|
||||
{DOT 217 385}
|
||||
{DOT 211 390}
|
||||
{DOT 205 395}
|
||||
{CROSS 198 401}
|
||||
[/bigmap]
|
||||
{BIGMAP_ISLE_OF_ANDUIN}
|
||||
|
||||
[side]
|
||||
race=Elves
|
||||
|
|
|
@ -23,18 +23,8 @@ Defeat:
|
|||
|
||||
disallow_recall=yes
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 162 367}
|
||||
{DOT 158 372}
|
||||
{DOT 151 379}
|
||||
{DOT 137 385}
|
||||
{DOT 122 383}
|
||||
{DOT 109 377}
|
||||
{DOT 99 369}
|
||||
{DOT 94 374}
|
||||
{CROSS 93 386}
|
||||
[/bigmap]
|
||||
|
||||
{BIGMAP_ISLES_OF_THE_DAMNED}
|
||||
|
||||
[item]
|
||||
x=6
|
||||
|
|
|
@ -15,12 +15,7 @@
|
|||
|
||||
music="wesnoth-6.ogg"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 354 167}
|
||||
{DOT 355 157}
|
||||
{CROSS 356 147}
|
||||
[/bigmap]
|
||||
{BIGMAP_MOUNTAIN_PASS}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
|
|
|
@ -22,14 +22,7 @@ Defeat:
|
|||
#Death of Konrad
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 164 348}
|
||||
{DOT 158 340}
|
||||
{DOT 142 338}
|
||||
{DOT 127 340}
|
||||
{CROSS 122 331}
|
||||
[/bigmap]
|
||||
{BIGMAP_MUFF_MALAL_PENINSULA}
|
||||
|
||||
[side]
|
||||
race=Elves
|
||||
|
|
|
@ -24,12 +24,7 @@ Defeat:
|
|||
#Death of Kalenz
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 336 180}
|
||||
{DOT 344 174}
|
||||
{CROSS 354 167}
|
||||
[/bigmap]
|
||||
{BIGMAP_MUFF_MALAL_PENINSULA}
|
||||
|
||||
[side]
|
||||
race=Elves
|
||||
|
|
|
@ -10,14 +10,7 @@
|
|||
|
||||
music="underground.ogg"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[dot]
|
||||
type=cross
|
||||
x=187
|
||||
y=187
|
||||
[/dot]
|
||||
[/bigmap]
|
||||
{BIGMAP_PLUNGING_INTO_THE_DARKNESS}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
|
|
|
@ -36,15 +36,7 @@ Defeat:
|
|||
#Death of Kalenz
|
||||
#Turns run out"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 189 282}
|
||||
{DOT 205 282}
|
||||
{DOT 219 280}
|
||||
{DOT 231 274}
|
||||
{DOT 240 270}
|
||||
{CROSS 250 264}
|
||||
[/bigmap]
|
||||
{BIGMAP_PRINCESS_OF_WESNOTH}
|
||||
|
||||
[label]
|
||||
x,y=12,16
|
||||
|
|
|
@ -25,9 +25,7 @@ Defeat:
|
|||
|
||||
{deaths.cfg}
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[/bigmap]
|
||||
{BIGMAP_RETURN_TO_WESNOTH}
|
||||
|
||||
[side]
|
||||
type=Commander
|
||||
|
|
|
@ -29,14 +29,7 @@ Defeat:
|
|||
#Death of Kalenz
|
||||
#Death of Li'sar"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[dot]
|
||||
type=cross
|
||||
x=127
|
||||
y=226
|
||||
[/dot]
|
||||
[/bigmap]
|
||||
{BIGMAP_SCEPTER_OF_FIRE}
|
||||
|
||||
[event]
|
||||
name=start
|
||||
|
|
|
@ -13,6 +13,8 @@
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
{BIGMAP_SNOW_PLAINS}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
@Defeat enemy leader
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
[scenario]
|
||||
name="Swamp Of Dread"
|
||||
map_data="{maps/Heir_To_The_Throne/Swamp_Of_Dread}"
|
||||
turns=40
|
||||
turns=30
|
||||
|
||||
id=Swamp_Of_Dread
|
||||
next_scenario="North_Elves"
|
||||
|
@ -13,6 +13,8 @@
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
{BIGMAP_SWAMP_OF_DREAD}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
@Defeat all enemy leaders
|
||||
|
@ -33,6 +35,20 @@ Defeat
|
|||
hitpoints=80
|
||||
[/side]
|
||||
|
||||
#define SWAMP_DREAD_AI_PARAMS
|
||||
[ai]
|
||||
time_of_day=dusk
|
||||
turns=8-100
|
||||
caution=0.25
|
||||
aggression=0.8
|
||||
[/ai]
|
||||
[ai]
|
||||
time_of_day=first_watch,second_watch
|
||||
caution=0.0
|
||||
aggression=1.0
|
||||
[/ai]
|
||||
#enddef
|
||||
|
||||
[side]
|
||||
type=Death Knight
|
||||
description=Clarustus
|
||||
|
@ -44,6 +60,7 @@ Defeat
|
|||
[ai]
|
||||
{NO_SCOUTS}
|
||||
[/ai]
|
||||
{SWAMP_DREAD_AI_PARAMS}
|
||||
team_name=undead
|
||||
[/side]
|
||||
|
||||
|
@ -55,6 +72,7 @@ Defeat
|
|||
canrecruit=1
|
||||
recruit=Ghost,Skeleton,Walking Corpse
|
||||
{GOLD 100 200 300}
|
||||
{SWAMP_DREAD_AI_PARAMS}
|
||||
team_name=undead
|
||||
[/side]
|
||||
|
||||
|
@ -67,6 +85,7 @@ Defeat
|
|||
recruit=Wraith,Vampire Bat,Skeleton
|
||||
{GOLD 100 200 300}
|
||||
team_name=undead
|
||||
{SWAMP_DREAD_AI_PARAMS}
|
||||
[/side]
|
||||
|
||||
[side]
|
||||
|
@ -79,6 +98,7 @@ Defeat
|
|||
[ai]
|
||||
{NO_SCOUTS}
|
||||
[/ai]
|
||||
{SWAMP_DREAD_AI_PARAMS}
|
||||
{GOLD 80 150 200}
|
||||
team_name=undead
|
||||
[/side]
|
||||
|
@ -92,6 +112,7 @@ Defeat
|
|||
recruit=Skeleton Archer,Walking Corpse,Ghost
|
||||
{GOLD 80 150 200}
|
||||
team_name=undead
|
||||
{SWAMP_DREAD_AI_PARAMS}
|
||||
[/side]
|
||||
|
||||
[event]
|
||||
|
@ -115,66 +136,5 @@ Defeat
|
|||
description=Konrad
|
||||
message="The Liches are all over this swamp. I hope I have made a wise choice in taking this path."
|
||||
[/message]
|
||||
[message]
|
||||
id=msgswamp3
|
||||
description=Delfador
|
||||
message="Each of the Liches will have a pile of gold you can take, if they are defeated. Do not stretch your armies too thin, for we still must pass through this swamp."
|
||||
[/message]
|
||||
[/event]
|
||||
|
||||
#define SWAMP_GET_GOLD AMOUNT
|
||||
[command]
|
||||
[gold]
|
||||
side=1
|
||||
amount={AMOUNT}
|
||||
[/gold]
|
||||
[/command]
|
||||
[command]
|
||||
[message]
|
||||
id=msg_get_gold_swamp
|
||||
speaker=narrator
|
||||
message="You loot {AMOUNT} pieces of gold from the corpse!"
|
||||
[/message]
|
||||
[/command]
|
||||
#enddef
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Clarustus
|
||||
[/filter]
|
||||
{SWAMP_GET_GOLD 100}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Merlunius
|
||||
[/filter]
|
||||
{SWAMP_GET_GOLD 100}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Aimucasur
|
||||
[/filter]
|
||||
{SWAMP_GET_GOLD 150}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Secadius
|
||||
[/filter]
|
||||
{SWAMP_GET_GOLD 100}
|
||||
[/event]
|
||||
|
||||
[event]
|
||||
name=die
|
||||
[filter]
|
||||
description=Dafeis
|
||||
[/filter]
|
||||
{SWAMP_GET_GOLD 100}
|
||||
[/event]
|
||||
[/scenario]
|
||||
|
|
|
@ -10,14 +10,7 @@
|
|||
|
||||
music="underground.ogg"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
[dot]
|
||||
type=cross
|
||||
x=187
|
||||
y=187
|
||||
[/dot]
|
||||
[/bigmap]
|
||||
{BIGMAP_THE_LOST_GENERAL}
|
||||
|
||||
objectives="
|
||||
Victory:
|
||||
|
|
|
@ -28,13 +28,7 @@ Defeat:
|
|||
id=elensefar
|
||||
[/label]
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 131 332}
|
||||
{DOT 127 320}
|
||||
{DOT 123 309}
|
||||
{CROSS 118 299}
|
||||
[/bigmap]
|
||||
{BIGMAP_SIEGE_OF_ELENSEFAR}
|
||||
|
||||
[side]
|
||||
type=Commander
|
||||
|
|
|
@ -23,13 +23,7 @@ Defeat:
|
|||
#Death of Delfador
|
||||
#Death of Kalenz"
|
||||
|
||||
[bigmap]
|
||||
image=misc/map.png
|
||||
{DOT 250 255}
|
||||
{DOT 251 246}
|
||||
{DOT 253 239}
|
||||
{CROSS 253 231}
|
||||
[/bigmap]
|
||||
{BIGMAP_VALLEY_OF_DEATH}
|
||||
|
||||
[side]
|
||||
type=Commander
|
||||
|
|
|
@ -85,6 +85,7 @@ Defeat:
|
|||
{FIRST_WATCH}
|
||||
{SECOND_WATCH}
|
||||
|
||||
{BIGMAP_VALLEY_OF_STATUES}
|
||||
|
||||
# Monster in cave
|
||||
[item]
|
||||
|
@ -143,6 +144,10 @@ Defeat:
|
|||
[ai]
|
||||
recruitment_pattern=fighter,scout
|
||||
{NO_SCOUTS}
|
||||
recruitment_ignore_bad_combat=yes
|
||||
recruitment_ignore_bad_movement=yes
|
||||
caution=0.25
|
||||
aggression=0.75
|
||||
[/ai]
|
||||
recruit=Cockatrice,Vampire Bat
|
||||
gold=100
|
||||
|
@ -159,9 +164,13 @@ Defeat:
|
|||
[ai]
|
||||
recruitment_pattern=fighter,scout
|
||||
{NO_SCOUTS}
|
||||
recruitment_ignore_bad_combat=yes
|
||||
recruitment_ignore_bad_movement=yes
|
||||
caution=0.25
|
||||
aggression=0.75
|
||||
[/ai]
|
||||
recruit=Cockatrice,Gryphon
|
||||
gold=100
|
||||
gold=200
|
||||
{INCOME 10 20 30}
|
||||
team_name=bad
|
||||
[/side]
|
||||
|
|
|
@ -125,11 +125,13 @@ K
|
|||
{TERRAIN_ADJACENT_NORTH H snow-hills}
|
||||
{TERRAIN_ADJACENT_NORTH h hills}
|
||||
{TERRAIN_ADJACENT_NORTH F snow-forest}
|
||||
{TERRAIN_ADJACENT_NORTH f forest}
|
||||
|
||||
# TERRAIN_ADJACENT_NORTH currently only works with 1-tile transitions.
|
||||
# The forest will be given high enough priority to have correct north adj anyway.
|
||||
#{TERRAIN_ADJACENT_NORTH f forest}
|
||||
|
||||
# Then, standard transitions
|
||||
{TERRAIN_ADJACENT_1234 uD !uD cave}
|
||||
{TERRAIN_ADJACENT_1 F !F snow-forest}
|
||||
|
||||
# forest-to-water transitions. Place before forest-to-any.
|
||||
{TERRAIN_ADJACENT_123 f cZp\|/ forest-to-water}
|
||||
|
@ -140,6 +142,7 @@ K
|
|||
{TERRAIN_ADJACENT_123 f d forest-to-water}
|
||||
|
||||
{TERRAIN_ADJACENT_123 f !f forest}
|
||||
{TERRAIN_ADJACENT_1 F !F snow-forest}
|
||||
{TERRAIN_ADJACENT_1 m !m mountains}
|
||||
{TERRAIN_ADJACENT_12 H !H snow-hills}
|
||||
{TERRAIN_ADJACENT_12 h !h hills}
|
||||
|
|
|
@ -1,12 +1,3 @@
|
|||
[theme]
|
||||
name=null
|
||||
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
[/resolution]
|
||||
[/theme]
|
||||
|
||||
[theme]
|
||||
name=Default
|
||||
|
||||
|
@ -23,23 +14,24 @@ height=600
|
|||
[menu]
|
||||
title=main_menu
|
||||
image=lite
|
||||
items=speak,objectives,unitlist,recruit,recall,statustable,endturn,undo,redo,save,load,statistics,preferences,chatlog,help,quit
|
||||
rect=3,1,100,22
|
||||
items=objectives,statistics,unitlist,statustable,save,load,preferences,chatlog,help,quit
|
||||
rect=3,1,103,22
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
[/menu]
|
||||
|
||||
#[menu]
|
||||
#title=game_menu
|
||||
#image=lite
|
||||
#items=undo,redo,save,preferences,quit
|
||||
#rect=110,1,215,22
|
||||
#xanchor=fixed
|
||||
#yanchor=fixed
|
||||
[menu]
|
||||
title=Actions
|
||||
image=lite
|
||||
items=undo,redo,cycle,speak,recruit,recall,showenemymoves,bestenemymoves,delayshroud,updateshroud,endturn
|
||||
rect=105,1,205,22
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
[/menu]
|
||||
|
||||
[menu]
|
||||
is_context_menu=true
|
||||
items=undo,redo,cycle,describeunit,speak,continue,recruit,recall,createunit,renameunit,labelterrain,showenemymoves,bestenemymoves,delayshroud,updateshroud,endturn
|
||||
items=undo,redo,cycle,describeunit,speak,continue,recruit,recall,createunit,changeside,renameunit,labelterrain,delayshroud,updateshroud,endturn
|
||||
[/menu]
|
||||
|
||||
# top panel
|
||||
|
@ -49,13 +41,6 @@ height=600
|
|||
xanchor=top
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
#[menu]
|
||||
#title=action_preferences
|
||||
#items=preferences
|
||||
#rect=5,1
|
||||
#xanchor=left
|
||||
#yanchor=top
|
||||
#[/menu]
|
||||
|
||||
# rightside panel
|
||||
[panel]
|
||||
|
@ -85,44 +70,44 @@ height=600
|
|||
[menu]
|
||||
title=action_endturn
|
||||
items=endturn
|
||||
rect=900,738
|
||||
rect=900,737
|
||||
xanchor=right
|
||||
yanchor=bottom
|
||||
[/menu]
|
||||
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=175,2,270,21
|
||||
rect=270,2,365,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=275,2,370,21
|
||||
rect=370,2,465,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=375,2,460,21
|
||||
rect=470,2,555,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=465,2,550,21
|
||||
rect=560,2,645,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=555,2,640,21
|
||||
rect=650,2,735,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=645,2,730,21
|
||||
rect=740,2,825,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
|
@ -147,7 +132,7 @@ height=600
|
|||
[label]
|
||||
icon=misc/gold.png
|
||||
text=gold
|
||||
rect=280,3,296,19
|
||||
rect=375,3,391,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
@ -155,7 +140,7 @@ height=600
|
|||
[label]
|
||||
icon=misc/villages.png
|
||||
text=villages
|
||||
rect=380,3,396,19
|
||||
rect=475,3,491,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
@ -163,7 +148,7 @@ height=600
|
|||
[label]
|
||||
icon=misc/units.png
|
||||
text=units
|
||||
rect=470,3,486,19
|
||||
rect=565,3,581,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
@ -171,7 +156,7 @@ height=600
|
|||
[label]
|
||||
icon=misc/upkeep.png
|
||||
text=upkeep
|
||||
rect=560,3,592,19
|
||||
rect=655,3,687,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
@ -179,7 +164,7 @@ height=600
|
|||
[label]
|
||||
icon=misc/income.png
|
||||
text=income
|
||||
rect=650,3,682,19
|
||||
rect=745,3,777,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
@ -192,16 +177,18 @@ height=600
|
|||
yanchor=fixed
|
||||
[/time_of_day]
|
||||
|
||||
[comment]
|
||||
[observers]
|
||||
font_size=12
|
||||
rect=156,4,172,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/observers]
|
||||
[/comment]
|
||||
|
||||
#put the side playing indicator next to the turn indicator
|
||||
[side_playing]
|
||||
rect=178,4,193,20
|
||||
rect=273,4,288,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/side_playing]
|
||||
|
@ -209,7 +196,7 @@ height=600
|
|||
# the game status
|
||||
[turn]
|
||||
font_size=12
|
||||
rect=200,4,265,20
|
||||
rect=292,4,360,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
|
@ -217,7 +204,7 @@ height=600
|
|||
[/turn]
|
||||
[gold]
|
||||
font_size=12
|
||||
rect=300,4,365,20
|
||||
rect=395,4,460,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
|
@ -225,7 +212,7 @@ height=600
|
|||
[/gold]
|
||||
[villages]
|
||||
font_size=12
|
||||
rect=400,4,455,20
|
||||
rect=495,4,550,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
|
@ -233,7 +220,7 @@ height=600
|
|||
[/villages]
|
||||
[num_units]
|
||||
font_size=12
|
||||
rect=490,4,545,20
|
||||
rect=585,4,640,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
|
@ -241,7 +228,7 @@ height=600
|
|||
[/num_units]
|
||||
[upkeep]
|
||||
font_size=12
|
||||
rect=598,4,635,20
|
||||
rect=690,4,730,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
|
@ -249,21 +236,362 @@ height=600
|
|||
[/upkeep]
|
||||
[income]
|
||||
font_size=12
|
||||
rect=688,4,725,20
|
||||
rect=780,4,820,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/income]
|
||||
[comment]
|
||||
[terrain]
|
||||
font_size=12
|
||||
rect=735,4,875,20
|
||||
rect=770,4,890,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/terrain]
|
||||
[/comment]
|
||||
[position]
|
||||
font_size=12
|
||||
rect=880,4,1020,20
|
||||
rect=895,4,1020,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/position]
|
||||
|
||||
#unit stats here
|
||||
[unit_image]
|
||||
rect=891,235,963,307
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_image]
|
||||
[unit_description]
|
||||
font_size=14
|
||||
rect=891,312,1022,330
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_description]
|
||||
[unit_type]
|
||||
font_size=12
|
||||
rect=891,330,1022,346
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_type]
|
||||
[unit_level]
|
||||
font_size=12
|
||||
rect=891,346,1022,362
|
||||
prefix=level
|
||||
prefix_literal=" "
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_level]
|
||||
[unit_alignment]
|
||||
font_size=12
|
||||
rect=891,362,1022,378
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_alignment]
|
||||
[unit_traits]
|
||||
font_size=12
|
||||
rect=891,378,1022,394
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_traits]
|
||||
[unit_abilities]
|
||||
font_size=12
|
||||
rect=891,394,1022,410
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_abilities]
|
||||
[unit_status]
|
||||
font_size=12
|
||||
rect=968,289,1020,305
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_status]
|
||||
[unit_moves]
|
||||
font_size=12
|
||||
rect=891,410,1022,426
|
||||
prefix=movement
|
||||
prefix_literal=": "
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_moves]
|
||||
[unit_hp]
|
||||
font_size=12
|
||||
rect=967,246,1022,260
|
||||
#prefix=hp
|
||||
#prefix_literal=" "
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_hp]
|
||||
[unit_xp]
|
||||
font_size=12
|
||||
rect=967,272,1022,286
|
||||
#prefix=xp
|
||||
#prefix_literal=" "
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_xp]
|
||||
[unit_weapons]
|
||||
font_size=12
|
||||
#rect=900,452,1020,620
|
||||
rect=891,426,1022,594
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_weapons]
|
||||
[/status]
|
||||
[/resolution]
|
||||
|
||||
|
||||
[resolution]
|
||||
width=1024
|
||||
height=768
|
||||
|
||||
[main_map]
|
||||
rect=0,26,882,768
|
||||
xanchor=left
|
||||
yanchor=top
|
||||
[/main_map]
|
||||
|
||||
[menu]
|
||||
title=main_menu
|
||||
image=lite
|
||||
items=objectives,statistics,unitlist,statustable,save,load,preferences,chatlog,help,quit
|
||||
rect=3,1,103,22
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
[/menu]
|
||||
|
||||
[menu]
|
||||
title=Actions
|
||||
image=lite
|
||||
items=undo,redo,cycle,speak,recruit,recall,showenemymoves,bestenemymoves,delayshroud,updateshroud,endturn
|
||||
rect=105,1,205,22
|
||||
xanchor=fixed
|
||||
yanchor=fixed
|
||||
[/menu]
|
||||
|
||||
[menu]
|
||||
is_context_menu=true
|
||||
items=undo,redo,cycle,describeunit,speak,continue,recruit,recall,createunit,changeside,renameunit,labelterrain,delayshroud,updateshroud,endturn
|
||||
[/menu]
|
||||
|
||||
# top panel
|
||||
[panel]
|
||||
image=misc/top-bg.png
|
||||
rect=0,0,1024,26
|
||||
xanchor=top
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
|
||||
# rightside panel
|
||||
[panel]
|
||||
image=misc/rightside.png
|
||||
rect=882,25,1024,309
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[mini_map]
|
||||
rect=892,32,1017,175
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/mini_map]
|
||||
[panel]
|
||||
image=misc/rightside-bg.png
|
||||
rect=882,309,1024,730
|
||||
xanchor=right
|
||||
yanchor=top
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/rightside-bottom.png
|
||||
rect=882,730,0,768
|
||||
xanchor=right
|
||||
yanchor=bottom
|
||||
[/panel]
|
||||
|
||||
[menu]
|
||||
title=action_endturn
|
||||
items=endturn
|
||||
rect=900,737
|
||||
xanchor=right
|
||||
yanchor=bottom
|
||||
[/menu]
|
||||
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=210,2,305,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=310,2,405,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=410,2,495,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=500,2,585,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=590,2,675,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
[panel]
|
||||
image=misc/status-bg.png
|
||||
rect=680,2,765,21
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/panel]
|
||||
|
||||
# HP/XP
|
||||
[label]
|
||||
font_size=10
|
||||
text=hp
|
||||
rect=967,234,1022,246
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
[label]
|
||||
font_size=10
|
||||
text=xp
|
||||
rect=967,260,1022,272
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
||||
# gold icon
|
||||
[label]
|
||||
icon=misc/gold.png
|
||||
text=gold
|
||||
rect=315,3,331,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
# villages icon
|
||||
[label]
|
||||
icon=misc/villages.png
|
||||
text=villages
|
||||
rect=415,3,431,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
# units icon
|
||||
[label]
|
||||
icon=misc/units.png
|
||||
text=units
|
||||
rect=505,3,521,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
# upkeep icon
|
||||
[label]
|
||||
icon=misc/upkeep.png
|
||||
text=upkeep
|
||||
rect=595,3,627,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
# income icon
|
||||
[label]
|
||||
icon=misc/income.png
|
||||
text=income
|
||||
rect=685,3,717,19
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/label]
|
||||
|
||||
[status]
|
||||
# the time of day image
|
||||
[time_of_day]
|
||||
rect=892,184,1017,223
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/time_of_day]
|
||||
|
||||
[comment]
|
||||
[observers]
|
||||
font_size=12
|
||||
rect=156,4,172,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/observers]
|
||||
[/comment]
|
||||
|
||||
#put the side playing indicator next to the turn indicator
|
||||
[side_playing]
|
||||
rect=213,4,228,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/side_playing]
|
||||
|
||||
# the game status
|
||||
[turn]
|
||||
font_size=12
|
||||
rect=232,4,300,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/turn]
|
||||
[gold]
|
||||
font_size=12
|
||||
rect=335,4,400,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/gold]
|
||||
[villages]
|
||||
font_size=12
|
||||
rect=435,4,490,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/villages]
|
||||
[num_units]
|
||||
font_size=12
|
||||
rect=525,4,580,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/num_units]
|
||||
[upkeep]
|
||||
font_size=12
|
||||
rect=630,4,670,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/upkeep]
|
||||
[income]
|
||||
font_size=12
|
||||
rect=720,4,760,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
prefix=
|
||||
prefix_literal=""
|
||||
[/income]
|
||||
[terrain]
|
||||
font_size=12
|
||||
rect=770,4,890,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/terrain]
|
||||
[position]
|
||||
font_size=12
|
||||
rect=895,4,1020,20
|
||||
xanchor=proportional
|
||||
yanchor=fixed
|
||||
[/position]
|
||||
|
@ -314,7 +642,6 @@ height=600
|
|||
[/unit_abilities]
|
||||
[unit_status]
|
||||
font_size=12
|
||||
#rect=958,241,1008,291
|
||||
rect=968,289,1020,305
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
|
@ -332,8 +659,6 @@ height=600
|
|||
rect=967,246,1022,260
|
||||
#prefix=hp
|
||||
#prefix_literal=" "
|
||||
#prefix=""
|
||||
#prefix_literal=""
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_hp]
|
||||
|
@ -342,8 +667,6 @@ height=600
|
|||
rect=967,272,1022,286
|
||||
#prefix=xp
|
||||
#prefix_literal=" "
|
||||
#prefix=""
|
||||
#prefix_literal=""
|
||||
xanchor=right
|
||||
yanchor=fixed
|
||||
[/unit_xp]
|
||||
|
@ -357,3 +680,11 @@ height=600
|
|||
[/status]
|
||||
[/resolution]
|
||||
[/theme]
|
||||
|
||||
[theme]
|
||||
name=null
|
||||
[resolution]
|
||||
width=1
|
||||
height=1
|
||||
[/resolution]
|
||||
[/theme]
|
||||
|
|
|
@ -1,40 +1,54 @@
|
|||
|
||||
# Convex castle images
|
||||
|
||||
#define EVEN
|
||||
cut=54,72,126,144
|
||||
#enddef
|
||||
|
||||
#define ODD
|
||||
cut=72,108,126,180
|
||||
#enddef
|
||||
|
||||
[mask]
|
||||
name=castle-convex-ne
|
||||
image=mask-castle-ne.png
|
||||
shift=-18,-36
|
||||
shift=18,36
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-convex-e
|
||||
image=mask-castle-e.png
|
||||
shift=-36,-24
|
||||
shift=36,24
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-convex-se
|
||||
image=mask-castle-se.png
|
||||
shift=-18,-24
|
||||
shift=18,24
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-convex-sw
|
||||
image=mask-castle-sw.png
|
||||
shift=-36,-24
|
||||
shift=36,24
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-convex-w
|
||||
image=mask-castle-w.png
|
||||
shift=-18,-24
|
||||
shift=18,24
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-convex-nw
|
||||
image=mask-castle-nw.png
|
||||
shift=-36,-36
|
||||
shift=36,36
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
|
||||
|
@ -43,36 +57,42 @@
|
|||
[mask]
|
||||
name=castle-concave-ne
|
||||
image=mask-castle-ne.png
|
||||
shift=-18,-36
|
||||
shift=18,36
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-concave-e
|
||||
image=mask-castle-e.png
|
||||
shift=-36,-24
|
||||
shift=36,24
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-concave-se
|
||||
image=mask-castle-se.png
|
||||
shift=-18,-24
|
||||
shift=18,24
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-concave-sw
|
||||
image=mask-castle-sw.png
|
||||
shift=-36,-24
|
||||
shift=36,24
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-concave-w
|
||||
image=mask-castle-w.png
|
||||
shift=-18,-24
|
||||
shift=18,24
|
||||
{EVEN}
|
||||
[/mask]
|
||||
|
||||
[mask]
|
||||
name=castle-concave-nw
|
||||
image=mask-castle-nw.png
|
||||
shift=-36,-36
|
||||
shift=36,36
|
||||
{ODD}
|
||||
[/mask]
|
||||
|
||||
|
|
|
@ -530,6 +530,7 @@ action_unitlist="Unit List"
|
|||
action_objectives="Scenario Objectives"
|
||||
action_preferences="Preferences"
|
||||
action_createunit="Create Unit (Debug!)"
|
||||
action_changeside="Change Unit Side (Debug!)"
|
||||
action_speak="Speak"
|
||||
action_zoomin="Zoom In"
|
||||
action_zoomout="Zoom Out"
|
||||
|
|
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 624 B |
Before Width: | Height: | Size: 608 B After Width: | Height: | Size: 633 B |
Before Width: | Height: | Size: 605 B After Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 40 KiB |
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 39 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
Before Width: | Height: | Size: 438 KiB After Width: | Height: | Size: 624 KiB |
Before Width: | Height: | Size: 193 B After Width: | Height: | Size: 255 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 266 B |
Before Width: | Height: | Size: 372 B After Width: | Height: | Size: 483 B |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 490 B |
Before Width: | Height: | Size: 394 B After Width: | Height: | Size: 447 B |
Before Width: | Height: | Size: 370 B After Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 243 B |
Before Width: | Height: | Size: 192 B After Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 301 B After Width: | Height: | Size: 293 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 309 B |
|
@ -252,6 +252,9 @@ battle_stats evaluate_battle_stats(
|
|||
res.attack_name = attack.name();
|
||||
res.attack_type = attack.type();
|
||||
|
||||
static const std::string slow_string("slow");
|
||||
res.attacker_slows = attack.special() == slow_string;
|
||||
|
||||
if(include_strings) {
|
||||
res.attack_special = attack.special();
|
||||
res.attack_icon = attack.icon();
|
||||
|
@ -402,6 +405,7 @@ battle_stats evaluate_battle_stats(
|
|||
}
|
||||
|
||||
res.defender_plague = (defender_attacks[defend].special() == plague_string);
|
||||
res.defender_slows = (defender_attacks[defend].special() == slow_string);
|
||||
|
||||
static const std::string first_strike = "firststrike";
|
||||
res.defender_strikes_first = defender_attacks[defend].special() == first_strike && attack.special() != first_strike;
|
||||
|
@ -678,9 +682,7 @@ void attack(display& gui, const gamemap& map,
|
|||
d->second.set_flag("poisoned");
|
||||
}
|
||||
|
||||
static const std::string slow_string("slow");
|
||||
if(stats.attack_special == slow_string &&
|
||||
d->second.has_flag("slowed") == false) {
|
||||
if(stats.attacker_slows && d->second.has_flag("slowed") == false) {
|
||||
gui.float_label(d->first,translate_string("slowed"),255,0,0);
|
||||
d->second.set_flag("slowed");
|
||||
if(stats.ndefends > 1)
|
||||
|
@ -816,9 +818,7 @@ void attack(display& gui, const gamemap& map,
|
|||
a->second.set_flag("poisoned");
|
||||
}
|
||||
|
||||
static const std::string slow_string("slow");
|
||||
if(stats.defend_special == slow_string &&
|
||||
a->second.has_flag("slowed") == false) {
|
||||
if(stats.defender_slows && a->second.has_flag("slowed") == false) {
|
||||
gui.float_label(a->first,translate_string("slowed"),255,0,0);
|
||||
a->second.set_flag("slowed");
|
||||
if(stats.nattacks > 1)
|
||||
|
|
|
@ -58,6 +58,7 @@ struct battle_stats
|
|||
int ndefends, nattacks;
|
||||
int attack_with, defend_with;
|
||||
bool attacker_plague, defender_plague;
|
||||
bool attacker_slows, defender_slows;
|
||||
std::vector<std::string> attack_calculations, defend_calculations;
|
||||
bool to_the_death, defender_strikes_first;
|
||||
};
|
||||
|
|
|
@ -76,13 +76,21 @@ void ai::do_attack_analysis(
|
|||
|
||||
//see if the unit has the backstab ability -- units with backstab
|
||||
//will want to try to have a friendly unit opposite the position they move to
|
||||
bool backstab = false;
|
||||
//see if the unit has the slow ability -- units with slow only attack first
|
||||
bool backstab = false, slow = false;
|
||||
const std::vector<attack_type>& attacks = unit_itor->second.attacks();
|
||||
for(std::vector<attack_type>::const_iterator a = attacks.begin(); a != attacks.end(); ++a) {
|
||||
if(a->backstab()) {
|
||||
backstab = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if(a->slow()) {
|
||||
slow = true;
|
||||
}
|
||||
}
|
||||
|
||||
if(slow && cur_analysis.movements.empty() == false) {
|
||||
continue;
|
||||
}
|
||||
|
||||
double best_vulnerability = 0.0, best_support = 0.0;
|
||||
|
@ -352,6 +360,8 @@ void ai::attack_analysis::analyze(const gamemap& map,
|
|||
|
||||
int defenderxp = 0;
|
||||
|
||||
bool defender_slowed = false;
|
||||
|
||||
int defhp = target_hp;
|
||||
for(size_t i = 0; i != movements.size() && defhp; ++i) {
|
||||
const battle_stats& stat = stats[i];
|
||||
|
@ -360,6 +370,13 @@ void ai::attack_analysis::analyze(const gamemap& map,
|
|||
int attacks = stat.nattacks;
|
||||
int defends = stat.ndefends;
|
||||
|
||||
if(defender_slowed && defends > 1) {
|
||||
--defends;
|
||||
|
||||
//give an extra bonus based on slowing here
|
||||
avg_damage_taken -= stat.damage_defender_takes;
|
||||
}
|
||||
|
||||
unit_map::const_iterator att = units.find(movements[i].first);
|
||||
double cost = att->second.type().cost();
|
||||
|
||||
|
@ -389,8 +406,13 @@ void ai::attack_analysis::analyze(const gamemap& map,
|
|||
}
|
||||
|
||||
atthp += stat.amount_attacker_drains;
|
||||
if(atthp > hitpoints[i])
|
||||
if(atthp > hitpoints[i]) {
|
||||
atthp = hitpoints[i];
|
||||
}
|
||||
|
||||
if(stat.attacker_slows && !defender_slowed && defend_it->second.has_flag("slowed") == false) {
|
||||
defender_slowed = true;
|
||||
}
|
||||
}
|
||||
|
||||
--attacks;
|
||||
|
@ -413,8 +435,9 @@ void ai::attack_analysis::analyze(const gamemap& map,
|
|||
}
|
||||
|
||||
defhp += stat.amount_defender_drains;
|
||||
if(defhp > target_max_hp)
|
||||
if(defhp > target_max_hp) {
|
||||
defhp = target_max_hp;
|
||||
}
|
||||
}
|
||||
|
||||
--defends;
|
||||
|
|
|
@ -212,6 +212,12 @@ void cave_map_generator::place_items(const chamber& c, config::all_children_iter
|
|||
const std::string& key = *(*i1).first;
|
||||
config cfg = *(*i1).second;
|
||||
config* const filter = cfg.child("filter");
|
||||
config* const object = cfg.child("object");
|
||||
config* object_filter = NULL;
|
||||
if(object != NULL) {
|
||||
object_filter = object->child("filter");
|
||||
}
|
||||
|
||||
if(cfg["same_location_as_previous"] != "yes") {
|
||||
index = rand()%c.locs.size();
|
||||
}
|
||||
|
@ -226,12 +232,20 @@ void cave_map_generator::place_items(const chamber& c, config::all_children_iter
|
|||
(*filter)["x"] = buf;
|
||||
}
|
||||
|
||||
if(object_filter != NULL) {
|
||||
(*object_filter)["x"] = buf;
|
||||
}
|
||||
|
||||
sprintf(buf,"%d",loc->y+1);
|
||||
cfg.values["y"] = buf;
|
||||
if(filter != NULL) {
|
||||
(*filter)["y"] = buf;
|
||||
}
|
||||
|
||||
if(object_filter != NULL) {
|
||||
(*object_filter)["y"] = buf;
|
||||
}
|
||||
|
||||
//if this is a side, place a castle for the side
|
||||
if(key == "side" && cfg["no_castle"] != "yes") {
|
||||
place_castle(cfg["side"],*loc);
|
||||
|
|
|
@ -1426,7 +1426,7 @@ void display::draw_tile(int x, int y, SDL_Surface* unit_image, double alpha, Uin
|
|||
for(std::pair<Itor,Itor> overlays = overlays_.equal_range(loc);
|
||||
overlays.first != overlays.second; ++overlays.first) {
|
||||
|
||||
scoped_sdl_surface overlay_surface(image::get_image(overlays.first->second));
|
||||
scoped_sdl_surface overlay_surface(image::get_image(overlays.first->second,image_type));
|
||||
|
||||
//note that dstrect can be changed by SDL_BlitSurface and so a
|
||||
//new instance should be initialized to pass to each call to
|
||||
|
|
|
@ -194,7 +194,15 @@ std::string get_dir(const std::string& dir_path)
|
|||
std::string get_user_data_dir()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
_mkdir("userdata");
|
||||
|
||||
static bool inited_dirs = false;
|
||||
|
||||
if(!inited_dirs) {
|
||||
_mkdir("userdata");
|
||||
_mkdir("userdata/editor");
|
||||
_mkdir("userdata/editor/maps");
|
||||
inited_dirs = true;
|
||||
}
|
||||
|
||||
char buf[256];
|
||||
const char* const res = getcwd(buf,sizeof(buf));
|
||||
|
@ -224,6 +232,10 @@ std::string get_user_data_dir()
|
|||
DIR* dir = opendir(dir_path.c_str());
|
||||
if(dir == NULL) {
|
||||
const int res = mkdir(dir_path.c_str(),AccessMode);
|
||||
|
||||
//also create the maps directory
|
||||
mkdir((dir_path + "/editor").c_str(),AccessMode);
|
||||
mkdir((dir_path + "/editor/maps").c_str(),AccessMode);
|
||||
if(res == 0) {
|
||||
dir = opendir(dir_path.c_str());
|
||||
} else {
|
||||
|
|
|
@ -594,6 +594,7 @@ bool event_handler::handle_event_command(const queued_event& event_info, const s
|
|||
for(ti = types.begin(); ti != types.end(); ++ti) {
|
||||
config item = cfg;
|
||||
item["type"] = *ti;
|
||||
item["role"] = "";
|
||||
|
||||
std::map<gamemap::location,unit>::iterator itor;
|
||||
for(itor = units->begin(); itor != units->end(); ++itor) {
|
||||
|
|
|
@ -61,6 +61,7 @@ HOTKEY_COMMAND string_to_command(const std::string& str)
|
|||
m.insert(val("mute",HOTKEY_MUTE));
|
||||
m.insert(val("speak",HOTKEY_SPEAK));
|
||||
m.insert(val("createunit",HOTKEY_CREATE_UNIT));
|
||||
m.insert(val("changeside",HOTKEY_CHANGE_UNIT_SIDE));
|
||||
m.insert(val("preferences",HOTKEY_PREFERENCES));
|
||||
m.insert(val("objectives",HOTKEY_OBJECTIVES));
|
||||
m.insert(val("unitlist",HOTKEY_UNIT_LIST));
|
||||
|
@ -431,6 +432,10 @@ void execute_command(display& disp, HOTKEY_COMMAND command, command_executor* ex
|
|||
if(executor)
|
||||
executor->create_unit();
|
||||
break;
|
||||
case HOTKEY_CHANGE_UNIT_SIDE:
|
||||
if(executor)
|
||||
executor->change_unit_side();
|
||||
break;
|
||||
case HOTKEY_PREFERENCES:
|
||||
if(executor)
|
||||
executor->preferences();
|
||||
|
|
|
@ -31,7 +31,7 @@ enum HOTKEY_COMMAND { HOTKEY_CYCLE_UNITS, HOTKEY_END_UNIT_TURN, HOTKEY_LEADER,
|
|||
HOTKEY_UNIT_DESCRIPTION, HOTKEY_RENAME_UNIT, HOTKEY_SAVE_GAME, HOTKEY_LOAD_GAME,
|
||||
HOTKEY_RECRUIT, HOTKEY_REPEAT_RECRUIT, HOTKEY_RECALL, HOTKEY_ENDTURN,
|
||||
HOTKEY_TOGGLE_GRID, HOTKEY_STATUS_TABLE, HOTKEY_MUTE,
|
||||
HOTKEY_SPEAK, HOTKEY_CREATE_UNIT, HOTKEY_PREFERENCES,
|
||||
HOTKEY_SPEAK, HOTKEY_CREATE_UNIT, HOTKEY_CHANGE_UNIT_SIDE, HOTKEY_PREFERENCES,
|
||||
HOTKEY_OBJECTIVES, HOTKEY_UNIT_LIST, HOTKEY_STATISTICS, HOTKEY_QUIT_GAME,
|
||||
HOTKEY_LABEL_TERRAIN, HOTKEY_SHOW_ENEMY_MOVES, HOTKEY_BEST_ENEMY_MOVES,
|
||||
HOTKEY_DELAY_SHROUD, HOTKEY_UPDATE_SHROUD, HOTKEY_CONTINUE_MOVE,
|
||||
|
@ -110,6 +110,7 @@ public:
|
|||
virtual void repeat_recruit() {}
|
||||
virtual void speak() {}
|
||||
virtual void create_unit() {}
|
||||
virtual void change_unit_side() {}
|
||||
virtual void preferences() {}
|
||||
virtual void objectives() {}
|
||||
virtual void unit_list() {}
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cerrno>
|
||||
#include <queue>
|
||||
#include <iostream>
|
||||
#include <set>
|
||||
|
@ -20,11 +21,10 @@ namespace {
|
|||
//the same, so it's all seamless to the user
|
||||
struct connection_details {
|
||||
connection_details(TCPsocket sock, const std::string& host, int port)
|
||||
: sock(sock), disconnected_at(0), host(host), port(port), remote_handle(0)
|
||||
: sock(sock), host(host), port(port), remote_handle(0)
|
||||
{}
|
||||
|
||||
TCPsocket sock;
|
||||
int disconnected_at;
|
||||
std::string host;
|
||||
int port;
|
||||
|
||||
|
@ -193,6 +193,8 @@ connection connect(const std::string& host, int port)
|
|||
TCPsocket sock = SDLNet_TCP_Open(&ip);
|
||||
if(!sock) {
|
||||
throw error("Could not connect to host");
|
||||
} else {
|
||||
//TODO: add code in here which sets the socket to non-blocking
|
||||
}
|
||||
|
||||
//if this is a server socket
|
||||
|
@ -531,31 +533,15 @@ void send_data(const config& cfg, connection connection_num, size_t max_size, SE
|
|||
SDLNet_Write32(value.size()+1-4,buf);
|
||||
std::copy(buf,buf+4,value.begin());
|
||||
|
||||
//if the data is less than our maximum chunk, and there is no data queued to send
|
||||
//to this host, then send all data now
|
||||
if(mode == SEND_DATA && (max_size == 0 || value.size()+1 <= max_size) && send_queue.count(connection_num) == 0) {
|
||||
std::cerr << "sending " << (value.size()+1) << " bytes\n";
|
||||
const int res = SDLNet_TCP_Send(get_socket(connection_num),
|
||||
const_cast<char*>(value.c_str()),
|
||||
value.size()+1);
|
||||
//place the data in the send queue
|
||||
const send_queue_map::iterator itor = send_queue.insert(std::pair<network::connection,partial_buffer>(connection_num,partial_buffer()));
|
||||
|
||||
if(res != int(value.size()+1)) {
|
||||
std::cerr << "sending data failed: " << res << "/" << value.size() << "\n";
|
||||
throw error("Could not send data over socket",connection_num);
|
||||
}
|
||||
} else {
|
||||
std::cerr << "cannot send all " << (value.size()+1) << " bytes at once. Placing in send queue.\n";
|
||||
//place the data in the send queue
|
||||
const send_queue_map::iterator itor =
|
||||
send_queue.insert(std::pair<network::connection,partial_buffer>(connection_num,partial_buffer()));
|
||||
itor->second.buf.resize(value.size()+1);
|
||||
std::copy(value.begin(),value.end(),itor->second.buf.begin());
|
||||
itor->second.buf.back() = 0;
|
||||
|
||||
itor->second.buf.resize(value.size()+1);
|
||||
std::copy(value.begin(),value.end(),itor->second.buf.begin());
|
||||
itor->second.buf.back() = 0;
|
||||
|
||||
if(mode == SEND_DATA) {
|
||||
process_send_queue(connection_num,max_size);
|
||||
}
|
||||
if(mode == SEND_DATA) {
|
||||
process_send_queue(connection_num,max_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -597,14 +583,14 @@ void process_send_queue(connection connection_num, size_t max_size)
|
|||
std::cerr << "sending " << bytes_to_send << " from send queue\n";
|
||||
|
||||
const int res = SDLNet_TCP_Send(sock,&buf[upto],bytes_to_send);
|
||||
if(res != int(bytes_to_send)) {
|
||||
if(res < 0 || res != int(bytes_to_send) && errno != EAGAIN) {
|
||||
std::cerr << "sending data failed: " << res << "/" << bytes_to_send << "\n";
|
||||
throw error("Sending queued data failed",connection_num);
|
||||
}
|
||||
|
||||
std::cerr << "sent.\n";
|
||||
|
||||
upto += bytes_to_send;
|
||||
upto += res;
|
||||
|
||||
//if we've now sent the entire item, erase it from the send queue
|
||||
if(upto == buf.size()) {
|
||||
|
|
|
@ -982,6 +982,7 @@ bool turn_info::can_execute_command(hotkey::HOTKEY_COMMAND command) const
|
|||
|
||||
//commands we can only do if in debug mode
|
||||
case hotkey::HOTKEY_CREATE_UNIT:
|
||||
case hotkey::HOTKEY_CHANGE_UNIT_SIDE:
|
||||
return !commands_disabled && game_config::debug && map_.on_board(last_hex_);
|
||||
|
||||
default:
|
||||
|
@ -1851,6 +1852,22 @@ void turn_info::create_unit()
|
|||
}
|
||||
}
|
||||
|
||||
void turn_info::change_unit_side()
|
||||
{
|
||||
const unit_map::iterator i = units_.find(last_hex_);
|
||||
if(i == units_.end()) {
|
||||
return;
|
||||
}
|
||||
|
||||
int side = i->second.side();
|
||||
++side;
|
||||
if(side > team::nteams()) {
|
||||
side = 1;
|
||||
}
|
||||
|
||||
i->second.set_side(side);
|
||||
}
|
||||
|
||||
void turn_info::preferences()
|
||||
{
|
||||
preferences::show_preferences_dialog(gui_);
|
||||
|
|
|
@ -141,6 +141,7 @@ private:
|
|||
virtual void recall();
|
||||
virtual void speak();
|
||||
virtual void create_unit();
|
||||
virtual void change_unit_side();
|
||||
virtual void preferences();
|
||||
virtual void objectives();
|
||||
virtual void unit_list();
|
||||
|
|
|
@ -129,9 +129,9 @@ void server::run()
|
|||
continue;
|
||||
}
|
||||
|
||||
//check the username is valid (all alpha-numeric)
|
||||
//check the username is valid (all alpha-numeric or space)
|
||||
const std::string& username = (*login)["username"];
|
||||
if(std::count_if(username.begin(),username.end(),isalnum)
|
||||
if(std::count_if(username.begin(),username.end(),isalnum) + std::count(username.begin(),username.end(),' ')
|
||||
!= username.size() || username.empty()) {
|
||||
network::send_data(construct_error(
|
||||
"This username is not valid"),sock);
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
|
||||
bin_PROGRAMS = make_translation merge_translations
|
||||
|
||||
if LIBPNG
|
||||
bin_PROGRAMS += exploder cutter
|
||||
endif
|
||||
|
||||
#############################################################################
|
||||
# Translation Tools #
|
||||
#############################################################################
|
||||
|
@ -42,3 +46,39 @@ merge_translations_SOURCES = merge_translations.cpp \
|
|||
../filesystem.hpp \
|
||||
../game_config.hpp \
|
||||
../log.hpp
|
||||
|
||||
#############################################################################
|
||||
# Castle building helpers #
|
||||
#############################################################################
|
||||
|
||||
if LIBPNG
|
||||
|
||||
exploder_SOURCES = exploder.cpp \
|
||||
exploder_utils.cpp \
|
||||
exploder_cutter.cpp \
|
||||
exploder_composer.cpp \
|
||||
../server/variable.cpp \
|
||||
dummy_video.cpp \
|
||||
../config.cpp \
|
||||
../filesystem.cpp \
|
||||
../game_config.cpp \
|
||||
../sdl_utils.cpp \
|
||||
../log.cpp
|
||||
|
||||
cutter_SOURCES = cutter.cpp \
|
||||
exploder_utils.cpp \
|
||||
exploder_cutter.cpp \
|
||||
../server/variable.cpp \
|
||||
dummy_video.cpp \
|
||||
../config.cpp \
|
||||
../filesystem.cpp \
|
||||
../game_config.cpp \
|
||||
../sdl_utils.cpp \
|
||||
../log.cpp
|
||||
|
||||
|
||||
exploder_LDFLAGS = @SDL_LIBS@ @SDL_IMAGE_LIBS@ @PNG_LIBS@
|
||||
cutter_LDFLAGS = @SDL_LIBS@ @SDL_IMAGE_LIBS@ @PNG_LIBS@
|
||||
|
||||
endif
|
||||
|
||||
|
|
|
@ -69,11 +69,13 @@ shared_sdl_surface composer::compose(const std::string &src, const std::string &
|
|||
}
|
||||
}
|
||||
if(verbose_) {
|
||||
std::cerr << "Inserting image " << name << " on position (" << dest_ps.x <<
|
||||
", " << dest_ps.y << ")\n";
|
||||
std::cerr << "Inserting image " << name
|
||||
<< " on position (" << dest_ps.pos.x
|
||||
<< ", " << dest_ps.pos.y << ")\n";
|
||||
}
|
||||
masked_overwrite_surface(dest_surface, src_ps.image, src_ps.mask.image,
|
||||
dest_ps.x, dest_ps.y);
|
||||
masked_overwrite_surface(dest_surface, src_ps.image,
|
||||
src_ps.mask.image,
|
||||
dest_ps.pos.x, dest_ps.pos.y);
|
||||
}
|
||||
|
||||
return dest_surface;
|
||||
|
|
|
@ -55,17 +55,8 @@ void cutter::load_masks(const config& conf)
|
|||
if(image.empty())
|
||||
throw exploder_failure("Missing image for mask " + name);
|
||||
|
||||
int shiftx = 0;
|
||||
int shifty = 0;
|
||||
|
||||
if(!((**itor)["shift"]).empty()) {
|
||||
std::vector<std::string> shift = config::split((**itor)["shift"]);
|
||||
if(shift.size() != 2)
|
||||
throw exploder_failure("Invalid shift " + (**itor)["shift"]);
|
||||
|
||||
shiftx = atoi(shift[0].c_str());
|
||||
shifty = atoi(shift[1].c_str());
|
||||
}
|
||||
const exploder_point shift((**itor)["shift"]);
|
||||
const exploder_rect cut((**itor)["cut"]);
|
||||
|
||||
if(masks_.find(name) != masks_.end() && masks_[name].filename != image) {
|
||||
throw exploder_failure("Mask " + name +
|
||||
|
@ -77,14 +68,15 @@ void cutter::load_masks(const config& conf)
|
|||
if(masks_.find(name) == masks_.end()) {
|
||||
mask& cur_mask = masks_[name];
|
||||
|
||||
cur_mask.name = name;
|
||||
cur_mask.shift = shift;
|
||||
cur_mask.cut = cut;
|
||||
cur_mask.filename = image;
|
||||
scoped_sdl_surface tmp(IMG_Load(image.c_str()));
|
||||
if(tmp == NULL)
|
||||
throw exploder_failure("Unable to load mask image " + image);
|
||||
|
||||
cur_mask.image = shared_sdl_surface(make_neutral_surface(tmp));
|
||||
cur_mask.shiftx = shiftx;
|
||||
cur_mask.shifty = shifty;
|
||||
}
|
||||
|
||||
if(masks_[name].image == NULL)
|
||||
|
@ -113,17 +105,12 @@ std::string cutter::find_configuration(const std::string &file)
|
|||
//finds the file prefix.
|
||||
const std::string fname = file_name(file);
|
||||
const std::string::size_type dotpos = fname.rfind('.');
|
||||
int underscorepos = fname.find('_');
|
||||
|
||||
//sets "underscore pos" to -1 if there is no underscore.
|
||||
if(underscorepos == std::string::npos || underscorepos == file.size())
|
||||
underscorepos = -1;
|
||||
|
||||
std::string basename;
|
||||
if(dotpos == std::string::npos || dotpos < underscorepos) {
|
||||
basename = file.substr(underscorepos + 1);
|
||||
if(dotpos == std::string::npos) {
|
||||
basename = fname;
|
||||
} else {
|
||||
basename = file.substr(underscorepos + 1, dotpos - underscorepos - 1);
|
||||
basename = fname.substr(0, dotpos);
|
||||
}
|
||||
|
||||
return get_exploder_dir() + "/" + basename + ".cfg";
|
||||
|
@ -148,7 +135,7 @@ void cutter::add_sub_image(const shared_sdl_surface &surf, surface_map &map, con
|
|||
int x = atoi(pos[0].c_str());
|
||||
int y = atoi(pos[1].c_str());
|
||||
|
||||
const SDL_Rect cut = {x + mask.shiftx, y + mask.shifty, mask.image->w, mask.image->h};
|
||||
const SDL_Rect cut = {x - mask.shift.x, y - mask.shift.y, mask.image->w, mask.image->h};
|
||||
|
||||
typedef std::pair<std::string, positioned_surface> sme;
|
||||
|
||||
|
@ -158,8 +145,8 @@ void cutter::add_sub_image(const shared_sdl_surface &surf, surface_map &map, con
|
|||
throw exploder_failure("Unable to cut surface!");
|
||||
ps.name = name;
|
||||
ps.mask = mask;
|
||||
ps.x = x + mask.shiftx;
|
||||
ps.y = y + mask.shifty;
|
||||
ps.pos.x = x - mask.shift.x;
|
||||
ps.pos.y = y - mask.shift.y;
|
||||
map.insert(sme(name, ps));
|
||||
|
||||
if(verbose_) {
|
||||
|
|
|
@ -29,16 +29,16 @@ public:
|
|||
std::string name;
|
||||
shared_sdl_surface image;
|
||||
std::string filename;
|
||||
int shiftx;
|
||||
int shifty;
|
||||
|
||||
exploder_point shift;
|
||||
exploder_rect cut;
|
||||
};
|
||||
typedef std::map<std::string, mask> mask_map;
|
||||
struct positioned_surface {
|
||||
positioned_surface() : image(NULL) {};
|
||||
|
||||
std::string name;
|
||||
int x;
|
||||
int y;
|
||||
exploder_point pos;
|
||||
shared_sdl_surface image;
|
||||
|
||||
cutter::mask mask;
|
||||
|
|
|
@ -13,8 +13,33 @@
|
|||
|
||||
#include "exploder_utils.hpp"
|
||||
#include "../game_config.hpp"
|
||||
#include "../config.hpp"
|
||||
#include <png.h>
|
||||
|
||||
exploder_point::exploder_point(const std::string &s)
|
||||
{
|
||||
std::vector<std::string> items = config::split(s);
|
||||
if(items.size() != 2) {
|
||||
x = y = 0;
|
||||
} else {
|
||||
x = atoi(items[0].c_str());
|
||||
y = atoi(items[1].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
exploder_rect::exploder_rect(const std::string &s)
|
||||
{
|
||||
std::vector<std::string> items = config::split(s);
|
||||
if(items.size() != 4) {
|
||||
x = y = w = h = 0;
|
||||
} else {
|
||||
x = atoi(items[0].c_str());
|
||||
y = atoi(items[1].c_str());
|
||||
w = atoi(items[2].c_str());
|
||||
h = atoi(items[3].c_str());
|
||||
}
|
||||
}
|
||||
|
||||
std::string get_mask_dir()
|
||||
{
|
||||
// return ".";
|
||||
|
|
|
@ -19,13 +19,34 @@
|
|||
|
||||
struct exploder_failure
|
||||
{
|
||||
public:
|
||||
exploder_failure(const std::string& message) :
|
||||
message(message) {}
|
||||
|
||||
std::string message;
|
||||
};
|
||||
|
||||
struct exploder_point
|
||||
{
|
||||
exploder_point() : x(0), y(0) {};
|
||||
exploder_point(int x, int y) : x(x), y(y) {};
|
||||
exploder_point(const std::string &s);
|
||||
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
|
||||
struct exploder_rect
|
||||
{
|
||||
exploder_rect() : x(0), y(0), w(0), h(0) {};
|
||||
exploder_rect(int x,int y, int w, int h) : x(x), y(y), w(w), h(h) {};
|
||||
exploder_rect(const std::string &s);
|
||||
|
||||
int x;
|
||||
int y;
|
||||
int w;
|
||||
int h;
|
||||
};
|
||||
|
||||
std::string get_mask_dir();
|
||||
std::string get_exploder_dir();
|
||||
|
||||
|
|
|
@ -201,6 +201,11 @@ int unit::side() const
|
|||
return side_;
|
||||
}
|
||||
|
||||
void unit::set_side(int new_side)
|
||||
{
|
||||
side_ = new_side;
|
||||
}
|
||||
|
||||
double unit::alpha() const
|
||||
{
|
||||
return type().alpha();
|
||||
|
|
|
@ -53,6 +53,7 @@ public:
|
|||
bool get_experience(int xp);
|
||||
bool advances() const;
|
||||
int side() const;
|
||||
void set_side(int new_side);
|
||||
double alpha() const;
|
||||
void make_recruiter();
|
||||
bool can_recruit() const;
|
||||
|
|
|
@ -146,6 +146,7 @@ attack_type::attack_type(const config& cfg) : animation_(cfg)
|
|||
type_ = cfg["type"];
|
||||
special_ = cfg["special"];
|
||||
backstab_ = special_ == "backstab";
|
||||
slow_ = special_ == "slow";
|
||||
icon_ = cfg["icon"];
|
||||
if(icon_.empty())
|
||||
icon_ = "attacks/" + name_ + ".png";
|
||||
|
@ -218,6 +219,11 @@ bool attack_type::backstab() const
|
|||
return backstab_;
|
||||
}
|
||||
|
||||
bool attack_type::slow() const
|
||||
{
|
||||
return slow_;
|
||||
}
|
||||
|
||||
bool attack_type::matches_filter(const config& cfg) const
|
||||
{
|
||||
const std::string& filter_range = cfg["range"];
|
||||
|
|
|
@ -94,6 +94,7 @@ public:
|
|||
double defense_weight() const;
|
||||
|
||||
bool backstab() const;
|
||||
bool slow() const;
|
||||
|
||||
const unit_animation& animation() const { return animation_; }
|
||||
|
||||
|
@ -112,9 +113,9 @@ private:
|
|||
double attack_weight_;
|
||||
double defense_weight_;
|
||||
|
||||
//caches whether the unit can backstab. This is important
|
||||
//caches whether the unit can backstab and slow. This is important
|
||||
//because the AI queries it alot.
|
||||
bool backstab_;
|
||||
bool backstab_, slow_;
|
||||
};
|
||||
|
||||
class unit_movement_type;
|
||||
|
|