Remove the ghost cap based on number of units recruited.

It could be exploited by not recruiting until dusk.

Given 2 rounds of recruiting based on starting gold, this may make
easy and normal slightly more difficult (depending on number of
recalls) and will not affect hard at all.
This commit is contained in:
Simon Forsyth 2012-07-14 15:44:34 +00:00
parent 6b8611df78
commit cb080a9ae2

View file

@ -332,15 +332,12 @@
# setup ghost difficulty
#ifdef EASY
{VARIABLE max_ghosts 6}
{VARIABLE max_per_turn 1}
#endif
#ifdef NORMAL
{VARIABLE max_ghosts 7}
{VARIABLE max_per_turn 2}
#endif
#ifdef HARD
{VARIABLE max_ghosts 8}
{VARIABLE max_per_turn 3}
#endif
[/event]
@ -1792,7 +1789,6 @@
{CLEAR_VARIABLE ghosts_already_spawned}
{CLEAR_VARIABLE ghosts_killed}
{CLEAR_VARIABLE max_ghosts}
{CLEAR_VARIABLE max_per_turn}
[/event]
#time over defeat event
@ -1882,43 +1878,12 @@
[then]
# spawn more rapidly as time goes by
{VARIABLE ghosts_per_turn $turn_number}
{VARIABLE_OP ghosts_per_turn divide 20}
{VARIABLE_OP ghosts_per_turn add $max_per_turn}
#! -- Amount of ghost generation borders on insane bearing in mind that they now do arcane damage
#! -- and payer won't have any damage type efective against them.
[store_locations]
variable=head_count
[filter]
side=1
[/filter]
[/store_locations]
{VARIABLE ear_count $head_count.length}
{CLEAR_VARIABLE head_count}
#ifdef EASY
# 1 ghost per 4 exposed units (roughly) per turn
{VARIABLE_OP ghosts divide 4}
{VARIABLE_OP ear_count divide 4}
#endif
#ifdef NORMAL
# 1 ghost per 3 exposed units per turn
{VARIABLE_OP ghosts divide 3}
{VARIABLE_OP ear_count divide 3}
#endif
#ifdef HARD
# 1 ghost per 2 exposed units per turn
{VARIABLE_OP ghosts divide 2}
{VARIABLE_OP ear_count divide 2}
#endif
[if]
[variable]
name=max_ghosts
greater_than=$ear_count
[/variable]
[then]
{VARIABLE max_ghosts $ear_count}
[/then]
[/if]
{CLEAR_VARIABLE ear_count}
{VARIABLE_OP ghosts_per_turn divide 21}
{VARIABLE_OP ghosts_per_turn add {ON_DIFFICULTY 1 2 3}}
# 1 ghost per 4/3/2 exposed units (roughly) per turn
{VARIABLE_OP ghosts divide {ON_DIFFICULTY 4 3 2}}
# limit ghost appearance rate
[if]
[variable]