//****************************************************************************************// // // UNIVERSAL WARRIOR BRAIN CREATED:11/3/98 BY:david abzug // by the MechCommander(TM) Data Entry Application // // Modification, duplication & distribution is strictly limited to non-commercial // enterprise unless otherwise indicated by FASA Interactive Technologies, Inc. // // Copyright 1997 FASA Interactive Technologies, Inc. //****************************************************************************************// module AmbushBrain : integer; //****************************************************************************************// const #include_ "OConst.abi" #include_ "UnitConst.abi" type var //------------------------------------- // Enter Additional Variables Here static integer Order1Status; static integer Order2Status; static integer Order3Status; static integer Order4Status; static integer Order5Status; //---------------------------------------------------------------------------------------- function Init; code #include_ "UBInit.abi" //---------------------------------------- // Enter Initial Behavior Variations Here // OrderStatus Order1Status = INCOMPLETE; Order2Status = INCOMPLETE; Order3Status = INCOMPLETE; Order4Status = INCOMPLETE; Order5Status = INCOMPLETE; SetEngageRadius(getRealMemory(R_ENGAGE_RADIUS)); SetDisEngageRadius(650); SetSpeed(getIntegerMemory(I_MOVE_SPEED) == 1); SetTactic(getIntegerMemory(I_TACTIC)); endfunction; //---------------------------------------------------------------------------------------- //---------------------------------------------------------------------------------------- // Main Code //---------------------------------------------------------------------------------------- code //Initialize Orders Library initOrders; if (beenHit) then // Order 2 if (Order2Status == INCOMPLETE) then orderPowerUp; Order2Status = SUCCESS; else if (Order2Status <> INCOMPLETE) then // Order 3 if (Order3Status == INCOMPLETE) then Order3Status = Attack; if (Order3Status == INCOMPLETE) then return(1); endif; endif; endif; endif; endif; if (inHotSpot(PLAYER_FORCE,currentx,currenty,125)) then // Order 4 if (Order4Status == INCOMPLETE) then orderPowerUp; Order4Status = SUCCESS; else if (Order4Status <> INCOMPLETE) then // Order 5 if (Order5Status == INCOMPLETE) then Order5Status = Attack; if (Order5Status == INCOMPLETE) then return(1); endif; endif; endif; endif; endif; if (TRUE) then // Order 1 if (Order1Status == INCOMPLETE) then orderPowerDown; Order1Status = SUCCESS; endif; endif; return(1); endmodule.