#textdomain wesnoth-Eastern_Europe_at_War #This file contains a set of different modifications of the EEaW gameplay #--------------------------------------------------------------- #Abilities #--------------------------------------------------------------- #define OPTION_CASTLESDESTRUCTION [checkbox] id=eeawcastlesdestruction default=yes name="Destruction of castles" description="Enables swedish culverins to destroy fortifications of all kinds." [/checkbox] [/options] [event] name=recruit first_time_only=no [filter] has_weapon=siege [/filter] [if] {VARIABLE_CONDITIONAL eeawcastlesdestruction equals no} [then] [modify_unit] [filter] id=$unit.id [/filter] [object] [filter] id=$unit.id [/filter] [effect] apply_to=attack remove_specials=keepkiller [/effect] [/object] [/modify_unit] [/then] [/if] [/event] [+options] #enddef #define OPTION_ECONOMY [checkbox] id=eeaweconomy default=yes name="Economy" description="Enables certain units to generate additional income." [/checkbox] [/options] [event] name=recruit first_time_only=no [filter] ability=eeawslavemarket [/filter] [if] {VARIABLE_CONDITIONAL eeaweconomy equals no} [then] [modify_unit] [filter] id=$unit.id [/filter] [object] [filter] id=$unit.id [/filter] [effect] apply_to=remove_ability [abilities] {ABILITY_SLAVEMARKET} [/abilities] [/effect] [/object] [/modify_unit] [/then] [/if] [/event] [+options] #enddef #--------------------------------------------------------------- #Units #--------------------------------------------------------------- #define OPTION_HOSPITALS [checkbox] id=eeawhospitals default=yes name="Field Hospitals" description="Enables recruitment of Field Hospitals." [/checkbox] [/options] [event] name=side turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawhospitals equals no} [then] [disallow_recruit] side=$side_number type=zSzpital Polowy,z_szSzpital Polowy [/disallow_recruit] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Polacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Szwedzi} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Turcy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [/then] [/if] [/event] [+options] #enddef #define OPTION_SHIPS [checkbox] id=eeawships default=yes name="Ships" description="Enables recruitment of ships." [/checkbox] [/options] [event] name=side turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawships equals no} [then] [disallow_recruit] side=$side_number type=ta zProm,ta zProm2,ta zLodz,zz zOkret1,zz zOkret2,zz zOkret3,sz zLekki Galeon,sz zOkret Liniowy,sz Galeon,sz Okret wojenny,tu zFusta,tu Galeota,tu Galera,tu zBombaGemisi,kz zCzajka,kz Wielka Czajka [/disallow_recruit] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Polacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Tatarzy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 2} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Kozacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Rosjanie} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Turcy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 2} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Szwedzi} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 2} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Austriacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [/then] [/if] [/event] [+options] #enddef #define OPTION_FULLFLEET [checkbox] id=eeawfullfleet default=no name="Full fleet recruitment" description="Enables players to recruit all levels of their ships, not only level 1. Remember to enable ships first." [/checkbox] [/options] [event] name=side turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawships equals yes} [and] {VARIABLE_CONDITIONAL eeawfullfleet equals yes} [/and] [then] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Polacy} [or] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Austriacy} [/or] [or] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Rosjanie} [/or] [then] [allow_recruit] side=$side_number type=zz zOkret2,zz zOkret3 [/allow_recruit] [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Tatarzy} [then] [allow_recruit] side=$side_number type=ta zProm2 [/allow_recruit] [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Szwedzi} [then] [allow_recruit] side=$side_number type=sz Galeon,sz Okret wojenny [/allow_recruit] [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Turcy} [then] [allow_recruit] side=$side_number type=tu Galeota,tu Galera [/allow_recruit] [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Kozacy} [then] [allow_recruit] side=$side_number type=kz Wielka Czajka [/allow_recruit] [/then] [/if] [/then] [/if] [/event] [+options] #enddef #define OPTION_PEASANTS [checkbox] id=eeawpeasants default=yes name="Level 0 units" description="Enables recruitment of level 0 units. (Not recommended for MP)" [/checkbox] [/options] [event] name=side turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawpeasants equals no} [then] [disallow_recruit] side=$side_number type=kz Peasant,pl Peasant,ru Peasant,sz Peasant,tu Slave,tu Mehterhane [/disallow_recruit] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Polacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Szwedzi} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Turcy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Rosjanie} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [if] {VARIABLE_CONDITIONAL player_$side_number|_faction equals Kozacy} [then] {VARIABLE_OP player_$side_number|_recruitscount sub 1} [/then] [/if] [/then] [/if] [/event] [+options] #enddef #--------------------------------------------------------------- #RULES #--------------------------------------------------------------- #define LASTMAN_ACTION LEVEL [store_unit] [filter] side=$unit.side level={LEVEL} [not] canrecruit=yes [/not] [/filter] variable=newleader [/store_unit] {VARIABLE newleader[0].canrecruit yes} [unstore_unit] variable=newleader[0] find_vacant=no [/unstore_unit] {CLEAR_VARIABLE newleader} #enddef #define OPTION_LASTMANSTANDING [checkbox] id=eeawlastman default=no name="WIN CONDITION: Last man standing" description="The player who eliminates ALL enemy units wins. This overrides default Kill Enemy Leader rule." [/checkbox] [/options] [event] name=last breath first_time_only=no [filter] canrecruit=yes [/filter] [if] {VARIABLE_CONDITIONAL eeawlastman equals yes} [then] [if] #has any units? [have_unit] side=$unit.side count=1-9999 [/have_unit] [then] #find new leader - highest level available [if] #has 4lvl units? [have_unit] side=$unit.side level=4 [/have_unit] [then] {LASTMAN_ACTION 4} [/then] [else] [if] #has 3lvl units? [have_unit] side=$unit.side level=3 [/have_unit] [then] {LASTMAN_ACTION 3} [/then] [else] [if] #has 2lvl units? [have_unit] side=$unit.side level=2 [/have_unit] [then] {LASTMAN_ACTION 2} [/then] [else] [if] #has 1lvl units? [have_unit] side=$unit.side level=1 [/have_unit] [then] {LASTMAN_ACTION 1} [/then] [else] {LASTMAN_ACTION 0} [/else] [/if] [/else] [/if] [/else] [/if] [/else] [/if] [/then] [/if] [/then] [/if] [/event] [+options] #enddef #--------------------------------------------------------------- #GAME MODES #--------------------------------------------------------------- #define OPTION_DEADLINE [slider] id=eeawdeadline default=0 min=0 max=25 name="Recruitation Deadline" description="You can rectuit units for a limited number of turns. Then all recruitation is disabled. Setting the slider to 0 turns off this feature." [/slider] [/options] [event] name=side turn first_time_only=no [if] {VARIABLE_CONDITIONAL eeawdeadline not_equals 0} [then] [if] {VARIABLE_CONDITIONAL turn_number equals $eeawdeadline} [then] [print] text=_"RECRUITATION DISABLED!" duration=400 size=18 {COLOR_HARM} [/print] [disallow_recruit] side=$side_number type=$player_$side_number|_list [/disallow_recruit] [/then] [else] [if] {VARIABLE_CONDITIONAL turn_number less_than $eeawdeadline} [then] {VARIABLE deadline $eeawdeadline} {VARIABLE_OP deadline sub $turn_number} [print] text=_"Recruitation ends in "+$deadline+" turn(s)" duration=300 size=18 {COLOR_HARM} [/print] {CLEAR_VARIABLE deadline} [/then] [/if] [/else] [/if] [/then] [/if] [/event] [+options] #enddef #define OPTION_LIMITRECRUITS [slider] id=eeawlimitrecruits default=0 min=0 max=50 name="Limited Recruits" description="You can rectuit only a limited number of units. After reaching the specified limit, you can no longer recruit. Setting the slider to 0 turns off this feature." [/slider] [/options] [event] name=recruit first_time_only=no [if] {VARIABLE_CONDITIONAL eeawlimitrecruits not_equals 0} [then] [if] [have_unit] side=$side_number [not] canrecruit=yes [/not] count=$eeawlimitrecruits [/have_unit] [then] [disallow_recruit] side=$side_number type=$player_$side_number|_list [/disallow_recruit] [unstore_unit] variable=unit find_vacant=no text=_"Limit reached!" {COLOR_HARM} [/unstore_unit] [/then] [else] [store_unit] [filter] side=$side_number [not] canrecruit=yes [/not] [/filter] variable=recruits [/store_unit] [if] {VARIABLE_CONDITIONAL eeawlimitrecruits greater_than $recruits.length} [then] {VARIABLE recruitsleft $eeawlimitrecruits} {VARIABLE_OP recruitsleft sub $recruits.length} [unstore_unit] variable=unit find_vacant=no text=_""+$recruitsleft+" rectuits left" {COLOR_HARM} [/unstore_unit] {CLEAR_VARIABLE recruitsleft} [/then] [/if] {CLEAR_VARIABLE recruits} [/else] [/if] [/then] [/if] [/event] [+options] #enddef #define OPTION_BOSSMODE [slider] id=eeawbossmode default=0 min=0 max=100 step=10 name="Boss mode - leader's bonus hp:" description="All faction leaders receive bonus hp." [/slider] [/options] [event] name=turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawbossmode not_equals 0} [then] [store_unit] [filter] canrecruit=yes [/filter] variable=leaders [/store_unit] {FOREACH leaders i} {VARIABLE_OP leaders[$i].max_hitpoints add $eeawbossmode} {VARIABLE_OP leaders[$i].hitpoints add $eeawbossmode} [unstore_unit] variable=leaders[$i] find_vacant=no [/unstore_unit] {NEXT i} {CLEAR_VARIABLE leaders} [/then] [/if] [/event] [event] name=post advance first_time_only=no [filter] canrecruit=yes [/filter] [if] {VARIABLE_CONDITIONAL eeawbossmode not_equals 0} [then] {VARIABLE_OP unit.max_hitpoints add $eeawbossmode} {VARIABLE_OP unit.hitpoints add $eeawbossmode} [unstore_unit] variable=unit find_vacant=no [/unstore_unit] [/then] [/if] [/event] [+options] #enddef #define OPTION_PILLAGER [slider] id=eeawpillager default=0 min=0 max=30 step=5 name="Pillager Mode" description="Every time you capture a village, you receive bonus gold. Works great with No Income mode." [/slider] [/options] [event] name=capture first_time_only=no [filter] [/filter] [if] {VARIABLE_CONDITIONAL eeawpillager not_equals 0} [then] [gold] amount=$eeawpillager side=$unit.side [/gold] [sound] name=gold.ogg [/sound] [unstore_unit] variable=unit text=$eeawpillager red,green,blue=255,255,0 find_vacant=no [/unstore_unit] [/then] [/if] [/event] [+options] #enddef #define OPTION_NOINCOME [checkbox] id=eeawnoincome default=no name="No Income" description="Disables all sources of income. All units have no upkeep costs. Turns off all economy related abilities." [/checkbox] [/options] #disable economy [event] name=start {VARIABLE eeaweconomy no} [/event] [event] name=turn 1 first_time_only=no [if] {VARIABLE_CONDITIONAL eeawnoincome equals yes} [then] [modify_side] [filter_side] side="1-9" [/filter_side] income=-2 village_gold=0 [/modify_side] [/then] [/if] [/event] [event] name=recruit first_time_only=no [if] {VARIABLE_CONDITIONAL eeawnoincome equals yes} [then] {MODIFY_UNIT find_in=unit upkeep loyal} [/then] [/if] [/event] [+options] #enddef #define OPTION_NOSPAM [checkbox] id=eeawnospam default=no name="No Spam" description="You can only recruit each unit once. When you run out of possible recruits, the cycle is reset." [/checkbox] [/options] [event] name=recruit first_time_only=no [if] {VARIABLE_CONDITIONAL eeawnospam equals yes} [then] [store_side] variable=side_check side=$side_number [/store_side] {VARIABLE_OP player_$side_number|_counter add 1} [if] {VARIABLE_CONDITIONAL player_$side_number|_counter less_than $player_$side_number|_recruitscount} [then] [disallow_recruit] side=$side_number type=$unit.type [/disallow_recruit] [/then] [else] {VARIABLE player_$side_number|_counter 0} {VARIABLE copyvar1 $player_$side_number|_list} [set_recruit] side=$side_number recruit=$copyvar1 [/set_recruit] [/else] [/if] [/then] [/if] [/event] [+options] #enddef