made it so units with the scepter can be displayed holding the scepter;
added new sea serpent images
36
Makefile.in
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -44,7 +44,21 @@ DIST_COMMON = README $(am__configure_deps) $(dist_man6_MANS) \
|
|||
config/mkinstalldirs
|
||||
subdir = .
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
|
@ -464,16 +478,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
if (etags --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
test -f $$subdir/TAGS && \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
|
@ -483,11 +495,9 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
|||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
@ -514,7 +524,7 @@ distclean-tags:
|
|||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
mkdir $(distdir)
|
||||
$(mkdir_p) $(distdir)/config $(distdir)/doc/man $(distdir)/intl $(distdir)/po
|
||||
$(mkdir_p) $(distdir)/config $(distdir)/doc/man $(distdir)/intl $(distdir)/m4 $(distdir)/po
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
|
||||
list='$(DISTFILES)'; for file in $$list; do \
|
||||
|
@ -596,7 +606,7 @@ distcheck: dist
|
|||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\
|
||||
GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
|
|
2645
aclocal.m4
vendored
33
configure
vendored
|
@ -3189,14 +3189,9 @@ else
|
|||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
# (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored.
|
||||
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
|
||||
am_cv_CC_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
|
@ -10532,14 +10527,9 @@ else
|
|||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
# (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored.
|
||||
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
|
||||
am_cv_CXX_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
|
@ -11370,14 +11360,9 @@ else
|
|||
grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
|
||||
${MAKE-make} -s -f confmf > /dev/null 2>&1; then
|
||||
# icc doesn't choke on unknown options, it will just issue warnings
|
||||
# or remarks (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored or not supported.
|
||||
# When given -MP, icc 7.0 and 7.1 complain thusly:
|
||||
# icc: Command line warning: ignoring option '-M'; no argument required
|
||||
# The diagnosis changed in icc 8.0:
|
||||
# icc: Command line remark: option '-MP' not supported
|
||||
if (grep 'ignoring option' conftest.err ||
|
||||
grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
|
||||
# (even with -Werror). So we grep stderr for any message
|
||||
# that says an option was ignored.
|
||||
if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
|
||||
am_cv_CC_dependencies_compiler_type=$depmode
|
||||
break
|
||||
fi
|
||||
|
|
|
@ -767,23 +767,8 @@ What would you like to wish for?"
|
|||
[/removeitem]
|
||||
[/then]
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name= _ "sceptre of fire"
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=16
|
||||
number=4
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
[/missile_frame]
|
||||
apply_to=variation
|
||||
name=scepter
|
||||
[/effect]
|
||||
[/object]
|
||||
[/event]
|
||||
|
|
|
@ -284,23 +284,8 @@ Defeat:
|
|||
type=Princess,Battle Princess,Fighter,Commander,Lord
|
||||
[/filter]
|
||||
[effect]
|
||||
apply_to=new_attack
|
||||
name=sceptre of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=16
|
||||
number=4
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=fireball.png
|
||||
image_diagonal=fireball.png
|
||||
[/missile_frame]
|
||||
apply_to=variation
|
||||
name=scepter
|
||||
[/effect]
|
||||
[/object]
|
||||
[/event]
|
||||
|
|
|
@ -212,7 +212,7 @@ no_tip_of_day= _ "Do not show tips"
|
|||
tip_of_day1= _ "Lawful units fight better at day, and chaotic units fight better at night. Neutral units are unaffected by day and night."
|
||||
tip_of_day2= _ "In a campaign, you can use veteran units from previous scenarios by using the 'recall' option."
|
||||
tip_of_day3= _ "There are six types of attacks: pierce, blade, impact, fire, cold, and holy. Different units have weaknesses against different types of attacks. Right-click on a unit, and then select 'Unit Description', and then click 'Resistance' to see how much resistance a unit has against different attack types."
|
||||
tip_of_day4= _ "The terrain your units are on determines the chance your opponents have of hitting them in battle. The defensive rating for the currently selected uni in the currently selected terrain is displayed in the top-right corner of the screen."
|
||||
tip_of_day4= _ "The terrain your units are on determines the chance your opponents have of hitting them in battle. The defensive rating for the currently selected unit in the currently selected terrain is displayed in the top-right corner of the screen."
|
||||
tip_of_day5= _ "Poisoned units lose 8 hitpoints every turn, but they will not die from poison: poison will never reduce them below 1 hitpoint. Poisoned units can be cured by moving them to a village, or placing them next to a unit with the 'cure' ability."
|
||||
tip_of_day6= _ "You can use units from a previous scenario by selecting 'Recall' by the game menu. By recalling the same units over and over, you can build up a powerful and experienced army."
|
||||
tip_of_day7= _ "All units have a Zone of Control in each of the hexes next to them. If a unit moves into an enemy's Zone of Control, it may not move any further that turn."
|
||||
|
|
|
@ -34,4 +34,62 @@ get_hit_sound=female-hit.wav
|
|||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
|
||||
[variation]
|
||||
variation_name=scepter
|
||||
id=Battle Princess
|
||||
name= _ "Princess"
|
||||
race=human
|
||||
image=human-battleprincess.png
|
||||
image_defensive=human-battleprincess-defend.png
|
||||
image_leading=human-battleprincess-leading.png
|
||||
profile=portraits/Heir_To_The_Throne/lisar.png
|
||||
hitpoints=52
|
||||
movement_type=elusivefoot
|
||||
movement=6
|
||||
experience=500
|
||||
level=3
|
||||
alignment=neutral
|
||||
advanceto=null
|
||||
cost=110
|
||||
ability=leadership,skirmisher
|
||||
usage=fighter
|
||||
unit_description= _ "A noble at birth, the Princess has learnt swordplay with the greatest generals, and battle tactics with the greatest sages, making her both a great combatant and leader. The units of lower level around the Princess will fight better due to her presence. The Princess is a skilled skirmisher, and ignores enemy zones of control."
|
||||
get_hit_sound=female-hit.wav
|
||||
[attack]
|
||||
name=sword
|
||||
type=blade
|
||||
range=short
|
||||
damage=13
|
||||
number=4
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
image=human-battleprincess-attack.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-250
|
||||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=scepter of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=16
|
||||
number=4
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
halo=halo/fireball7.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
[/variation]
|
||||
[/unit]
|
||||
|
|
|
@ -71,4 +71,69 @@ get_hit_sound=groan.wav
|
|||
image_diagonal=projectiles/missile-ne.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
|
||||
[variation]
|
||||
variation_name=scepter
|
||||
id=Commander
|
||||
name= _ "Commander"
|
||||
race=human
|
||||
image=konrad-commander.png
|
||||
image_defensive=konrad-commander-defend.png
|
||||
image_defensive_long=konrad-commander-ranged-defend.png
|
||||
image_leading=konrad-commander-leading.png
|
||||
profile=portraits/Heir_To_The_Throne/konrad.png
|
||||
hitpoints=45
|
||||
ability=leadership
|
||||
movement_type=smallfoot
|
||||
movement=6
|
||||
experience=60
|
||||
level=2
|
||||
alignment=lawful
|
||||
advanceto=Lord
|
||||
cost=42
|
||||
usage=mixed fighter
|
||||
unit_description= _ "The rank of Commander is held by those who lead battle groups into combat. Possessing leadership skills, they give lower-level units in adjacent hexes improved performance in combat. Commanders are best skilled with the sword, although they also carry a bow to use when necessary. If the Commander is lost, so is the battle."
|
||||
get_hit_sound=groan.wav
|
||||
[attack]
|
||||
name=sword
|
||||
type=blade
|
||||
range=short
|
||||
damage=8
|
||||
number=4
|
||||
[frame]
|
||||
begin=-250
|
||||
end=-200
|
||||
image=konrad-commander.png
|
||||
[/frame]
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
image="konrad-commander-attack.png"
|
||||
[/frame]
|
||||
|
||||
[sound]
|
||||
time=-250
|
||||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=scepter of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=16
|
||||
number=4
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
halo=halo/fireball7.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
[/variation]
|
||||
[/unit]
|
||||
|
|
|
@ -38,4 +38,65 @@ get_hit_sound=groan.wav
|
|||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[variation]
|
||||
variation_name=scepter
|
||||
id=Fighter
|
||||
name= _ "Fighter"
|
||||
race=human
|
||||
image=konrad-fighter.png
|
||||
image_defensive=konrad-fighter-defend.png
|
||||
profile=portraits/Heir_To_The_Throne/konrad.png
|
||||
hitpoints=32
|
||||
movement_type=smallfoot
|
||||
movement=6
|
||||
experience=28
|
||||
level=1
|
||||
alignment=lawful
|
||||
advanceto=Commander
|
||||
cost=35
|
||||
usage=mixed fighter
|
||||
unit_description= _ "Young and brash, Fighters fight with a sword, and are vulnerable to attack from enemies. However they have the potential to become great warriors one day."
|
||||
get_hit_sound=groan.wav
|
||||
[attack]
|
||||
name=sword
|
||||
type=blade
|
||||
range=short
|
||||
damage=6
|
||||
number=3
|
||||
[frame]
|
||||
begin=-250
|
||||
end=-100
|
||||
image=konrad-fighter.png
|
||||
[/frame]
|
||||
[frame]
|
||||
begin=-100
|
||||
end=50
|
||||
image="konrad-fighter-attack.png"
|
||||
[/frame]
|
||||
|
||||
[sound]
|
||||
time=-250
|
||||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=scepter of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=12
|
||||
number=3
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
halo=halo/fireball7.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
[/variation]
|
||||
[/unit]
|
||||
|
|
|
@ -59,4 +59,63 @@ get_hit_sound=groan.wav
|
|||
image_diagonal=projectiles/missile-ne.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
|
||||
[variation]
|
||||
variation_name=scepter
|
||||
id=Lord
|
||||
name= _ "Lord"
|
||||
race=human
|
||||
image=konrad-lord.png
|
||||
image_defensive=konrad-lord-defend.png
|
||||
image_leading=konrad-lord-leading.png
|
||||
profile=portraits/Heir_To_The_Throne/konrad.png
|
||||
hitpoints=68
|
||||
ability=leadership
|
||||
movement_type=smallfoot
|
||||
movement=6
|
||||
experience=500
|
||||
level=3
|
||||
alignment=lawful
|
||||
advanceto=null
|
||||
cost=150
|
||||
usage=mixed fighter
|
||||
unit_description= _ "The noble leaders of many troops, Lords are especially strong in melee combat, and also possess skill with the bow. Like Commanders, Lords possess leadership skills, and improve the fighting ability of all adjacent lower-level units."
|
||||
get_hit_sound=groan.wav
|
||||
[attack]
|
||||
name=sword
|
||||
type=blade
|
||||
range=short
|
||||
damage=12
|
||||
number=4
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
image=konrad-lord-attack.png
|
||||
[/frame]
|
||||
|
||||
[sound]
|
||||
time=-250
|
||||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=scepter of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=18
|
||||
number=4
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
halo=halo/fireball7.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
[/variation]
|
||||
[/unit]
|
||||
|
|
|
@ -34,4 +34,77 @@ get_hit_sound=female-hit.wav
|
|||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
|
||||
[variation]
|
||||
variation_name=scepter
|
||||
id=Princess
|
||||
name= _ "Princess"
|
||||
race=human
|
||||
image=scepter-princess.png
|
||||
image_defensive=scepter-princess-defend.png
|
||||
image_leading=scepter-princess-leading.png
|
||||
profile=portraits/Heir_To_The_Throne/lisar.png
|
||||
hitpoints=48
|
||||
movement_type=elusivefoot
|
||||
movement=6
|
||||
experience=150
|
||||
level=2
|
||||
alignment=neutral
|
||||
advanceto=Battle Princess
|
||||
cost=110
|
||||
ability=leadership
|
||||
usage=fighter
|
||||
unit_description= _ "A noble by birth, the Princess has learnt swordplay with the greatest generals and battle tactics with the greatest sages, making her both a great combatant and leader. The units of lower level around the Princess will fight better due to her presence. The Princess is also nimble and dextrous, having skills like that of a thief."
|
||||
get_hit_sound=female-hit.wav
|
||||
[attack]
|
||||
name=sword
|
||||
type=blade
|
||||
range=short
|
||||
damage=11
|
||||
number=4
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
image=scepter-princess-attack-sword.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-250
|
||||
sound=sword-swish.wav
|
||||
[/sound]
|
||||
[/attack]
|
||||
[attack]
|
||||
name=scepter of fire
|
||||
type=fire
|
||||
range=long
|
||||
special=magical
|
||||
damage=14
|
||||
number=4
|
||||
[frame]
|
||||
begin=-300
|
||||
end=-200
|
||||
image=scepter-princess-attack-scepter-1.png
|
||||
[/frame]
|
||||
[frame]
|
||||
begin=-200
|
||||
end=-100
|
||||
image=scepter-princess-attack-scepter-2.png
|
||||
[/frame]
|
||||
[frame]
|
||||
begin=-100
|
||||
end=100
|
||||
image=scepter-princess-attack-scepter-3.png
|
||||
[/frame]
|
||||
[sound]
|
||||
time=-200
|
||||
sound=fire.wav
|
||||
[/sound]
|
||||
[missile_frame]
|
||||
begin=-100
|
||||
end=0
|
||||
image=projectiles/fireball.png
|
||||
image_diagonal=projectiles/fireball.png
|
||||
halo=halo/fireball7.png
|
||||
[/missile_frame]
|
||||
[/attack]
|
||||
[/variation]
|
||||
[/unit]
|
||||
|
|
|
@ -3,6 +3,7 @@ id=Sea Serpent
|
|||
name= _ "Sea Serpent"
|
||||
race=monster
|
||||
image=seaserpent.png
|
||||
image_defensive=seaserpent-defend.png
|
||||
hitpoints=85
|
||||
movement_type=swimmer
|
||||
movement=8
|
||||
|
@ -20,5 +21,10 @@ get_hit_sound=groan.wav
|
|||
range=short
|
||||
damage=18
|
||||
number=2
|
||||
[frame]
|
||||
begin=-200
|
||||
end=100
|
||||
image=seaserpent-attack.png
|
||||
[/frame]
|
||||
[/attack]
|
||||
[/unit]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -41,7 +41,21 @@ DIST_COMMON = $(am__dist_gnome1desktop_DATA_DIST) \
|
|||
$(am__dist_kdedesktop_DATA_DIST) $(srcdir)/Makefile.am \
|
||||
$(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
|
BIN
images/scepter-princess-attack-scepter-1.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/scepter-princess-attack-scepter-2.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/scepter-princess-attack-scepter-3.png
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/scepter-princess-attack-scepter.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/scepter-princess-attack-sword.png
Normal file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/scepter-princess-defend.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/scepter-princess-leading.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/scepter-princess.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/seaserpent-attack.png
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
images/seaserpent-defend.png
Normal file
After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1,023 B After Width: | Height: | Size: 2.3 KiB |
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -37,7 +37,21 @@ host_triplet = @host@
|
|||
subdir = m4
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -47,7 +47,21 @@ bin_PROGRAMS = wesnoth$(EXEEXT) $(am__EXEEXT_1)
|
|||
subdir = src
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
@ -1125,16 +1139,14 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
$(TAGS_FILES) $(LISP)
|
||||
tags=; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
if (etags --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
test -f $$subdir/TAGS && \
|
||||
tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
|
@ -1144,11 +1156,9 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
15
src/help.cpp
|
@ -551,15 +551,14 @@ std::vector<topic> generate_unit_topics() {
|
|||
}
|
||||
else if (desc_type == FULL_DESCRIPTION) {
|
||||
const std::string detailed_description = type.unit_description();
|
||||
const unit_type *female_type = type.get_gender_unit_type(unit_race::FEMALE);
|
||||
const unit_type *male_type = type.get_gender_unit_type(unit_race::MALE);
|
||||
const unit_type& female_type = type.get_gender_unit_type(unit_race::FEMALE);
|
||||
const unit_type& male_type = type.get_gender_unit_type(unit_race::MALE);
|
||||
|
||||
// Show the unit's image and it's level.
|
||||
if (male_type != NULL) {
|
||||
ss << "<img>src='" << male_type->image() << "'</img> ";
|
||||
}
|
||||
if (female_type != NULL && female_type != male_type) {
|
||||
ss << "<img>src='" << female_type->image() << "'</img> ";
|
||||
// Show the unit's image and its level.
|
||||
ss << "<img>src='" << male_type.image() << "'</img> ";
|
||||
|
||||
if (&female_type != &male_type) {
|
||||
ss << "<img>src='" << female_type.image() << "'</img> ";
|
||||
}
|
||||
ss << "<format>font_size=11 text=' " << escape(_("level"))
|
||||
<< " " << type.level() << "'</format>\n";
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -41,7 +41,21 @@ bin_PROGRAMS = wesnothd$(EXEEXT)
|
|||
subdir = src/server
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
@ -491,11 +505,9 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -43,7 +43,21 @@ bin_PROGRAMS = make_translation$(EXEEXT) merge_translations$(EXEEXT) \
|
|||
subdir = src/tools
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
@ -608,11 +622,9 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|
42
src/unit.cpp
|
@ -69,7 +69,7 @@ unit_race::GENDER unit::generate_gender(const unit_type& type, bool gen)
|
|||
//constructor for creating a new unit
|
||||
unit::unit(const unit_type* t, int side, bool use_traits, bool dummy_unit, unit_race::GENDER gender) :
|
||||
gender_(dummy_unit ? gender : generate_gender(*t,use_traits)),
|
||||
type_(t->get_gender_unit_type(gender_)), state_(STATE_NORMAL),
|
||||
type_(&t->get_gender_unit_type(gender_)), state_(STATE_NORMAL),
|
||||
hitpoints_(type_->hitpoints()),
|
||||
maxHitpoints_(type_->hitpoints()),
|
||||
backupMaxHitpoints_(type_->hitpoints()), experience_(0),
|
||||
|
@ -97,7 +97,8 @@ unit::unit(const unit_type* t, int side, bool use_traits, bool dummy_unit, unit_
|
|||
|
||||
//constructor for advancing a unit from a lower level
|
||||
unit::unit(const unit_type* t, const unit& u) :
|
||||
gender_(u.gender_), type_(t->get_gender_unit_type(u.gender_)),
|
||||
gender_(u.gender_), variation_(u.variation_),
|
||||
type_(&t->get_gender_unit_type(u.gender_).get_variation(u.variation_)),
|
||||
state_(STATE_NORMAL),
|
||||
hitpoints_(type_->hitpoints()),
|
||||
maxHitpoints_(type_->hitpoints()),
|
||||
|
@ -607,16 +608,12 @@ void unit::read(const game_data& data, const config& cfg)
|
|||
}
|
||||
}
|
||||
|
||||
type_ = type_->get_gender_unit_type(gender_);
|
||||
type_ = &type_->get_gender_unit_type(gender_);
|
||||
|
||||
attacks_ = type_->attacks();
|
||||
backupAttacks_ = attacks_;
|
||||
maxHitpoints_ = type_->hitpoints();
|
||||
backupMaxHitpoints_ = type_->hitpoints();
|
||||
maxMovement_ = type_->movement();
|
||||
backupMaxMovement_ = type_->movement();
|
||||
maxExperience_ = type_->experience_needed();
|
||||
backupMaxExperience_ = type_->experience_needed();
|
||||
variation_ = cfg["variation"];
|
||||
type_ = &type_->get_variation(variation_);
|
||||
|
||||
reset_modifications();
|
||||
|
||||
side_ = atoi(cfg["side"].c_str());
|
||||
if(side_ <= 0) {
|
||||
|
@ -728,6 +725,8 @@ void unit::write(config& cfg) const
|
|||
|
||||
cfg["gender"] = gender_ == unit_race::MALE ? "male" : "female";
|
||||
|
||||
cfg["variation"] = variation_;
|
||||
|
||||
cfg["role"] = role_;
|
||||
|
||||
config status_flags;
|
||||
|
@ -995,7 +994,14 @@ void unit::add_modification(const std::string& type,
|
|||
|
||||
const std::string& apply_to = (**i.first)["apply_to"];
|
||||
|
||||
if(apply_to == "new_attack") {
|
||||
//apply variations -- only apply if we are adding this
|
||||
//for the first time.
|
||||
if(apply_to == "variation" && no_add == false) {
|
||||
variation_ = (**i.first)["name"];
|
||||
type_ = &type_->get_variation(variation_);
|
||||
reset_modifications();
|
||||
apply_modifications();
|
||||
} else if(apply_to == "new_attack") {
|
||||
attacks_.push_back(attack_type(**i.first));
|
||||
} else if(apply_to == "attack") {
|
||||
|
||||
|
@ -1138,6 +1144,18 @@ void unit::add_modification(const std::string& type,
|
|||
modificationDescriptions_[type] += description.str();
|
||||
}
|
||||
|
||||
void unit::reset_modifications()
|
||||
{
|
||||
attacks_ = type_->attacks();
|
||||
backupAttacks_ = attacks_;
|
||||
maxHitpoints_ = type_->hitpoints();
|
||||
backupMaxHitpoints_ = type_->hitpoints();
|
||||
maxMovement_ = type_->movement();
|
||||
backupMaxMovement_ = type_->movement();
|
||||
maxExperience_ = type_->experience_needed();
|
||||
backupMaxExperience_ = type_->experience_needed();
|
||||
}
|
||||
|
||||
void unit::apply_modifications()
|
||||
{
|
||||
log_scope("apply mods");
|
||||
|
|
|
@ -152,6 +152,7 @@ public:
|
|||
private:
|
||||
unit_race::GENDER generate_gender(const unit_type& type, bool use_genders);
|
||||
unit_race::GENDER gender_;
|
||||
std::string variation_;
|
||||
|
||||
const unit_type* type_;
|
||||
|
||||
|
@ -213,6 +214,7 @@ private:
|
|||
|
||||
UPKEEP_COST upkeep_;
|
||||
|
||||
void reset_modifications();
|
||||
void apply_modifications();
|
||||
void remove_temporary_modifications();
|
||||
void generate_traits();
|
||||
|
|
|
@ -512,7 +512,8 @@ void unit_movement_type::set_parent(const unit_movement_type* parent)
|
|||
}
|
||||
|
||||
unit_type::unit_type(const unit_type& o)
|
||||
: cfg_(o.cfg_), race_(o.race_), alpha_(o.alpha_), abilities_(o.abilities_),
|
||||
: variations_(o.variations_), cfg_(o.cfg_), race_(o.race_),
|
||||
alpha_(o.alpha_), abilities_(o.abilities_),
|
||||
max_heals_(o.max_heals_), heals_(o.heals_), regenerates_(o.regenerates_),
|
||||
leadership_(o.leadership_), illuminates_(o.illuminates_),
|
||||
skirmish_(o.skirmish_), teleport_(o.teleport_),
|
||||
|
@ -529,6 +530,11 @@ unit_type::unit_type(const config& cfg, const movement_type_map& mv_types,
|
|||
const race_map& races, const std::vector<config*>& traits)
|
||||
: cfg_(cfg), alpha_(1.0), movementType_(cfg), possibleTraits_(traits)
|
||||
{
|
||||
const config::child_list& variations = cfg.get_children("variation");
|
||||
for(config::child_list::const_iterator var = variations.begin(); var != variations.end(); ++var) {
|
||||
variations_.insert(std::pair<std::string,unit_type>((**var)["variation_name"],unit_type(**var,mv_types,races,traits)));
|
||||
}
|
||||
|
||||
gender_types_[0] = NULL;
|
||||
gender_types_[1] = NULL;
|
||||
|
||||
|
@ -617,14 +623,24 @@ unit_type::~unit_type()
|
|||
delete gender_types_[unit_race::FEMALE];
|
||||
}
|
||||
|
||||
const unit_type* unit_type::get_gender_unit_type(unit_race::GENDER gender) const
|
||||
const unit_type& unit_type::get_gender_unit_type(unit_race::GENDER gender) const
|
||||
{
|
||||
const size_t i = gender;
|
||||
if(i < sizeof(gender_types_)/sizeof(*gender_types_) && gender_types_[i] != NULL) {
|
||||
return gender_types_[i];
|
||||
return *gender_types_[i];
|
||||
}
|
||||
|
||||
return this;
|
||||
return *this;
|
||||
}
|
||||
|
||||
const unit_type& unit_type::get_variation(const std::string& name) const
|
||||
{
|
||||
const std::map<std::string,unit_type>::const_iterator i = variations_.find(name);
|
||||
if(i != variations_.end()) {
|
||||
return i->second;
|
||||
} else {
|
||||
return *this;
|
||||
}
|
||||
}
|
||||
|
||||
int unit_type::num_traits() const { return race_->num_traits(); }
|
||||
|
|
|
@ -161,7 +161,8 @@ public:
|
|||
|
||||
~unit_type();
|
||||
|
||||
const unit_type* get_gender_unit_type(unit_race::GENDER gender) const;
|
||||
const unit_type& get_gender_unit_type(unit_race::GENDER gender) const;
|
||||
const unit_type& get_variation(const std::string& name) const;
|
||||
|
||||
int num_traits() const;
|
||||
|
||||
|
@ -245,6 +246,8 @@ private:
|
|||
|
||||
unit_type* gender_types_[2];
|
||||
|
||||
std::map<std::string,unit_type> variations_;
|
||||
|
||||
const config& cfg_;
|
||||
|
||||
const unit_race* race_;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Makefile.in generated by automake 1.8.5 from Makefile.am.
|
||||
# Makefile.in generated by automake 1.8.3 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||
|
@ -41,7 +41,21 @@ bin_PROGRAMS = wesnoth_zip$(EXEEXT)
|
|||
subdir = src/zip
|
||||
DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
|
||||
$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc21.m4 \
|
||||
$(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/intdiv0.m4 \
|
||||
$(top_srcdir)/m4/intmax.m4 $(top_srcdir)/m4/inttypes-pri.m4 \
|
||||
$(top_srcdir)/m4/inttypes.m4 $(top_srcdir)/m4/inttypes_h.m4 \
|
||||
$(top_srcdir)/m4/lcmessage.m4 $(top_srcdir)/m4/lib-ld.m4 \
|
||||
$(top_srcdir)/m4/lib-link.m4 $(top_srcdir)/m4/lib-prefix.m4 \
|
||||
$(top_srcdir)/m4/longdouble.m4 $(top_srcdir)/m4/longlong.m4 \
|
||||
$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
|
||||
$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
|
||||
$(top_srcdir)/m4/signed.m4 $(top_srcdir)/m4/size_max.m4 \
|
||||
$(top_srcdir)/m4/stdint_h.m4 $(top_srcdir)/m4/uintmax_t.m4 \
|
||||
$(top_srcdir)/m4/ulonglong.m4 $(top_srcdir)/m4/wchar_t.m4 \
|
||||
$(top_srcdir)/m4/wint_t.m4 $(top_srcdir)/m4/xsize.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||
|
@ -472,11 +486,9 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
|||
done | \
|
||||
$(AWK) ' { files[$$0] = 1; } \
|
||||
END { for (i in files) print i; }'`; \
|
||||
if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique; \
|
||||
fi
|
||||
test -z "$(ETAGS_ARGS)$$tags$$unique" \
|
||||
|| $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$tags $$unique
|
||||
ctags: CTAGS
|
||||
CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
|
||||
$(TAGS_FILES) $(LISP)
|
||||
|
|