public virtual void OnPostCombat(CombatEventArgs combatEventArgs) { if (PostCombat != null) { PostCombat(this, combatEventArgs); } }
// Events /// <summary> /// Listens for Death events from our Outposts /// </summary> /// <param name="sender">Sender.</param> /// <param name="args">Arguments.</param> public void SpawnerDeath(object sender, CombatEventArgs args) { // Sanity check! Is this an OutpostCombat? Is destoryed? if (!(sender is OutpostCombat) || sender == null) { // Make sure this never happens again... (sender as OutpostCombat).CombatEvent -= SpawnerDeath; return; } // We only care about death events if (args.Message != CombatEventArgs.CombatMsg.IsDefeated) { // Ignore return; } OutpostCombat senderOC = sender as OutpostCombat; OutpostSpawner senderOS = senderOC.GetComponent <OutpostSpawner>(); // Remove it from our list ourOutposts.Remove(senderOS); // Unsubscribe from its event senderOC.CombatEvent -= SpawnerDeath; }
public void Log(Unit source, CombatEventArgs e) { _timer.Reset(); var log = ImmutableInterlocked.GetOrAdd(ref _summaries, source, _ => _combatSummaryFactory(source)); log.HandleCombatEvent(e); }
//[PROGRAMMER] nQ's Script [PROGRAMMER] Finish //COMBAT HANDLERS: void HandlePlayerAttack(object sender, CombatEventArgs e) { if (e.TorchMod) { if (brawlTier == 1) { playerDamage += e.TorchDmg; } else if (brawlTier == 2) { playerDamage = statusRef.torchAtkHandler(e.TorchDmg); Health -= playerDamage; } } else { punchCombo++; if (brawlTier == 1) { playerDamage = e.Dmg; } else if (brawlTier == 2) { StartCoroutine(throwPunch(2, 0.2f)); } } }
void standardTracker_CombatEvent(CombatEventArgs obj) { //Debug.WriteToChat("Combat: SourceName: " + obj.SourceName + ", TargetName: " + obj.TargetName + ", AttackType: " + obj.AttackType + ", DamageElemenet: " + obj.DamageElemenet + ", IsKillingBlow: " + obj.IsKillingBlow + ", IsCriticalHit: " + obj.IsCriticalHit + ", IsFailedAttack: " + obj.IsFailedAttack + ", DamageAmount: " + obj.DamageAmount); // We only track events that interact with us if (obj.SourceName != CoreManager.Current.CharacterFilter.Name && obj.TargetName != CoreManager.Current.CharacterFilter.Name) { return; } CombatInfo combatInfo = combatInfos.Find(i => i.SourceName == obj.SourceName && i.TargetName == obj.TargetName); if (combatInfo == null) { combatInfo = new CombatInfo(obj.SourceName, obj.TargetName); combatInfos.Add(combatInfo); } combatInfo.AddFromCombatEventArgs(obj); if (CombatInfoUpdated != null) { CombatInfoUpdated(combatInfo); } }
/* Should not be needed... * void Update () * { * * } */ // Event Methods /// <summary> /// Fired when a base is defeated. /// </summary> /// <param name="sender">This is the base that was defeated</param> /// <param name="args">Arguments.</param> public void BaseDefeated(object sender, CombatEventArgs args) { // We only care about death events if (args.Message != CombatEventArgs.CombatMsg.IsDefeated) { // Ignore return; } // The game is over, stop the game Time.timeScale = 0.0f; // So, who lost? string loserText = (sender as BaseFighter).tag; // Make the string to add to GameOverText loserText = "\n" + loserText + " has been defeated!"; // Instantiate our GameOverText object GameObject goText = Instantiate(goTextPF, mainCanvas.transform) as GameObject; Text goTextComp = goText.GetComponent <Text> (); // Move it to the center of the screen goTextComp.rectTransform.anchoredPosition = new Vector2(0.0f, 0.0f); // Add the loser text to the end and we're golden goTextComp.text += loserText; }
public void HandleEnemyAttack(object sender, CombatEventArgs e) { int enemyType = e.CombatLvl; GameObject Attacker = sender as GameObject; npcCombat enemyAI = Attacker.GetComponent <npcCombat> (); if (isBlocking) { if (enemyType == 1) { //Blocks attack and returns KB BlkReceiver(this, new CombatEventArgs(BlkRecoil, Vector3.zero, 0, false, 0)); Debug.Log("Attack blocked"); } else if (enemyType == 2) { Debug.Log("Block negated"); varHealth -= e.Dmg; Debug.Log(varHealth); StartCoroutine(damageEffect()); kbForce = 1.5f * e.Force; dealKnockback = true; P1 = transform.position; P2 = P1 + kbForce; deltaP = Vector2.Distance(P2, P1); Debug.Log(kbForce); } } else if (!isBlocking) { varHealth -= e.Dmg; Debug.Log(varHealth); StartCoroutine(damageEffect()); kbForce = e.Force; dealKnockback = true; P1 = transform.position; P2 = P1 + kbForce; deltaP = Vector2.Distance(P2, P1); Debug.Log(kbForce); } //Ignites player if attacked by on fire enemy if (e.TorchMod) { Debug.Log("Player set on fire"); onFire = true; StartCoroutine(ignitePlayer(enemyAI)); } }
public void InnMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenOldForestRuins.INN_MOBS, true); //Reload LocationHandler.ResetLocation(INN_KEY); } }
public void DefeatedBanditTorturer(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.KILLED_BANDIT_TORTURER, true); // Reload LocationHandler.ResetLocation(TORTURE_CHAMBER_KEY); } }
public void CemeteryWestEndMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.CEMETERY_WEST_END_MOBS, true); //Reload LocationHandler.ResetLocation(CEMETERY_WEST_END_KEY); } }
public void UndergroundPathMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.UNDERGROUND_PATH_MOBS, true); //Reload LocationHandler.ResetLocation(UNDERGROUND_PATH_KEY); } }
public void TwistingPathSpiders(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.TWISTING_PATH_SPIDERS, true); //Reload LocationHandler.ResetLocation(TWISTING_PATH_KEY); } }
public void MarketStreetMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.MARKET_STREET_MOBS, true); //Reload LocationHandler.ResetLocation(MARKET_STREET_KEY); } }
public void SmallHovelMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.DEFEATED_SMALL_HOVEL_MOBS, true); // Reload LocationHandler.ResetLocation(SMALL_HOVEL_KEY); } }
public void DirtyRoomBandits(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.DEFEATED_DIRTY_ROOM_BANDITS, true); // Reload LocationHandler.ResetLocation(DIRTY_ROOM_KEY); } }
public void EastWingCrazedOutlaws(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestTower.DEFEATED_EAST_WING_OUTLAWS, true); // Reload LocationHandler.ResetLocation(EAST_WING_ROOM_KEY); } }
public void CenterWingBandits(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Watertown.LOCATION_STATE_KEY, WatertownForestTower.DEFEATED_CENTER_WING_BANDITS, true); // Reload LocationHandler.ResetLocation(CENTER_WING_ROOM_KEY); } }
public void DefeatBanditLeaders(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenOldForestRuins.DEFEAT_BANDIT_LEADERS, true); //Reload LocationHandler.ResetLocation(TOWN_HALL_KEY); } }
public void LargeRoomNecros(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.DEFEATED_LARGE_ROOM_NECROS, true); // Reload LocationHandler.ResetLocation(LARGE_ROOM_KEY); } }
public void HouseDistrictMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.HOUSE_DISTRICT_MOBS, true); //Reload LocationHandler.ResetLocation(HOUSE_DISTRICT_KEY); } }
public void TownHallMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.TOWN_HALL_MOBS, true); //Reload LocationHandler.ResetLocation(TOWN_HALL_KEY); } }
public void DefeatedContractor(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouBanditAndNecroCave.KILLED_NECRO_CONTRACTOR, true); // Reload LocationHandler.ResetLocation(DARK_ROOM_KEY); } }
public void MaskedBandit(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(BeachTower.LOCATION_STATE_KEY, BeachTowerCapturedVillage.MASKED_BANDIT, true); //Reload LocationHandler.ResetLocation(MAYORS_HOUSE_KEY); } }
public void LoungingRoomPeasants(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_LOUNGING_ROOM_PEASANTS, true); // Reload LocationHandler.ResetLocation(LOUNGING_ROOM_KEY); } }
public void ReligiousShrineClearingMobs(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.RELIGIOUS_SHRINE_CLEARING_MOBS, true); //Reload LocationHandler.ResetLocation(RELIGIOUS_SHRINE_CLEARING_KEY); } }
public void KitchenPeasants(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_KITCHEN_PEASANTS, true); // Reload LocationHandler.ResetLocation(KITCHEN_KEY); } }
public void CemeteryEntranceAmbush(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.CEMETERY_ENTRANCE_AMBUSH, true); //Reload LocationHandler.ResetLocation(CEMETERY_ENTRANCE_KEY); } }
public void BasementLandingBandits(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_BASEMENT_LANDING_BANDITS, true); // Reload LocationHandler.ResetLocation(BASEMENT_LANDING_KEY); } }
public void DemonicNecro(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Banken.LOCATION_STATE_KEY, BankenAshenForestWorshipRegion.DEMONIC_NECROMANCER, true); //Reload LocationHandler.ResetLocation(CEMETERY_NORTH_END_KEY); } }
public void StorageBandits(object sender, CombatEventArgs combatEventArgs) { if (combatEventArgs.CombatResults == CombatResult.PlayerVictory) { LocationHandler.SetLocationStateValue(Ankou.LOCATION_STATE_KEY, AnkouSeedyInn.DEFEATED_STORAGE_BANDITS, true); // Reload LocationHandler.ResetLocation(STORAGE_KEY); } }