/// <summary> /// Initializes a new instance of the <see cref="SensationBot"/> class. /// </summary> /// <param name="type">The bot type.</param> /// <param name="chatLevel">The chat level.</param> public SensationBot(BotType type, int chatLevel = 0) { this.ChatLevel = chatLevel; this.Type = type; }
private bool newBot(Team team, BotType type, Vehicle target, Player owner, Helpers.ObjectState state = null) { if (_bots == null) { _bots = new List <Bot>(); } //Max bots? if (_bots.Count >= _botMax) { //Unless we're a special bot type, disregard if (type == BotType.Marine || type == BotType.Ripper) { Log.write(TLog.Warning, "Excessive bot spawning"); return(false); } } //What kind is it? switch (type) { #region Dropship case BotType.Dropship: { //Collective vehicle ushort vehid = 134; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 134; } Dropship medic = _arena.newBot(typeof(Dropship), vehid, team, null, state, null) as Dropship; if (medic == null) { return(false); } medic._team = team; medic.type = BotType.Dropship; medic.init(state, _baseScript); medic.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(medic); } break; #endregion #region Gunship case BotType.Gunship: { //Collective vehicle ushort vehid = 134; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 147; } Gunship gunship = _arena.newBot(typeof(Gunship), vehid, team, owner, state, null) as Gunship; if (gunship == null) { return(false); } gunship._team = team; gunship.type = BotType.Dropship; gunship.init(state, _baseScript, target, owner, Settings.GameTypes.Coop); gunship.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(gunship); } break; #endregion #region Medic case BotType.Medic: { //Collective vehicle ushort vehid = 301; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } Medic medic = _arena.newBot(typeof(Medic), vehid, team, null, state, null) as Medic; if (medic == null) { return(false); } medic._team = team; medic.type = BotType.Medic; medic.init(this); medic.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(medic); } break; #endregion #region Elite Heavy case BotType.EliteHeavy: { //Collective vehicle ushort vehid = 148; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } EliteHeavy heavy = _arena.newBot(typeof(EliteHeavy), vehid, team, null, state, null) as EliteHeavy; if (heavy == null) { return(false); } heavy._team = team; heavy.type = BotType.EliteHeavy; heavy.init(Settings.GameTypes.Coop, _team); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { heavy._state.health = Convert.ToInt16(heavy._type.Hitpoints); } else { heavy._state.health = Convert.ToInt16(heavy._type.Hitpoints + (heavy._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } heavy.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(heavy); } break; #endregion #region Elite Marine case BotType.EliteMarine: { //Collective vehicle ushort vehid = 146; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } EliteMarine elitemarine = _arena.newBot(typeof(EliteMarine), vehid, team, null, state, null) as EliteMarine; if (elitemarine == null) { return(false); } elitemarine._team = team; elitemarine.type = BotType.EliteHeavy; elitemarine.init(Settings.GameTypes.Coop, _team); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { elitemarine._state.health = Convert.ToInt16(elitemarine._type.Hitpoints); } else { elitemarine._state.health = Convert.ToInt16(elitemarine._type.Hitpoints + (elitemarine._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } elitemarine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(elitemarine); } break; #endregion #region Marine case BotType.Marine: { //Collective vehicle ushort vehid = 131; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } int playercount = _team.ActivePlayerCount; // Adjust bot difficulty by 1 for every player after 6. if (playercount > 6) { _botDifficultyPlayerModifier = playercount - 6; } else { _botDifficultyPlayerModifier = 0; } if ((_botDifficulty + _botDifficultyPlayerModifier) > 10) // If difficulty goes to 11 or beyond we spawn all Adept Marines with increasing chance of Veteran Marines { vehid = 151; Random randVetMarine = new Random(); bool bVetMarine = (randVetMarine.Next(11, 20) <= (_botDifficulty + _botDifficultyPlayerModifier)); if (bVetMarine) { vehid = 154; } } else //If difficulty is 1-10 we spawn normal marines with an increasing chance of adept marines. { Random randAdeptMarine = new Random(); bool bAdeptMarine = (randAdeptMarine.Next(1, 10) <= (_botDifficulty + _botDifficultyPlayerModifier)); if (bAdeptMarine) { vehid = 151; } } Marine marine = _arena.newBot(typeof(Marine), vehid, team, null, state, null) as Marine; if (marine == null) { return(false); } marine._team = team; marine.type = BotType.Marine; marine.init(Settings.GameTypes.Coop, _team); marine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(marine); } break; #endregion #region Ripper case BotType.Ripper: { //Collective vehicle normal Marine ushort vehid = 145; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } int playercount = _team.ActivePlayerCount; // Adjust bot difficulty by 1 for every player after 6. if (playercount > 6) { _botDifficultyPlayerModifier = playercount - 6; } else { _botDifficultyPlayerModifier = 0; } if ((_botDifficulty + _botDifficultyPlayerModifier) > 10) // If difficulty goes to 11 or beyond we spawn all Adept Marines with increasing chance of Veteran Marines { vehid = 152; Random randVetRipper = new Random(); bool bVetRipper = (randVetRipper.Next(11, 20) <= (_botDifficulty + _botDifficultyPlayerModifier)); if (bVetRipper) { vehid = 153; } } else //If difficulty is 1-10 we spawn normal marines with an increasing chance of adept marines. { Random randAdeptRipper = new Random(); bool bAdeptRipper = (randAdeptRipper.Next(1, 10) <= (_botDifficulty + _botDifficultyPlayerModifier)); if (bAdeptRipper) { vehid = 152; } } Ripper ripper = _arena.newBot(typeof(Ripper), vehid, team, null, state, null) as Ripper; if (ripper == null) { return(false); } ripper._team = team; ripper.type = BotType.Ripper; ripper.init(Settings.GameTypes.Coop, _team); ripper.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(ripper); } break; #endregion #region ExoLight case BotType.ExoLight: { //Collective vehicle ushort vehid = 149; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoLight exo = _arena.newBot(typeof(ExoLight), vehid, team, null, state, null) as ExoLight; if (exo == null) { return(false); } exo._team = team; exo.type = BotType.ExoLight; exo.init(Settings.GameTypes.Coop); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { exo._state.health = Convert.ToInt16(exo._type.Hitpoints); } else { exo._state.health = Convert.ToInt16(exo._type.Hitpoints + (exo._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); } break; #endregion #region ExoHeavy case BotType.ExoHeavy: { //Collective vehicle ushort vehid = 430; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoHeavy exo = _arena.newBot(typeof(ExoHeavy), vehid, team, null, state, null) as ExoHeavy; if (exo == null) { return(false); } exo._team = team; exo.type = BotType.ExoHeavy; exo.init(Settings.GameTypes.Coop); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { exo._state.health = Convert.ToInt16(exo._type.Hitpoints); } else { exo._state.health = Convert.ToInt16(exo._type.Hitpoints + (exo._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); } break; #endregion } return(true); }
protected BaseBot(BotType type) { TypeOfBot = type; }
public IActionResult CreateNewBotForSales(TokenChange tokenModel, BotType botType) { int accountId = (int)HttpContext.Items["accountId"]; try { string token = tokenModel?.Token; string botUsername = new TelegramBotClient(token).GetMeAsync().Result.Username; string jsonBotMarkup = localizer[botType.ToString()]; int statusGroupId = contextDb.OrderStatusGroups.First(stat => stat.OwnerId == accountId).Id; //нужно установить групппу статусов if (jsonBotMarkup.Contains("1000001")) { jsonBotMarkup = jsonBotMarkup.Replace("1000001", statusGroupId.ToString()); } BotDB bot = new BotDB { OwnerId = accountId, BotType = "BotForSales", Token = token, BotName = botUsername, Markup = jsonBotMarkup }; contextDb.Bots.Add(bot); //Создание статистики для бота BotForSalesStatistics botForSalesStatistics = new BotForSalesStatistics { Bot = bot, NumberOfOrders = 0, NumberOfUniqueMessages = 0, NumberOfUniqueUsers = 0 }; contextDb.BotForSalesStatistics.Add(botForSalesStatistics); try { contextDb.SaveChanges(); } catch (Exception exception) { throw new TokenMatchException("Возможно в базе уже есть этот бот", exception); } return(RedirectToAction("SalesTreeEditor", "BotForSalesEditing", new { botId = bot.Id })); } catch (TokenMatchException ex) { logger.Log(LogLevel.USER_ERROR, Source.WEBSITE, $"Сайт. Создание нового бота. При " + $"запросе botUsername было выброшено исключение (возможно, введённый" + $"токен был специально испорчен)" + ex.Message, accountId: accountId); ModelState.AddModelError("", "Этот бот уже зарегистрирован."); } catch (Exception ee) { logger.Log(LogLevel.USER_ERROR, Source.WEBSITE, $"Сайт. Создание нового бота. При " + $"запросе botUsername было выброшено исключение (возможно, введённый" + $"токен был специально испорчен)" + ee.Message, accountId: accountId); ModelState.AddModelError("", "Ошибка обработки токена."); } return(View("BotForSalesTokenEntry")); }
private bool newBot(Team team, BotType type, Helpers.ObjectState state = null) { if (_bots == null) { _bots = new List <Bot>(); } switch (type) { case BotType.Medic: { //Collective vehicle ushort vehid = 301; //Titan vehicle? if (team == cqTeam1) { vehid = 128; } Medic medic = _arena.newBot(typeof(Medic), vehid, team, null, state, null) as Medic; if (medic == null) { return(false); } medic._team = team; medic.type = BotType.Medic; medic.init(null); medic.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(medic); } break; case BotType.Marine: { //Collective vehicle ushort vehid = 131; //Titan vehicle? if (team == cqTeam1) { vehid = 133; } Marine marine = _arena.newBot(typeof(Marine), vehid, team, null, state, null) as Marine; if (marine == null) { return(false); } marine._team = team; marine.type = BotType.Marine; marine._cq = this; marine.init(Settings.GameTypes.Conquest, null); marine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(marine); } break; } return(true); }
private static int BotID(BotType type, int numberOfCreate) { return((int)type + numberOfCreate); }
public Bot(BotType type, Team team, Vector2Int pos, string scriptCode) : base(team, pos, 0.95f) { this._type = type; this._shootSpeed = 45 - type.fireSpeed; this._reloadSpeed = 100 - type.reloadSpeed; this._shots = this._type.maxShots; this._health = type.health; this._age = 0; this._isDead = false; // Sandboxed LUA with the ability to keep some things read-only Table protectedTable = new Table(this._script); protectedTable.RegisterCoreModules(CoreModules.Preset_HardSandbox); protectedTable.MetaTable = new Table(this._script); protectedTable.MetaTable["__index"] = this._script.Globals; protectedTable.MetaTable["__newindex"] = (System.Action <Table, DynValue, DynValue>)CaptureNewIndex; // Load in the script code this._script.DoString(scriptCode, protectedTable, "tank.lua"); // Capture LUS print calls this._script.Options.DebugPrint = (System.Action <string>)DefaultPrint; // Variables this._script.Globals ["botAge"] = DynValue.NewNumber(this._age); this._script.Globals ["botHealth"] = DynValue.NewNumber(Mathf.RoundToInt(this._health / this._type.health)); this._script.Globals ["botCanShoot"] = DynValue.NewBoolean(!this._alreadyShot); this._script.Globals ["botHeading"] = DynValue.NewNumber(this._heading); this._script.Globals ["botShots"] = DynValue.NewNumber(this._shots); this._script.Globals ["botTeam"] = DynValue.NewNumber((int)this._team); this._script.Globals ["botTurnRate"] = DynValue.NewNumber(this._type.turnSpeed); // Functions this._script.Globals ["TurnLeft"] = (System.Action <DynValue>)TurnLeft; this._script.Globals ["TurnRight"] = (System.Action <DynValue>)TurnRight; this._script.Globals ["MoveForward"] = (System.Func <DynValue>)MoveForward; this._script.Globals ["WeightedChoice"] = (System.Func <List <int>, DynValue>)WeightedChoice; this._script.Globals ["ShootPrimary"] = (System.Func <DynValue>)ShootPrimary; this._script.Globals ["ScanTerrain"] = (System.Func <List <List <char> > >)ScanTerrain; this._script.Globals ["ScanBots"] = (System.Func <List <Dictionary <string, DynValue> > >)ScanBots; this._script.Globals ["GetPosition"] = (System.Func <Dictionary <string, DynValue> >)GetPosition; this._script.Globals ["Log"] = (System.Action <DynValue>)FancyPrint; this._script.Globals ["BearingTo"] = (System.Func <DynValue, DynValue, DynValue>)BearingTo; this._script.Globals ["ProjectTo"] = (System.Func <DynValue, DynValue, DynValue, DynValue, DynValue>)ProjectTo; this._InitFunction = protectedTable.Get("Init"); if (_InitFunction.IsNil()) { protectedTable ["Init"] = (System.Action)Empty; this._InitFunction = protectedTable.Get("Init"); } this._TickFunction = protectedTable.Get("Tick"); if (_TickFunction.IsNil()) { protectedTable ["Tick"] = (System.Action)Empty; this._TickFunction = protectedTable.Get("Tick"); } try { // Native.Screen.Rect screenSize = Native.Screen.Size(); // Native.Screen.Rect screenRes = Native.Screen.Resolution(); // AddLog(screenSize.width.ToString() + " " + screenSize.height.ToString()); // AddLog(screenRes.width.ToString() + " " + screenRes.height.ToString()); // AddLog("DPI: " + Screen.dpi.ToString()); // AddLog(SystemInfo.graphicsDeviceID.ToString()); // AddLog(SystemInfo.graphicsDeviceName.ToString()); // AddLog(SystemInfo.graphicsDeviceType.ToString()); // AddLog(SystemInfo.deviceModel.ToString()); AddLog("Called Init()"); this._script.Call(this._InitFunction); } catch (SyntaxErrorException err) { AddLog("Syntax Error:"); AddLog(" " + err.DecoratedMessage); } catch (ScriptRuntimeException err) { AddLog("Runtime Error:"); AddLog(" " + err.DecoratedMessage); } catch (InternalErrorException err) { AddLog("Internal Error:"); AddLog(" " + err.DecoratedMessage); } catch (System.Exception err) { AddLog("System Error:"); AddLog(" " + err.Message); AddLog(" " + err.StackTrace); } }
public BotMessageData(BotType botType) { this.BotType = botType; }
public static char GetBotTypeChar(BotType botType) => (char)((int)botType + _OFFSET);
void ManageBehaviour(BotType botType) { CheckAchievingGoal(); PowerupCheck(); }
private bool newBot(Team team, BotType type, Vehicle target, Player owner, Helpers.ObjectState state = null) { if (_bots == null) { _bots = new List <Bot>(); } //Max bots? if (_bots.Count >= _botMax) { //Unless we're a special bot type, disregard if (type == BotType.Marine || type == BotType.Ripper) { Log.write(TLog.Warning, "Excessive bot spawning"); return(false); } } //What kind is it? switch (type) { #region Dropship case BotType.Dropship: { //Collective vehicle ushort vehid = 134; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 134; } Dropship medic = _arena.newBot(typeof(Dropship), vehid, team, null, state, null) as Dropship; if (medic == null) { return(false); } medic._team = team; medic.type = BotType.Dropship; medic.init(state, _baseScript); medic.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(medic); } break; #endregion #region Gunship case BotType.Gunship: { //Collective vehicle ushort vehid = 134; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 147; } Gunship gunship = _arena.newBot(typeof(Gunship), vehid, team, owner, state, null) as Gunship; if (gunship == null) { return(false); } gunship._team = team; gunship.type = BotType.Dropship; gunship.init(state, _baseScript, target, owner, Settings.GameTypes.Coop); gunship.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(gunship); } break; #endregion #region Medic case BotType.Medic: { //Collective vehicle ushort vehid = 301; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } Medic medic = _arena.newBot(typeof(Medic), vehid, team, null, state, null) as Medic; if (medic == null) { return(false); } medic._team = team; medic.type = BotType.Medic; medic.init(this); medic.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(medic); } break; #endregion #region Elite Heavy case BotType.EliteHeavy: { //Collective vehicle ushort vehid = 148; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } EliteHeavy heavy = _arena.newBot(typeof(EliteHeavy), vehid, team, null, state, null) as EliteHeavy; if (heavy == null) { return(false); } heavy._team = team; heavy.type = BotType.EliteHeavy; heavy.init(Settings.GameTypes.Coop, _team); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { heavy._state.health = Convert.ToInt16(heavy._type.Hitpoints); } else { heavy._state.health = Convert.ToInt16(heavy._type.Hitpoints + (heavy._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } heavy.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(heavy); } break; #endregion #region Elite Marine case BotType.EliteMarine: { //Collective vehicle ushort vehid = 146; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 128; } EliteMarine elitemarine = _arena.newBot(typeof(EliteMarine), vehid, team, null, state, null) as EliteMarine; if (elitemarine == null) { return(false); } elitemarine._team = team; elitemarine.type = BotType.EliteHeavy; elitemarine.init(Settings.GameTypes.Coop, _team); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { elitemarine._state.health = Convert.ToInt16(elitemarine._type.Hitpoints); } else { elitemarine._state.health = Convert.ToInt16(elitemarine._type.Hitpoints + (elitemarine._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } elitemarine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(elitemarine); } break; #endregion #region ExoLight case BotType.ExoLight: { //Collective vehicle ushort vehid = 149; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoLight exo = _arena.newBot(typeof(ExoLight), vehid, team, null, state, null) as ExoLight; if (exo == null) { return(false); } exo._team = team; exo.type = BotType.ExoLight; exo.init(Settings.GameTypes.Coop); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { exo._state.health = Convert.ToInt16(exo._type.Hitpoints); } else { exo._state.health = Convert.ToInt16(exo._type.Hitpoints + (exo._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); } break; #endregion #region ExoHeavy case BotType.ExoHeavy: { //Collective vehicle ushort vehid = 430; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoHeavy exo = _arena.newBot(typeof(ExoHeavy), vehid, team, null, state, null) as ExoHeavy; if (exo == null) { return(false); } exo._team = team; exo.type = BotType.ExoHeavy; exo.init(Settings.GameTypes.Coop); if (hpMultiplier != 0.0) { if (_team.ActivePlayerCount <= 1) { exo._state.health = Convert.ToInt16(exo._type.Hitpoints); } else { exo._state.health = Convert.ToInt16(exo._type.Hitpoints + (exo._type.Hitpoints * (_team.ActivePlayerCount * hpMultiplier))); } } exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); } break; #endregion } return(true); }
public static BotInfo GetInfo(BotType botType) { var botInfo = new BotInfo(); switch (botType) { #region Agent, Soldier case BotType.Agent: case BotType.Soldier: { if (botType == BotType.Agent) { botInfo.SearchItems = SearchItems.Secondary; botInfo.AIType = BotAI.Hard; } if (botType == BotType.Soldier || botType == BotType.Soldier2) { botInfo.SearchItems = SearchItems.Primary; botInfo.AIType = BotAI.Soldier; } botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, SizeModifier = Size.BelowNormal, }; break; } #endregion #region Assassin case BotType.AssassinMelee: { botInfo.AIType = BotAI.AssassinMelee; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, RunSpeedModifier = Speed.VeryFast, SprintSpeedModifier = Speed.VeryFast, SizeModifier = Size.BelowNormal, }; break; } case BotType.AssassinRange: { botInfo.AIType = BotAI.AssassinRange; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, RunSpeedModifier = Speed.VeryFast, SprintSpeedModifier = Speed.VeryFast, SizeModifier = Size.BelowNormal, }; break; } #endregion #region Boxer case BotType.ClownBoxer: { botInfo.AIType = BotAI.Hulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.AboveNormal, CurrentHealth = Health.AboveNormal, ProjectileDamageDealtModifier = DamageDealt.VeryLow, MeleeDamageDealtModifier = DamageDealt.AboveNormal, MeleeForceModifier = MeleeForce.Strong, SizeModifier = Size.VeryBig, }; break; } #endregion #region Cowboy (faster grunt) case BotType.ClownCowboy: case BotType.Cowboy: { botInfo.AIType = BotAI.Cowboy; botInfo.EquipWeaponChance = 1f; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.AboveNormal, MeleeDamageDealtModifier = DamageDealt.FairlyLow, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, SizeModifier = Size.Small, }; botInfo.SpawnLine = "Move 'em on, head 'em up..."; botInfo.SpawnLineChance = 0.05f; botInfo.DeathLine = "Count 'em in, ride 'em... oof!"; botInfo.DeathLineChance = 0.05f; break; } #endregion #region Hulk case BotType.BikerHulk: case BotType.GangsterHulk: case BotType.ThugHulk: case BotType.PunkHulk: case BotType.Lumberjack: case BotType.NaziMuscleSoldier: { botInfo.AIType = BotAI.Hulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, ProjectileDamageDealtModifier = DamageDealt.VeryLow, MeleeDamageDealtModifier = DamageDealt.AboveNormal, MeleeForceModifier = MeleeForce.Strong, RunSpeedModifier = Speed.Slow, SprintSpeedModifier = Speed.Slow, SizeModifier = Size.VeryBig, }; break; } #endregion #region Grunt case BotType.Biker: case BotType.NaziScientist: case BotType.Scientist: case BotType.Thug: case BotType.Punk: { botInfo.AIType = BotAI.Grunt; botInfo.EquipWeaponChance = 0.5f; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, SizeModifier = Size.BelowNormal, }; break; } #endregion #region Grunt with weapon case BotType.Agent2: case BotType.Bandido: case BotType.Bodyguard: case BotType.Bodyguard2: case BotType.ClownBodyguard: case BotType.ClownGangster: case BotType.Cyborg: case BotType.Elf: case BotType.Engineer: case BotType.Farmer: case BotType.Gangster: case BotType.Gardener: case BotType.LabAssistant: case BotType.MetroCop: case BotType.NaziSoldier: case BotType.Police: case BotType.PoliceSWAT: case BotType.Spacer: { botInfo.AIType = BotAI.Grunt; botInfo.EquipWeaponChance = 1f; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.BelowNormal, CurrentHealth = Health.BelowNormal, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, SizeModifier = Size.BelowNormal, }; botInfo.SpawnLineChance = .01f; botInfo.DeathLineChance = .01f; if (botType == BotType.Bandido) { botInfo.AIType = BotAI.Cowboy; } if (botType == BotType.Cyborg) { botInfo.ImmuneToInfect = true; } if (botType == BotType.Engineer) { botInfo.Modifiers.SizeModifier = Size.Normal; } if (botType == BotType.Gardener) { botInfo.SpawnLine = "It's almost harvesting season"; } if (botType == BotType.Hunter) { botInfo.SpawnLine = "You can run, but you cant hide"; } break; } #endregion #region Survivor case BotType.SurvivorBiker: case BotType.SurvivorCrazy: case BotType.SurvivorNaked: case BotType.SurvivorRifleman: case BotType.SurvivorRobber: case BotType.SurvivorTough: { botInfo.AIType = BotAI.Grunt; botInfo.EquipWeaponChance = 1f; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Weak, CurrentHealth = Health.Weak, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, MeleeDamageDealtModifier = DamageDealt.BelowNormal, SizeModifier = Size.BelowNormal, }; botInfo.ZombieStatus = ZombieStatus.Infected; switch (botType) { case BotType.SurvivorCrazy: botInfo.Modifiers.CurrentHealth = Health.VeryWeak; botInfo.Modifiers.MeleeDamageDealtModifier = DamageDealt.High; botInfo.Modifiers.RunSpeedModifier = Speed.Fast; botInfo.Modifiers.SprintSpeedModifier = Speed.Fast; break; case BotType.SurvivorNaked: botInfo.Modifiers.RunSpeedModifier = Speed.AboveNormal; botInfo.Modifiers.SprintSpeedModifier = Speed.AboveNormal; break; case BotType.SurvivorTough: botInfo.Modifiers.MeleeDamageTakenModifier = DamageTaken.SlightlyResistant; botInfo.Modifiers.ProjectileDamageTakenModifier = DamageTaken.SlightlyResistant; botInfo.Modifiers.MeleeForceModifier = MeleeForce.Strong; botInfo.Modifiers.SizeModifier = Size.Big; botInfo.Modifiers.RunSpeedModifier = Speed.Slow; botInfo.Modifiers.SprintSpeedModifier = Speed.Slow; break; } break; } #endregion #region Sniper case BotType.Hunter: case BotType.Sniper: case BotType.SpaceSniper: { botInfo.AIType = BotAI.Sniper; botInfo.SearchItems = SearchItems.Primary; botInfo.SearchRange = WpnSearchRange.Nearby; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Weak, CurrentHealth = Health.Weak, ProjectileDamageDealtModifier = DamageDealt.FairlyHigh, ProjectileCritChanceDealtModifier = DamageDealt.FairlyHigh, MeleeDamageDealtModifier = DamageDealt.FairlyLow, RunSpeedModifier = Speed.Slow, SprintSpeedModifier = Speed.Slow, SizeModifier = Size.BelowNormal, }; if (botType == BotType.SpaceSniper) { botInfo.Modifiers.ProjectileDamageDealtModifier = DamageDealt.Normal; botInfo.Modifiers.ProjectileCritChanceDealtModifier = DamageDealt.Normal; } break; } #endregion #region Stripper case BotType.Stripper: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Makeshift | SearchItems.Health; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Weak, CurrentHealth = Health.Weak, ProjectileDamageDealtModifier = DamageDealt.FairlyHigh, ProjectileCritChanceDealtModifier = DamageDealt.FairlyHigh, MeleeDamageDealtModifier = DamageDealt.FairlyLow, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, FireDamageTakenModifier = DamageTaken.Vulnerable, SizeModifier = Size.BelowNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; break; } #endregion #region Zombie case BotType.Zombie: case BotType.ZombieAgent: case BotType.ZombieGangster: case BotType.ZombieNinja: case BotType.ZombiePolice: case BotType.ZombiePrussian: case BotType.ZombieSoldier: case BotType.ZombieThug: case BotType.ZombieWorker: { botInfo.AIType = BotAI.ZombieSlow; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Weak, CurrentHealth = Health.Weak, MeleeDamageDealtModifier = DamageDealt.Low, RunSpeedModifier = Speed.Slow, SizeModifier = Size.BelowNormal, }; botInfo.SpawnLine = "Brainzz"; botInfo.SpawnLineChance = 0.1f; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion #region Zombie fast case BotType.ZombieChild: { botInfo.AIType = BotAI.ZombieFast; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyWeak, CurrentHealth = Health.ExtremelyWeak, MeleeDamageDealtModifier = DamageDealt.Low, RunSpeedModifier = Speed.Fast, SprintSpeedModifier = Speed.Fast, MeleeForceModifier = MeleeForce.Weak, SizeModifier = Size.VerySmall, }; botInfo.SpawnLine = "Brainzz"; botInfo.SpawnLineChance = 0.1f; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion #region Zombie fat case BotType.ZombieFat: { botInfo.AIType = BotAI.ZombieSlow; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.EmbarrassinglyWeak, CurrentHealth = Health.EmbarrassinglyWeak, MeleeDamageDealtModifier = DamageDealt.FairlyHigh, RunSpeedModifier = Speed.BarelyAny, SprintSpeedModifier = Speed.BarelyAny, SizeModifier = Size.Chonky, }; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion #region Zombie flamer case BotType.ZombieFlamer: { botInfo.AIType = BotAI.ZombieFast; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyWeak, CurrentHealth = Health.ExtremelyWeak, FireDamageTakenModifier = DamageTaken.UltraResistant, MeleeDamageDealtModifier = DamageDealt.VeryLow, RunSpeedModifier = Speed.Fast, SprintSpeedModifier = Speed.Fast, SizeModifier = Size.BelowNormal, }; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion #region Zombie hulk case BotType.ZombieBruiser: { botInfo.AIType = BotAI.ZombieHulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.AboveNormal, CurrentHealth = Health.AboveNormal, MeleeDamageDealtModifier = DamageDealt.AboveNormal, MeleeForceModifier = MeleeForce.Strong, RunSpeedModifier = Speed.Slow, SprintSpeedModifier = Speed.Slow, SizeModifier = Size.ExtremelyBig, }; botInfo.SpawnLine = "Brainzz"; botInfo.SpawnLineChance = 0.1f; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion #region Boss Amos case BotType.Amos: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Primary; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, MeleeDamageDealtModifier = DamageDealt.High, ImpactDamageTakenModifier = DamageTaken.FairlyResistant, RunSpeedModifier = Speed.BelowNormal, SprintSpeedModifier = Speed.BelowNormal, MeleeForceModifier = MeleeForce.Strong, SizeModifier = Size.Big, }; break; } #endregion #region Boss Balista case BotType.Balista: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.All; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, RunSpeedModifier = Speed.Fast, SprintSpeedModifier = Speed.Fast, InfiniteAmmo = Constants.TOGGLE_ON, MeleeDamageDealtModifier = DamageDealt.FairlyLow, MeleeForceModifier = MeleeForce.AboveNormal, SizeModifier = Size.AboveNormal, }; botInfo.IsBoss = true; break; } #endregion #region Boss Balloonatic case BotType.Balloonatic: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Primary | SearchItems.Health; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, ImpactDamageTakenModifier = DamageTaken.VeryResistant, SizeModifier = Size.VeryBig, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Bobby case BotType.Bobby: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Secondary | SearchItems.Health | SearchItems.Streetsweeper | SearchItems.Powerups; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, SizeModifier = Size.AboveNormal, ProjectileDamageDealtModifier = DamageDealt.FairlyHigh, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Boffin case BotType.Boffin: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Health | SearchItems.Streetsweeper | SearchItems.Powerups; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, }; botInfo.SpecificSearchItems.Add(WeaponItem.GRENADE_LAUNCHER); botInfo.IsBoss = true; break; } #endregion #region Boss Cindy case BotType.Cindy: { botInfo.AIType = BotAI.Expert; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.SearchItems = SearchItems.Secondary | SearchItems.Streetsweeper | SearchItems.Powerups | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.AboveNormal, CurrentHealth = Health.AboveNormal, MaxEnergy = Stamina.High, CurrentEnergy = Stamina.High, RunSpeedModifier = Speed.Fast, SprintSpeedModifier = Speed.Fast, MeleeForceModifier = MeleeForce.AboveNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Demolitionist case BotType.Demolitionist: { botInfo.AIType = BotAI.RangeHard; botInfo.SearchItems = SearchItems.Primary | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, ProjectileDamageDealtModifier = DamageDealt.UltraHigh, ProjectileCritChanceDealtModifier = DamageDealt.UltraHigh, MeleeDamageDealtModifier = DamageDealt.VeryHigh, RunSpeedModifier = Speed.BarelyAny, SprintSpeedModifier = Speed.BarelyAny, SizeModifier = Size.BelowNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Fritzliebe case BotType.Fritzliebe: { botInfo.AIType = BotAI.Expert; botInfo.SearchItems = SearchItems.Primary | SearchItems.Health; botInfo.SearchRange = WpnSearchRange.Nearby; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, SizeModifier = Size.BelowNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Funnyman case BotType.Funnyman: { botInfo.AIType = BotAI.Expert; botInfo.SearchItems = SearchItems.Primary | SearchItems.Health | SearchItems.Powerups; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, SizeModifier = Size.AboveNormal, }; botInfo.IsBoss = true; break; } #endregion #region Boss Hacker case BotType.Hacker: { botInfo.AIType = BotAI.Hacker; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.AboveNormal, CurrentHealth = Health.AboveNormal, EnergyConsumptionModifier = Constants.TOGGLE_OFF, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, }; botInfo.IsBoss = true; break; } #endregion #region Boss Handler case BotType.Handler: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Health | SearchItems.Powerups | SearchItems.Primary | SearchItems.Secondary; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, MaxEnergy = Stamina.VeryHigh, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Incinerator case BotType.Incinerator: { botInfo.AIType = BotAI.Hard; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyStrong, CurrentHealth = Health.ExtremelyStrong, FireDamageTakenModifier = DamageTaken.ExtremelyResistant, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Jo case BotType.Jo: { botInfo.AIType = BotAI.MeleeExpert; botInfo.SearchItems = SearchItems.Makeshift | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyStrong, CurrentHealth = Health.ExtremelyStrong, MeleeForceModifier = MeleeForce.Strong, SizeModifier = Size.Big, }; botInfo.IsBoss = true; break; } #endregion #region Boss Kingpin case BotType.Kingpin: { botInfo.SearchItems = SearchItems.Secondary | SearchItems.Health | SearchItems.Streetsweeper; botInfo.AIType = BotAI.Kingpin; botInfo.SearchRange = WpnSearchRange.Nearby; // encourage this bot to fight in melee to crush enemies botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, SizeModifier = Size.AboveNormal, }; botInfo.IsBoss = true; break; } #endregion #region Boss Kriegbär case BotType.Kriegbar: { botInfo.AIType = BotAI.RagingHulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.UltraStrong, CurrentHealth = Health.UltraStrong, MaxEnergy = Stamina.UltraHigh, CurrentEnergy = Stamina.UltraHigh, FireDamageTakenModifier = DamageTaken.VeryVulnerable, MeleeForceModifier = MeleeForce.VeryStrong, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, SizeModifier = Size.Chonky, }; botInfo.IsBoss = true; botInfo.SpawnLine = "HNNNARRRRRRRHHH!"; break; } #endregion #region Boss Meatgrinder case BotType.Meatgrinder: { botInfo.AIType = BotAI.Meatgrinder; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyStrong, CurrentHealth = Health.ExtremelyStrong, MaxEnergy = Stamina.ExtremelyHigh, CurrentEnergy = Stamina.ExtremelyHigh, ProjectileDamageDealtModifier = DamageDealt.VeryHigh, MeleeDamageDealtModifier = DamageDealt.VeryHigh, MeleeForceModifier = MeleeForce.Strong, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.Fast, SizeModifier = Size.Big, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Mecha case BotType.Mecha: { botInfo.AIType = BotAI.Hulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.ExtremelyStrong, CurrentHealth = Health.ExtremelyStrong, ExplosionDamageTakenModifier = DamageTaken.ExtremelyResistant, // 1200 (300 / 0.25) ProjectileDamageTakenModifier = DamageTaken.VeryResistant, // 600 ImpactDamageTakenModifier = DamageTaken.Unbeatable, MeleeForceModifier = MeleeForce.UltraStrong, MeleeStunImmunity = Constants.TOGGLE_ON, CanBurn = Constants.TOGGLE_OFF, RunSpeedModifier = Speed.BelowNormal, SprintSpeedModifier = Speed.BelowNormal, SizeModifier = Size.ExtremelyBig, }; botInfo.IsBoss = true; botInfo.ImmuneToInfect = true; break; } #endregion #region Boss MetroCop2 case BotType.MetroCop2: { botInfo.AIType = BotAI.Expert; botInfo.SearchItems = SearchItems.Streetsweeper | SearchItems.Powerups | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, MeleeForceModifier = MeleeForce.AboveNormal, SizeModifier = Size.BelowNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss MirrorMan case BotType.MirrorMan: { botInfo.AIType = BotAI.Expert; botInfo.SearchItems = SearchItems.Secondary | SearchItems.Health | SearchItems.Streetsweeper | SearchItems.Powerups; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, MaxEnergy = Stamina.VeryHigh, CurrentEnergy = Stamina.VeryHigh, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, ProjectileDamageTakenModifier = DamageTaken.ExtremelyResistant, ProjectileCritChanceTakenModifier = DamageTaken.ExtremelyResistant, SizeModifier = Size.Small, }; botInfo.ImmuneToInfect = true; // robot cannot be infected botInfo.SpawnLine = "BRING IT ON!!!"; botInfo.SpawnLineChance = .1f; botInfo.IsBoss = true; break; } #endregion #region Boss Ninja case BotType.Ninja: { botInfo.AIType = BotAI.Ninja; botInfo.SearchItems = SearchItems.Melee; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, MeleeDamageDealtModifier = DamageDealt.FairlyHigh, RunSpeedModifier = Speed.ExtremelyFast, SprintSpeedModifier = Speed.ExtremelyFast, SizeModifier = Size.Small, EnergyRechargeModifier = EnergyRecharge.Quick, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; botInfo.SpawnLine = "Tatakai..."; botInfo.DeathLine = "H-h-haji..."; break; } #endregion #region Boss PoliceChief case BotType.PoliceChief: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Secondary | SearchItems.Health | SearchItems.Powerups; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, EnergyRechargeModifier = EnergyRecharge.Quick, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Teddybear case BotType.Teddybear: { botInfo.AIType = BotAI.Hulk; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.UltraStrong, CurrentHealth = Health.UltraStrong, MaxEnergy = Stamina.UltraHigh, CurrentEnergy = Stamina.UltraHigh, MeleeDamageDealtModifier = DamageDealt.High, MeleeForceModifier = MeleeForce.VeryStrong, RunSpeedModifier = Speed.BelowNormal, SprintSpeedModifier = Speed.BelowNormal, SizeModifier = Size.Chonky, }; botInfo.IsBoss = true; break; } #endregion #region Boss Babybear case BotType.Babybear: { botInfo.AIType = BotAI.Babybear; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryWeak, CurrentHealth = Health.VeryWeak, RunSpeedModifier = Speed.VeryFast, SprintSpeedModifier = Speed.VeryFast, MeleeForceModifier = MeleeForce.Weak, SizeModifier = Size.Tiny, }; botInfo.IsBoss = true; // set IsBoss to spawn once break; } #endregion #region Boss Raze case BotType.Raze: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Primary | SearchItems.Secondary | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, ExplosionDamageTakenModifier = DamageTaken.VeryResistant, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss Reznor case BotType.Reznor: { botInfo.AIType = BotAI.Hard; botInfo.SearchItems = SearchItems.Primary | SearchItems.Health | SearchItems.Powerups; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, RunSpeedModifier = Speed.Slow, SprintSpeedModifier = Speed.Slow, MeleeForceModifier = MeleeForce.AboveNormal, CanBurn = Constants.TOGGLE_ON, InfiniteAmmo = Constants.TOGGLE_ON, SizeModifier = Size.Big, }; botInfo.IsBoss = true; // set IsBoss to spawn once break; } #endregion #region Boss Santa case BotType.Santa: { botInfo.AIType = BotAI.Hard; // ChallengeA botInfo.SearchRange = WpnSearchRange.InSight; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, ExplosionDamageTakenModifier = DamageTaken.VeryResistant, MeleeForceModifier = MeleeForce.Strong, SizeModifier = Size.Big, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; botInfo.SpawnLine = "Ho ho ho!"; botInfo.DeathLine = "Ho ohhhh..."; break; } #endregion #region Boss Sheriff case BotType.Sheriff: { botInfo.AIType = BotAI.Sheriff; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.Strong, CurrentHealth = Health.Strong, MaxEnergy = Stamina.AboveNormal, CurrentEnergy = Stamina.AboveNormal, ProjectileDamageTakenModifier = DamageTaken.FairlyResistant, SizeModifier = Size.AboveNormal, ItemDropMode = ItemDropMode.Break, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; botInfo.SearchItems = SearchItems.Secondary | SearchItems.Powerups | SearchItems.Health; botInfo.SpawnLine = "I wanted to break your jaw"; botInfo.SpawnLineChance = .1f; break; } #endregion #region Boss Smoker case BotType.Smoker: { botInfo.AIType = BotAI.Hard; botInfo.SearchRange = WpnSearchRange.InSight; botInfo.SearchItems = SearchItems.Primary | SearchItems.Powerups | SearchItems.Health; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, FireDamageTakenModifier = DamageTaken.SlightlyResistant, ProjectileDamageDealtModifier = DamageDealt.BelowNormal, InfiniteAmmo = Constants.TOGGLE_ON, }; botInfo.IsBoss = true; break; } #endregion #region Boss ZombieFighter case BotType.ZombieFighter: { botInfo.AIType = BotAI.ZombieFighter; botInfo.Modifiers = new PlayerModifiers(true) { MaxHealth = Health.VeryStrong, CurrentHealth = Health.VeryStrong, MeleeDamageDealtModifier = DamageDealt.AboveNormal, RunSpeedModifier = Speed.AboveNormal, SprintSpeedModifier = Speed.AboveNormal, SizeModifier = Size.Big, }; botInfo.IsBoss = true; botInfo.ZombieStatus = ZombieStatus.Zombie; break; } #endregion } return(botInfo); }
private Bot newBot(Team team, BotType type, Vehicle target, Player owner, BotLevel level, Helpers.ObjectState state = null) { if (_bots == null) { _bots = new List <Bot>(); } //Max bots? if (_bots.Count >= _botMax) { //Unless we're a special bot type, disregard if (type == BotType.Marine || type == BotType.Ripper) { Log.write(TLog.Warning, "Excessive bot spawning"); return(null); } } //What kind is it? switch (type) { #region Gunship case BotType.Gunship: { //Collective vehicle ushort vehid = 134; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 147; } Gunship gunship = _arena.newBot(typeof(Gunship), vehid, team, owner, state, null) as Gunship; if (gunship == null) { return(null); } gunship._team = team; gunship.type = BotType.Dropship; gunship.init(state, _baseScript, target, owner, Settings.GameTypes.RTS); gunship.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(gunship); return(gunship as Bot); } #endregion #region Elite Heavy case BotType.EliteHeavy: { //Collective vehicle ushort vehid = 148; EliteHeavy heavy = _arena.newBot(typeof(EliteHeavy), vehid, team, null, state, null) as EliteHeavy; if (heavy == null) { return(null); } heavy._team = team; heavy.type = BotType.EliteHeavy; heavy.init(Settings.GameTypes.RTS, _collective); heavy.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(heavy); return(heavy as Bot); } #endregion #region Elite Marine case BotType.EliteMarine: { //Collective vehicle ushort vehid = 146; EliteMarine elitemarine = _arena.newBot(typeof(EliteMarine), vehid, team, null, state, null) as EliteMarine; if (elitemarine == null) { return(null); } elitemarine._team = team; elitemarine.type = BotType.EliteHeavy; elitemarine.init(Settings.GameTypes.RTS, _collective); elitemarine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(elitemarine); return(elitemarine as Bot); } #endregion #region Marine case BotType.Marine: { //Collective vehicle ushort vehid = 131; switch (level) { case BotLevel.Adept: vehid = 151; break; } Marine marine = _arena.newBot(typeof(Marine), vehid, team, null, state, null) as Marine; if (marine == null) { return(null); } marine._team = team; marine.type = BotType.Marine; marine.init(Settings.GameTypes.RTS, _collective); marine.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(marine); return(marine as Bot); } #endregion #region Ripper case BotType.Ripper: { //Collective vehicle normal Marine ushort vehid = 145; switch (level) { case BotLevel.Adept: vehid = 152; break; } Ripper ripper = _arena.newBot(typeof(Ripper), vehid, team, null, state, null) as Ripper; if (ripper == null) { return(null); } ripper._team = team; ripper.type = BotType.Ripper; ripper.init(Settings.GameTypes.RTS, _collective); ripper.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(ripper); return(ripper as Bot); } #endregion #region ExoLight case BotType.ExoLight: { //Collective vehicle ushort vehid = 149; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoLight exo = _arena.newBot(typeof(ExoLight), vehid, team, null, state, null) as ExoLight; if (exo == null) { return(null); } exo._team = team; exo.type = BotType.ExoLight; exo.init(Settings.GameTypes.RTS); exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); return(exo as Bot); } #endregion #region ExoHeavy case BotType.ExoHeavy: { //Collective vehicle ushort vehid = 430; //Titan vehicle? if (team._name == "Titan Militia") { vehid = 133; } ExoHeavy exo = _arena.newBot(typeof(ExoHeavy), vehid, team, null, state, null) as ExoHeavy; if (exo == null) { return(null); } exo._team = team; exo.type = BotType.ExoHeavy; exo.init(Settings.GameTypes.RTS); exo.Destroyed += delegate(Vehicle bot) { _bots.Remove((Bot)bot); }; _bots.Add(exo); return(exo as Bot); } #endregion } return(null); }
private int GetBotStats(BotType botType, int level, bool isBoss) => level * ( ((int)botType) * _random.Next(0, 6) + 5 + (isBoss ? (_random.Next(0, 10) + 10) : 0) );
public BotApi(Uri endpoint, string key, BotType botType) { this.apiEndpoint = endpoint; this.apiKey = key; this.botType = botType; }
public void maintainBots(int now) { if (now - _tickLastBotUpdate < 5000 && _tickLastBotUpdate != 0) { return; } bool bUpdated = (_bots.Count == _units.Count); foreach (Unit bot in _units.Values) { if (bUpdated) { break; } BotLevel level = BotLevel.Normal; BotType type = BotType.Marine; switch (bot._vehicleID) { case 152: level = BotLevel.Adept; type = BotType.Ripper; break; case 151: level = BotLevel.Adept; type = BotType.Marine; break; case 131: level = BotLevel.Normal; type = BotType.Marine; break; case 145: level = BotLevel.Normal; type = BotType.Ripper; break; case 146: level = BotLevel.Elite; type = BotType.EliteMarine; break; case 148: level = BotLevel.Elite; type = BotType.EliteHeavy; break; } //Avoids spawning bots under computer vehicles/buildings if (_arena.getVehiclesInRange(bot._state.positionX, bot._state.positionY, 150).Count(veh => veh._type.Type == VehInfo.Types.Computer) > 0) { Helpers.randomPositionInArea(_arena, 200, ref bot._state.positionX, ref bot._state.positionY); } Bot newUnit = newBot(_titan, type, null, null, level, bot._state); if (newUnit == null) { Log.write("[RTS] Could not spawn bot"); } else { bot._bot = newUnit; } } }
/// <summary> /// Place une unité aux coordonnées indiquées /// </summary> /// <param name="type">type de l'unité</param> /// <param name="position">position de l'unité</param> /// <param name="orientation">orientation de l'unité</param> public void SpawnUnit(BotType type, Vector3 position, Quaternion orientation) { GameObject unit = Instantiate(type.PrefabByType(), position, orientation, this.transform); InitUnit(unit, type); }
public void AddBot(BotType type, Bot.Team team, string codeString) { Bot b; Vector2Int startPos = Vector2Int.zero; bool OK = true; do { startPos = new Vector2Int(Random.Range(2, _board.size - 2), Random.Range(2, _board.size - 2)); Cell c = _board.GetCell(startPos.x, startPos.y); if (!c.isGround) { OK = false; } } while(!OK); try { b = new Bot(type, team, startPos, codeString); } catch (System.Exception e) { HUDController.Instance.Error(e.Message); return; } _bots.Add(b); GameObject botObject = Instantiate(TankPrefab); botObject.transform.parent = transform; botObject.transform.localPosition = new Vector3(9999, 9999); Tank botTank = botObject.GetComponent <Tank> (); botTank.bot = b; if (team == BoardItem.Team.Blue) { botTank.body = type.blueBody; botTank.barrel = type.blueBarrel; } else if (team == BoardItem.Team.Dark) { botTank.body = type.darkBody; botTank.barrel = type.darkBarrel; } else if (team == BoardItem.Team.Green) { botTank.body = type.greenBody; botTank.barrel = type.greenBarrel; } else if (team == BoardItem.Team.Red) { botTank.body = type.redBody; botTank.barrel = type.redBarrel; } else if (team == BoardItem.Team.Sand) { botTank.body = type.sandBody; botTank.barrel = type.sandBarrel; } _botObjects.Add(b.id, botObject); HUDController.Instance.AddBot(team, b); }
// =========================== public Commands(BotType type) { botType = type; }
public WebhookLog(BotType botType, int shard, Uri webhookUri) { this.BotType = botType; this.Shard = shard; this.WebhookUri = webhookUri; }
public void ToggleBotSelector(BotType botType, bool isOn = true) { botSelectors[botType].GetComponent <BotSelector>().ToggleSelector(isOn); }
public SubFaction(BotType type, float weight = 0f) { Types = type == BotType.None ? new BotType[] { } : new BotType[] { type }; Weight = weight; }
public static Bot Create(IPlayer player, BotType botType, BotFaction faction) { Bot bot = null; var args = new BotArgs { Player = player, BotType = botType, BotFaction = faction, Info = GetInfo(botType), }; switch (botType) { case BotType.Balista: bot = new BalistaBot(args); break; case BotType.Balloonatic: bot = new BalloonaticBot(args); break; case BotType.Boffin: bot = new BoffinBot(args); break; case BotType.Cindy: bot = new CindyBot(args); break; case BotType.Cowboy: case BotType.ClownCowboy: bot = new CowboyBot(args); break; case BotType.Cyborg: bot = new CyborgBot(args); break; case BotType.Engineer: bot = new EngineerBot(args, player.IsBot ? new EngineerBot_Controller() : null); break; case BotType.Funnyman: bot = new FunnymanBot(args, player.IsBot ? new FunnymanBot_Controller() : null); break; case BotType.Hacker: bot = new HackerBot(args); break; case BotType.Hunter: bot = new HunterBot(args); break; case BotType.Incinerator: bot = new IncineratorBot(args); break; case BotType.Kingpin: bot = new KingpinBot(args, player.IsBot ? new KingpinBot_Controller() : null); break; case BotType.Kriegbar: bot = new KriegbärBot(args, player.IsBot ? new KriegbarBot_Controller() : null); break; case BotType.Mecha: bot = new MechaBot(args, player.IsBot ? new MechaBot_Controller() : null); break; case BotType.MirrorMan: bot = new MirrorManBot(args); break; case BotType.PoliceChief: bot = new PoliceChiefBot(args); break; case BotType.Sheriff: bot = new SheriffBot(args); break; case BotType.Smoker: bot = new SmokerBot(args); break; case BotType.SurvivorBiker: case BotType.SurvivorCrazy: case BotType.SurvivorNaked: case BotType.SurvivorRifleman: case BotType.SurvivorRobber: case BotType.SurvivorTough: bot = new SurvivorBot(args); break; case BotType.Stripper: bot = new StripperBot(args); break; case BotType.Teddybear: bot = new TeddybearBot(args); break; case BotType.Babybear: bot = new BabybearBot(args); break; case BotType.ZombieFat: bot = new ZombieFatBot(args); break; case BotType.ZombieFlamer: bot = new ZombieFlamerBot(args); break; default: bot = new Bot(args); break; } return(bot); }
/// <summary> /// Konstruktor /// </summary> /// <param name="botType"></param> public ChatBot(BotType botType) { this.botType = botType; this.commands = new Commands(botType); }
public IActionResult BotForSalesTokenEntry(BotType botType) { ViewData["botType"] = botType; return(View()); }