Skip to content

Commit

Permalink
enable modifications and add Vampire Bitten to Vempire Faction
Browse files Browse the repository at this point in the history
  • Loading branch information
Byteron committed May 27, 2018
1 parent 2171919 commit 8eeb487
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 13 deletions.
2 changes: 1 addition & 1 deletion _main.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
path="data/add-ons/Millennium_Era/"
[/binary_path]

# {~add-ons/Millennium_Era/modifications/}
{~add-ons/Millennium_Era/modifications/}
{~add-ons/Millennium_Era/utils/}
{~add-ons/Millennium_Era/factions/}
{~add-ons/Millennium_Era/eras/}
Expand Down
2 changes: 1 addition & 1 deletion factions/vampires-aoh.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
type=random
leader=Vampire Soul Hunter, Vampire Count, Vampire Night Warrior, Vampire Night Angel, Vampire Grandmaster
random_leader=Vampire Soul Hunter, Vampire Count, Vampire Night Warrior, Vampire Night Angel, Vampire Grandmaster
recruit=Vampire Bounty Hunter, Vampire Blood Hunter, Vampire Fighter, Vampire Commander, Vampire Dark Archer, Vampire Shadow Archer, Vampire Savage, Vampire Lunatic, Vampire Apprentice, Vampire Savant, Vampire Winged, Vampire Wind Chaser
recruit=Vampire Bitten, Vampire Bounty Hunter, Vampire Blood Hunter, Vampire Fighter, Vampire Commander, Vampire Dark Archer, Vampire Shadow Archer, Vampire Savage, Vampire Lunatic, Vampire Apprentice, Vampire Savant, Vampire Winged, Vampire Wind Chaser
[ai]
recruitment_pattern=scout, fighter, fighter, archer, mixed fighter, mixed fighter
[/ai]
Expand Down
2 changes: 1 addition & 1 deletion factions/vampires-default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
type=random
leader=Vampire Blood Hunter, Vampire Commander, Vampire Shadow Fighter, Vampire Shadow Archer, Vampire Savant
random_leader=Vampire Blood Hunter, Vampire Commander, Vampire Shadow Fighter, Vampire Shadow Archer, Vampire Savant
recruit=Vampire Bounty Hunter, Vampire Fighter, Vampire Dark Archer, Vampire Savage, Vampire Apprentice, Vampire Winged
recruit=Vampire Bitten, Vampire Bounty Hunter, Vampire Fighter, Vampire Dark Archer, Vampire Savage, Vampire Apprentice, Vampire Winged
[ai]
recruitment_pattern=scout, fighter, fighter, archer, mixed fighter, mixed fighter
[/ai]
Expand Down
49 changes: 41 additions & 8 deletions modifications/modifications.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,41 @@
[/event]
#enddef

#ifver WESNOTH_VERSION >= 1.13.7
#define RANDOM_BITTEN_VARIATION
[event]
name=prerecruit
first_time_only=no
[filter]
side=$side_number
type=Vampire Bitten
[/filter]
{VARIABLE_OP recruited_unit_random_variation rand none,none,elf}
[if]
[variable]
name=recruited_unit_random_variation
not_equals=none
[/variable]
[then]
[object]
duration=forever
silent=yes
[filter]
x,y=$x1,$y1
[/filter]
[effect]
apply_to=variation
name=$recruited_unit_random_variation
[/effect]
[effect]
apply_to=hitpoints
heal_full=yes
[/effect]
[/object]
[/then]
[/if]
[/event]
#enddef

#define IMPROVE_VAMPIRE_AI_BEHAVIOR VAR1 VAR2
[event]
name=prestart
Expand Down Expand Up @@ -115,7 +149,6 @@
[/if]
[/event]
#enddef
#endif

#ifdef MULTIPLAYER
[modification]
Expand All @@ -129,20 +162,20 @@
description=_"Disallow recruiting Savages for the Vampire faction"
default=no
[/checkbox]
#ifver WESNOTH_VERSION >= 1.13.7
[checkbox]
id=me_improve_vampire_ai
name= _ "Improved Vampire Ai"
description= _"Make the ai not recruit Savages at dawn and morning, so that their castles won't be blocked. Does not have an effect when Savages are disallowed."
default=yes
[/checkbox]
{IMPROVE_VAMPIRE_AI_BEHAVIOR (me_improve_vampire_ai) (me_disallow_savages)}
#endif
[/options]
{DISALLOW_RECRUIT_UNIT (side=) (me_disallow_savages) (Vampire Gargoyle)}
{DISALLOW_RECRUIT_UNIT (side=) (me_disallow_savages) (Vampire Margoyle)}
{IMPROVE_VAMPIRE_AI_BEHAVIOR (me_improve_vampire_ai) (me_disallow_savages)}
{DISALLOW_RECRUIT_UNIT (side=) (me_disallow_savages) (Vampire Savage)}
{DISALLOW_RECRUIT_UNIT (side=) (me_disallow_savages) (Vampire Lunatic)}
{RANDOM_BITTEN_VARIATION}
[/modification]
#endif

#undef DISALLOW_RECRUIT_UNIT
#undef IMPROVE_VAMPIRE_AI_BEHAVIOR
#undef IMPROVE_VAMPIRE_AI_BEHAVIOR
#undef RANDOM_BITTEN_VARIATION
67 changes: 65 additions & 2 deletions units/vampires/0_Bitten.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
experience=24
level=0
alignment=chaotic
advances_to=Vampire Fighter
cost=9
advances_to=Vampire Fighter, Vampire Apprentice
cost=8
usage=fighter
die_sound={SOUND_LIST:HUMAN_DIE}

Expand Down Expand Up @@ -59,4 +59,67 @@
[/attack_anim]

{DEFENSE_ANIM "units/vampires/bitten.png" "units/vampires/bitten.png" {SOUND_LIST:HUMAN_HIT}}

[variation]
variation_id=elf
name= _ "Bitten"
race=vampire
{TRAIT_DEXTROUS}
image="units/vampires/bitten-elf.png"
{MAGENTA_IS_THE_TEAM_COLOR}
hitpoints=20
movement_type=vampfoot
{MOVEMENT_VAMP_ELF}
movement=5
experience=24
level=0
alignment=chaotic
advances_to=Vampire Winged, Vampire Dark Archer
cost=8
usage=fighter
die_sound={SOUND_LIST:HUMAN_DIE}

[attack]
name=fangs
description=_ "fangs"
icon="attacks/fangs.png"
type=blade
range=melee
damage=5
number=2
[/attack]

[attack_anim]
[filter_attack]
name=fangs
[/filter_attack]
start_time=-200
[frame]
duration=50
image="units/vampires/bitten-elf.png"
[/frame]
[if]
hits=yes
[frame]
duration=200
image="units/vampires/bitten-elf.png"
sound=bite-small.ogg
[/frame]
[/if]
[else]
hits=no
[frame]
duration=200
image="units/vampires/bitten-elf.png"
sound={SOUND_LIST:MISS}
[/frame]
[/else]
[frame]
duration=50
image="units/vampires/bitten-elf.png"
[/frame]
[/attack_anim]

{DEFENSE_ANIM "units/vampires/bitten-elf.png" "units/vampires/bitten-elf.png" {SOUND_LIST:HUMAN_HIT}}
[/variation]
[/unit_type]

0 comments on commit 8eeb487

Please sign in to comment.