public static HashSet <BonusType> GetMultiplierTypes(AbilityType abilityType, params ElementType[] elements) { HashSet <BonusType> bonusTypes = new HashSet <BonusType>(); foreach (ElementType e in elements) { bonusTypes.Add((BonusType)Enum.Parse(typeof(BonusType), "GLOBAL_" + e.ToString() + "_DAMAGE")); if (abilityType == AbilityType.ATTACK || abilityType == AbilityType.SPELL) { bonusTypes.Add((BonusType)Enum.Parse(typeof(BonusType), abilityType.ToString() + "_" + e.ToString() + "_DAMAGE")); switch (e) { case ElementType.FIRE: case ElementType.COLD: case ElementType.LIGHTNING: case ElementType.EARTH: bonusTypes.Add((BonusType)Enum.Parse(typeof(BonusType), abilityType.ToString() + "_ELEMENTAL_DAMAGE")); bonusTypes.Add(BonusType.GLOBAL_ELEMENTAL_DAMAGE); break; case ElementType.DIVINE: case ElementType.VOID: bonusTypes.Add((BonusType)Enum.Parse(typeof(BonusType), abilityType.ToString() + "_PRIMORDIAL_DAMAGE")); bonusTypes.Add(BonusType.GLOBAL_PRIMORDIAL_DAMAGE); break; } } } return(bonusTypes); }
void FixedUpdate() { Movement(); Forward(); Rotation(); ClampingSpeedValues(); SideWays(); droneBody.AddRelativeForce(Vector3.up * upForce); droneBody.rotation = Quaternion.Euler(new Vector3(tiltAmount, currentYRotation, tiltAmountSide)); if (Input.GetKey(KeyCode.F)) { cmdDropOff(); } if (boxData != null) { healthSlider.value = boxData.boxHealth / 100.0f; } if (Input.GetKeyDown(KeyCode.R)) { if (ability != AbilityType.None) { StartCoroutine("UseAbility"); } } abilityText.text = "Ability Type: " + ability.ToString(); }
public static Ability GetAbility(AbilityType type) { if (!_abilities.ContainsKey(type)) { throw new System.Exception("Ability not defined: " + type.ToString()); } return(_abilities[type]); }
public SaveSituation(Sheet _char, DcProducer cp, AbilityType abilityType, SaveContext context, SpellLibrary.Spell spell = null) { this.saveProducer = _char; this.dcProducer = cp; this.abilityType = abilityType; this.spell = spell; this.context = context; saveValue = new Gauge(abilityType.ToString().ToLower() + " save"); DC = new Gauge("DC"); }
/// <summary> /// Gets the first ability in the deck that matches the type /// </summary> /// <param name="type">The type of ability to search for</param> /// <returns></returns> public Ability GetAbilityByType(AbilityType type) { foreach (Ability ability in _abilities) { if (ability.abilityData.AbilityType == type) { return(ability); } } Debug.LogError("Couldn't find ability of type " + type.ToString() + " in deck " + DeckName); return(null); }
/// <summary> /// </summary> /// <param name="ability"></param> /// <param name="type"></param> /// <param name="abilityName"></param> /// <returns></returns> public static bool IsAbilityType(this Ability ability, AbilityType type, string abilityName = null) { var name = abilityName ?? ability.Name; var n = name + "abilityType" + type.ToString(); if (BoolDictionary.ContainsKey(n)) { return(BoolDictionary[n]); } var value = ability.AbilityType == type; BoolDictionary.Add(n, value); return(value); }
//skill type is optional public CheckSituation(Sheet _char, DcProducer cp, AbilityType abilityType, SkillType skillType = SkillType.NULL) //add a check producer for second this. { this.checkProducer = _char; this.dcProducer = cp; this.abilityType = abilityType; this.skillType = skillType; string name = abilityType.ToString().ToLower(); if (skillType != SkillType.NULL) { name += " (" + skillType.ToString().ToLower() + ")"; } checkValue = new Gauge(name + " check"); DC = new Gauge("DC"); }
public IPrice[] GetAbilityPrices(int countLevel, AbilityType type) { IEnumerable <IPrice> result = new List <IPrice>(); var level = Static.AbilityLevels.Values.FirstOrDefault(x => x.Level == countLevel); if (level == null) { throw new Exception($"There is no data for the selected skill level. levelId = {countLevel}"); } switch (type) { case AbilityType.BaseAttack: if (level.BaseAttackPrice != null) { result = level.BaseAttackPrice.Values; } break; case AbilityType.UpgradeAttack: if (level.UpgradeAttackPrice != null) { result = level.UpgradeAttackPrice.Values; } break; case AbilityType.Ultimate: if (level.UltAttackPrice != null) { result = level.UltAttackPrice.Values; } break; default: throw new ArgumentOutOfRangeException(type.ToString()); } return(result.ToArray()); }
public override string ToString() { return("Ship info: health -> " + health + " damage -> " + damage + " shield -> " + shield + " speed -> " + speed + " ability-> " + abilityType.ToString()); }
public override string ToString() { return(abilityType.ToString()); }
private static string GetTypeString(AbilityType type) { return(type.ToString()); }
public string PresentableAbilityNameFromType(AbilityType t) { return(t.ToString().ToLower()); }
/// <summary> /// Ability의 글자를 빼온다. /// </summary> /// <param name="type"></param> /// <returns></returns> public string GetAbilityLocName(AbilityType type) { uint id = 0; switch (type) { case AbilityType.HP: id = 18; break; //체력 case AbilityType.DAMAGE: id = 19; break; //공격력 case AbilityType.HIT_RATE: id = 20; break; //명중률 case AbilityType.DODGE_RATE: id = 21; break; //회피율 case AbilityType.CRITICAL_RATE: id = 22; break; //치명타 확률 case AbilityType.CRITICAL_RES: id = 23; break; //치명타 저항 case AbilityType.CRITICAL_DAMAGE: id = 24; break; //치명타 피해 case AbilityType.DRAIN_HP: id = 25; break; //생명력 흡수 case AbilityType.DEFENCE_IGNORE: id = 26; break; //방어력 무시 case AbilityType.DAMAGE_DECREASE: id = 27; break; //데미지 감소 case AbilityType.DAMAGE_DECREASE_RATE: id = 28; break; //데미지 감소율 case AbilityType.COOLTIME: id = 29; break; //쿨타임 case AbilityType.ATTACK_SPEED: id = 96; break; //공격속도 증가 case AbilityType.EXP_UP: id = 95; break; //경험치 증가 case AbilityType.ALLSTAT_RATE: id = 97; break; case AbilityType.ATTACK_RANGE: id = 919; break; case AbilityType.ATTACK_ANGLE: id = 920; break; case AbilityType.MOVE_SPEED: id = 921; break; case AbilityType.DETECTED_RANGE: id = 922; break; } string name = _LowDataMgr.instance.GetStringCommon(id); if (string.IsNullOrEmpty(name)) { name = type.ToString(); } return(name); }