1 #ifndef __CREATURE_SPREADING_H 2 #define __CREATURE_SPREADING_H 3 4 #include "JA2Types.h" 5 #include "Types.h" 6 7 8 void InitCreatureQuest(void); 9 void SpreadCreatures(void); 10 void DeleteCreatureDirectives(void); 11 12 void SaveCreatureDirectives(HWFILE); 13 void LoadCreatureDirectives(HWFILE, UINT32 uiSavedGameVersion); 14 15 BOOLEAN PrepareCreaturesForBattle(void); 16 void CreatureNightPlanning(void); 17 void CreatureAttackTown(UINT8 ubSectorID, BOOLEAN fSpecificSector); 18 19 void CheckConditionsForTriggeringCreatureQuest( INT16 sSectorX, INT16 sSectorY, INT8 bSectorZ ); 20 21 extern BOOLEAN gfUseCreatureMusic; 22 23 BOOLEAN MineClearOfMonsters( UINT8 ubMineIndex ); 24 25 // Returns true if valid and creature quest over, false if creature quest active or not yet started 26 bool GetWarpOutOfMineCodes(INT16* sector_x, INT16* sector_y, INT8* sector_z, GridNo* insertion_grid_no); 27 28 extern INT16 gsCreatureInsertionCode; 29 extern INT16 gsCreatureInsertionGridNo; 30 extern UINT8 gubNumCreaturesAttackingTown; 31 extern UINT8 gubYoungMalesAttackingTown; 32 extern UINT8 gubYoungFemalesAttackingTown; 33 extern UINT8 gubAdultMalesAttackingTown; 34 extern UINT8 gubAdultFemalesAttackingTown; 35 extern UINT8 gubSectorIDOfCreatureAttack; 36 enum{ 37 CREATURE_BATTLE_CODE_NONE, 38 CREATURE_BATTLE_CODE_TACTICALLYADD, 39 CREATURE_BATTLE_CODE_TACTICALLYADD_WITHFOV, 40 CREATURE_BATTLE_CODE_PREBATTLEINTERFACE, 41 CREATURE_BATTLE_CODE_AUTORESOLVE, 42 }; 43 44 enum 45 { 46 QUEEN_LAIR, //where the queen lives. Highly protected 47 LAIR, //part of the queen's lair -- lots of babies and defending mothers 48 LAIR_ENTRANCE, //where the creatures access the mine. 49 INNER_MINE, //parts of the mines that aren't close to the outside world 50 OUTER_MINE, //area's where miners work, close to towns, creatures love to eat :) 51 FEEDING_GROUNDS, //creatures love to populate these sectors :) 52 MINE_EXIT, //the area that creatures can initiate town attacks if lots of monsters. 53 }; 54 55 extern UINT8 gubCreatureBattleCode; 56 57 void DetermineCreatureTownComposition(UINT8 ubNumCreatures, 58 UINT8 *pubNumYoungMales, UINT8 *pubNumYoungFemales, 59 UINT8 *pubNumAdultMales, UINT8 *pubNumAdultFemales); 60 61 void DetermineCreatureTownCompositionBasedOnTacticalInformation(UINT8 *pubNumCreatures, 62 UINT8 *pubNumYoungMales, UINT8 *pubNumYoungFemales, 63 UINT8 *pubNumAdultMales, UINT8 *pubNumAdultFemales); 64 65 66 BOOLEAN PlayerGroupIsInACreatureInfestedMine(void); 67 68 void EndCreatureQuest(void); 69 70 #endif 71