public override void OnThink() { if (DateTime.Now >= m_NextAbilityTime) { Mobile combatant = this.Combatant; if (combatant != null && combatant.Map == this.Map && combatant.InRange(this, 12)) { m_NextAbilityTime = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(10, 15)); int ability = Utility.Random(4); switch (ability) { case 1: DoAreaLeech(); break; } } } if (DateTime.Now > m_Delay) { Ability2.Aura(this, 10, 20, 2, 3, 0, "The radiating energy emitted from the creature is damaging you!"); m_Delay = DateTime.Now + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10)); } base.OnThink(); }
public void IncrementSecondAbilityLevel() { if (UnspentPoints > LevelingSystem.AbilityPointsCostPerLevel && Ability2Level < LevelingSystem.AbilityMaxLevel) { Ability2Level++; Ability2.IncrementLevel(); UnspentPoints -= LevelingSystem.AbilityPointsCostPerLevel; } }
void OnMouseOver() { if (Input.GetMouseButtonDown(0)) { Ability1 = GameObject.Find("Ability1"); if (Ability1 == null) { Ability1 = GameObject.Find("Ability1Alt"); } Ability2 = GameObject.Find("Ability2"); if (Ability2 == null) { Ability2 = GameObject.Find("Ability2Alt"); } Ability3 = GameObject.Find("Ability3"); if (Ability3 == null) { Ability3 = GameObject.Find("Ability3Alt"); } Ability4 = GameObject.Find("Ability4"); if (Ability4 == null) { Ability4 = GameObject.Find("Ability4Alt"); } if (Ability1.GetComponent <AbilityPreset>().abilityPressed == true) { Ability1.GetComponent <AbilityPreset>().Point(this.gameObject); } if (Ability2.GetComponent <AbilityPreset>().abilityPressed == true) { Ability2.GetComponent <AbilityPreset>().Point(this.gameObject); } if (Ability3.GetComponent <AbilityPreset>().abilityPressed == true) { Ability3.GetComponent <AbilityPreset>().Point(this.gameObject); } if (Ability4.GetComponent <AbilityPreset>().abilityPressed == true) { Ability4.GetComponent <AbilityPreset>().Point(this.gameObject); } } }
public object ExecuteWhenAs(IActor actor, Ability2 ability) => Result;
public override string ToString() { String Moves = ""; String Levels = ""; for (int i = 0; i < MoveLevels.Length; i++) { Moves = Moves + MoveList[i].ToString() + "¶"; Levels = Levels + MoveLevels[i].ToString() + "¶"; } Moves = Moves + "65535"; Levels = Levels + "65535" + "¶"; return(ID + "¶" + Name + "¶" + BaseHP.ToString() + "¶" + BaseAttack.ToString() + "¶" + BaseDefense.ToString() + "¶" + BaseSpecialAttack.ToString() + "¶" + BaseSpecialDefense.ToString() + "¶" + BaseSpeed.ToString() + "¶" + ((int)LevelingType).ToString() + "¶" + FormID.ToString() + "¶" + GenderValue.ToString() + "¶" + ((int)Type1).ToString() + "¶" + ((int)Type2).ToString() + "¶" + CatchRate.ToString() + "¶" + ExpYield.ToString() + "¶" + EffortYield.ToString() + "¶" + Item1.ToString() + "¶" + Item2.ToString() + "¶" + Ability1.ToString() + "¶" + Ability2.ToString() + "¶" + Ability3.ToString() + "¶" + DexEntry + "¶" + Levels + Moves); }
private void RefreshCooldowns() { Ability1?.RefreshCooldown(); Ability2?.RefreshCooldown(); }
public void DisableAllSkills() { Ability1?.Disable(); Ability2?.Disable(); }