REM Level 7/Witch's castle

set_generate_speed(150)

computer_player(player1,5)

max_creatures(player0,40)
max_creatures(player1,30)

start_money(player0,15000)
start_money(player1,8250000)

ally_players(player1,player_good)

set_creature_strength(skeleton,199)
set_creature_health(skeleton,555)
set_creature_strength(orc,119)
set_creature_health(orc,1599)
set_creature_strength(hell_hound,159)
set_creature_health(hell_hound,1099)
set_creature_armour(witch,199)
set_creature_health(witch,3099)

add_creature_to_pool(skeleton,20)
add_creature_to_pool(troll,20)
add_creature_to_pool(orc,20)
add_creature_to_pool(hell_hound,20)
add_creature_to_pool(sorceror,20)

add_creature_to_pool(wizard,15)
add_creature_to_pool(time_mage,15)
add_creature_to_pool(monk,15)
add_creature_to_pool(barbarian,15)
add_creature_to_pool(fairy,15)
add_creature_to_pool(samurai,15)
add_creature_to_pool(knight,3)

creature_available(player1,skeleton,1,1)
creature_available(player1,troll,1,1)
creature_available(player1,orc,1,1)
creature_available(player1,hell_hound,1,1)
creature_available(player1,sorceror,1,1)

creature_available(player0,wizard,1,1)
creature_available(player0,time_mage,1,1)
creature_available(player0,monk,1,1)
creature_available(player0,barbarian,1,1)
creature_available(player0,samurai,1,1)
creature_available(player0,fairy,1,1)
creature_available(player0,knight,1,1)

room_available(all_players,treasure,1,1)
room_available(all_players,lair,1,1)
room_available(all_players,garden,1,1)
room_available(all_players,training,1,1)
room_available(all_players,research,1,1)
room_available(all_players,bridge,1,0)
room_available(all_players,graveyard,1,0)
room_available(all_players,workshop,1,0)
room_available(all_players,prison,1,0)
room_available(all_players,barracks,1,0)
room_available(all_players,torture,1,0)
room_available(all_players,temple,1,0)
room_available(all_players,guard_post,1,0)
room_available(all_players,scavenger,1,0)

magic_available(player0,power_imp,1,1)
magic_available(all_players,power_sight,1,0)
magic_available(all_players,power_obey,1,0)
magic_available(all_players,power_speed,1,0)
magic_available(all_players,power_call_to_arms,1,0)
magic_available(all_players,power_cave_in,1,0)
magic_available(all_players,power_heal_creature,1,0)
magic_available(all_players,power_protect,1,0)
magic_available(all_players,power_conceal,1,0)
magic_available(all_players,power_hold_audience,1,0)
magic_available(all_players,power_chicken,1,0)
magic_available(all_players,power_lightning,1,0)
magic_available(all_players,power_disease,1,0)
magic_available(all_players,power_destroy_walls,1,0)
magic_available(player0,power_armageddon,1,1)

trap_available(all_players,word_of_power,1,0)
trap_available(all_players,lightning,1,0)
trap_available(all_players,boulder,1,0)
door_available(all_players,steel,1,0)
door_available(all_players,magic,1,0)

if(player0,game_turn >= 10)
 quick_objective(1,"You have a powerful spell in your arsenal, stolen from wizards. You can use it, or destroy the enemy fortress manually, the choice is yours.",player0)
  set_timer(player_good,timer0)
endif

create_party(repa)
 add_to_party(repa,vampire,6,3333,attack_enemies,0)
 add_to_party(repa,sorceror,6,3333,attack_enemies,0)
 add_to_party(repa,vampire,6,3333,attack_enemies,0)
 add_to_party(repa,sorceror,6,3331,attack_enemies,0)

create_party(belka)
 add_to_party(belka,hell_hound,7,2500,attack_enemies,0)
 add_to_party(belka,hell_hound,7,2500,attack_enemies,0)
 add_to_party(belka,troll,6,2500,attack_enemies,0)
 add_to_party(belka,troll,6,2500,attack_enemies,0)
 add_to_party(belka,troll,6,2500,attack_enemies,0)
 add_to_party(belka,troll,6,2500,attack_enemies,0)

create_party(belb)
 add_to_party(belb,hell_hound,9,2500,attack_enemies,0)
 add_to_party(belb,orc,8,2500,attack_enemies,0)
 add_to_party(belb,orc,8,2500,attack_enemies,0)
 add_to_party(belb,vampire,8,2500,attack_enemies,0)
 add_to_party(belb,vampire,8,2500,attack_enemies,0)
 add_to_party(belb,vampire,7,2500,attack_enemies,0)
 
create_party(sina)
 add_to_party(sina,hell_hound,10,2500,attack_enemies,0)
 add_to_party(sina,sorceror,10,2500,attack_enemies,0)
 add_to_party(sina,sorceror,10,2500,attack_enemies,0)
 add_to_party(sina,orc,10,2500,attack_enemies,0)
 add_to_party(sina,orc,10,2500,attack_enemies,0)
 add_to_party(sina,orc,10,2500,attack_enemies,0)

if(player1,entrance == 0)
 quick_objective(2,"The enemy mobilized all his troops. Crush them!",player0)
magic_available(player1,power_imp,1,1)
 add_party_to_level(player_good,belka,-1,1)
  add_party_to_level(player_good,belb,-2,1)
   add_party_to_level(player_good,belka,-3,1)
    add_party_to_level(player_good,belb,-4,1)
     add_party_to_level(player_good,sina,-5,1)
      add_party_to_level(player_good,sina,-6,1)
 add_creature_to_level(player1,imp,player1,6,3,0)
  add_creature_to_level(player_good,imp,-1,1,3,0)
   add_creature_to_level(player_good,imp,-2,1,3,0)
    add_creature_to_level(player_good,imp,-3,1,3,0)
     add_creature_to_level(player_good,imp,-4,1,3,0)
      add_creature_to_level(player_good,imp,-5,1,3,0)
       add_creature_to_level(player_good,imp,-6,1,3,0)
 add_creature_to_level(player_good,imp,player1,3,3,0)
endif

if(player_good,timer0 >= 15000)
 next_command_reusable
 add_party_to_level(player_good,repa,1,1)
 next_command_reusable
 set_timer(player_good,timer0)
endif

if(player1,dungeon_destroyed == 1)
 quick_objective(3,"And here is the queen of this dead herd.",player0)
 add_creature_to_level(player_good,witch,2,1,10,0)
  add_creature_to_level(player_good,hell_hound,2,1,10,0)
 if(player_good,total_creatures == 0)
   win_game
 endif
endif

if(player0,dungeon_destroyed == 1)
 lose_game
endif