private BuffMethodTypes GetBuffMethodType(BuffTypes buff, SkillParamCalcTypes calc) { if (this.Timing == ESkillTiming.Passive || calc != SkillParamCalcTypes.Scale) { return(BuffMethodTypes.Add); } return(buff == BuffTypes.Buff ? BuffMethodTypes.Highest : BuffMethodTypes.Lowest); }
private BuffMethodTypes GetBuffMethodType(BuffTypes buff, SkillParamCalcTypes calc) { if (calc != SkillParamCalcTypes.Scale) { return(BuffMethodTypes.Add); } return(buff == BuffTypes.Buff ? BuffMethodTypes.Highest : BuffMethodTypes.Lowest); }
void dropStuff() { BuffTypes buffType = (BuffTypes)Random.Range(0, System.Enum.GetValues(typeof(BuffTypes)).Length); GameObject drop = null; switch (buffType) { case BuffTypes.Strength: drop = (GameObject)Resources.Load("Prefab/Drops/StrengthDropPrefab", typeof(GameObject)); break; case BuffTypes.AttackSpeed: drop = (GameObject)Resources.Load("Prefab/Drops/AttackSpeedDropPrefab", typeof(GameObject)); break; case BuffTypes.WalkingSpeed: drop = (GameObject)Resources.Load("Prefab/Drops/WalkingSpeedDropPrefab", typeof(GameObject)); break; case BuffTypes.SkinThickness: drop = (GameObject)Resources.Load("Prefab/Drops/SkinThicknessDropPrefab", typeof(GameObject)); break; case BuffTypes.Spikes: drop = (GameObject)Resources.Load("Prefab/Drops/SpikesDropPrefab", typeof(GameObject)); break; case BuffTypes.Magnet: drop = (GameObject)Resources.Load("Prefab/Drops/MagnetDropPrefab", typeof(GameObject)); break; case BuffTypes.Whirlwind: drop = (GameObject)Resources.Load("Prefab/Drops/WhirlwindDropPrefab", typeof(GameObject)); break; case BuffTypes.NegativeStrength: drop = (GameObject)Resources.Load("Prefab/Drops/NegativeStrengthDropPrefab", typeof(GameObject)); break; case BuffTypes.NegativeWalkSpeed: drop = (GameObject)Resources.Load("Prefab/Drops/NegativeWalkSpeedDropPrefab", typeof(GameObject)); break; case BuffTypes.NegativeBomb: drop = (GameObject)Resources.Load("Prefab/Drops/NegativeBombDropPrefab", typeof(GameObject)); break; default: Debug.Log("Default case.. dafuq??"); break; } if (drop != null) { dropBuff(drop); } }
private bool IsBuffActive(BuffTypes buff) { foreach (var x in playerBuffs) { if (x.Equals(buff)) { return(true); } } return(false); }
public void AddBuff(BuffTypes buff, float value, float durration) { Buff b = new Buff(); b.BuffType = buff; b.Value = value; b.Durration = durration; b.StarTime = Time.time; Buffs.Add(b); RebuildTempStats(); }
public bool CheckBuffCalcType(BuffTypes buff, SkillParamCalcTypes calc) { for (int index = 0; index < this.targets.Count; ++index) { if (buff == this.targets[index].buffType && calc == this.targets[index].calcType) { return(true); } } return(false); }
public bool CheckBuffCalcType(BuffTypes buff, SkillParamCalcTypes calc, bool is_negative_value_is_buff) { for (int index = 0; index < this.targets.Count; ++index) { BuffEffect.BuffTarget target = this.targets[index]; if (buff == target.buffType && calc == target.calcType && BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff) { return(true); } } return(false); }
public void BuffEnemy(BuffTypes type) { if (type != BuffTypes.None) { healthBar.color = Color.green; buffIcon.SetActive(true); } else { healthBar.color = Color.red; buffIcon.SetActive(false); } }
public void CalcBuffStatus(ref BaseStatus status, BuffTypes buffType, SkillParamCalcTypes calcType) { for (int index = 0; index < this.targets.Count; ++index) { BuffEffect.BuffTarget target = this.targets[index]; if (target.buffType == buffType && target.calcType == calcType) { BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType); ParamTypes paramType = target.paramType; int num = (int)target.value; this.SetBuffValues(paramType, buffMethodType, ref status, num); } } }
private void InternalBuffSkill(BuffEffect effect, BuffTypes buffType, SkillParamCalcTypes calcType, BaseStatus status) { for (int index = 0; index < effect.targets.Count; ++index) { BuffEffect.BuffTarget target = effect.targets[index]; if (target != null && target.buffType == buffType && target.calcType == calcType) { BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType); ParamTypes paramType = target.paramType; int num = (int)target.value; effect.SetBuffValues(paramType, buffMethodType, ref status, num); } } }
public void BuffEnemies(Vector3 mWaveOrigin, float mScanDistance) { BuffTypes currentType = buffEnemy.GetComponent <SCR_BuffSpider>().returnBuffType(); for (int i = 0; i < enemyObjects.Count; i++) { float distanceFromWaveOrigin = Vector3.Distance(mWaveOrigin, enemyObjects[i].transform.position); if (distanceFromWaveOrigin <= mScanDistance) { IEnemy currentEnemyInterface = (IEnemy)enemyObjects[i].GetComponent(typeof(IEnemy)); currentEnemyInterface.BuffEnemy(currentType); } } }
// will update the enemies multipliers based on whether it is buffed or not public void BuffEnemy(BuffTypes type) { switch (type) { case BuffTypes.Health: healthMultiplier = buffMultiplier; speedMultiplier = 1.0f; gruntAgent.speed = movementSpeed; damagerMultiplier = 1.0f; break; case BuffTypes.Damage: healthMultiplier = 1.0f; speedMultiplier = 1.0f; gruntAgent.speed = movementSpeed; damagerMultiplier = buffMultiplier; break; case BuffTypes.Speed: healthMultiplier = 1.0f; speedMultiplier = buffMultiplier; gruntAgent.speed = movementSpeed * speedMultiplier; damagerMultiplier = 1.0f; break; case BuffTypes.None: healthMultiplier = 1.0f; speedMultiplier = 1.0f; gruntAgent.speed = movementSpeed; damagerMultiplier = 1.0f; break; } if (type != BuffTypes.None) { healthDial.color = Color.green; buffIcon.SetActive(true); } else { healthDial.color = Color.red; buffIcon.SetActive(false); } current = type; }
private void SetBuffValue(BuffTypes type, ref OShort param, int value) { switch (type) { case BuffTypes.Buff: if ((int)param >= value) { break; } param = (OShort)value; break; case BuffTypes.Debuff: if ((int)param <= value) { break; } param = (OShort)value; break; } }
public static void AddBuff(this Being being, BuffTypes type) { switch (type) { case BuffTypes.Dash: being.Buffs.Add(new DashBuff(being, AbilityConstants.DashBonus * (1 + ((Zerd)being).Player.AbilityUpgrades[AbilityUpgradeType.DashDistance] / 100f))); return; case BuffTypes.Sprint: being.Buffs.Add(new SprintBuff(being, ((Zerd)being).BootItem.SprintBonus)); return; case BuffTypes.BlazingSpeed: if (being.SkillPoints(SkillType.BlazingSpeed) > 0) { being.Buffs.Add(new BlazingSpeedBuff(being as Zerd, TimeSpan.FromSeconds(PlayerSkills.BlazingSpeedSeconds), being.BaseSpeed * being.SkillValue(SkillType.BlazingSpeed, false) / 100f)); } return; } throw new Exception("Unhandled buff"); }
private BuffAttachment createBuffAttachment(Unit target, BuffEffect effect, BuffTypes buff_type, SkillParamCalcTypes calc_type, BaseStatus status) { if (effect == null) { return((BuffAttachment)null); } BuffAttachment buffAttachment = new BuffAttachment(effect.param); buffAttachment.user = this.mModifyUnit; buffAttachment.skill = (SkillData)null; buffAttachment.skilltarget = SkillEffectTargets.Self; buffAttachment.IsPassive = (OBool)true; buffAttachment.CheckTarget = (Unit)null; buffAttachment.DuplicateCount = 0; buffAttachment.CheckTiming = effect.param.chk_timing; buffAttachment.turn = effect.param.turn; buffAttachment.BuffType = buff_type; buffAttachment.CalcType = calc_type; buffAttachment.UseCondition = ESkillCondition.Weather; status.CopyTo(buffAttachment.status); return(buffAttachment); }
private BuffAttachment createBuffAttachment(Unit target, BuffTypes buff_type, SkillParamCalcTypes calc_type, BaseStatus status, EffectCheckTimings chk_timing) { if (this.mBuffEffect == null) { return((BuffAttachment)null); } BuffAttachment buffAttachment = new BuffAttachment(this.mBuffEffect.param); buffAttachment.user = this.mCreateUnit; buffAttachment.skill = (SkillData)null; buffAttachment.skilltarget = SkillEffectTargets.Self; buffAttachment.IsPassive = (OBool)false; buffAttachment.CheckTarget = (Unit)null; buffAttachment.DuplicateCount = 0; buffAttachment.CheckTiming = chk_timing; buffAttachment.turn = (OInt)1; buffAttachment.BuffType = buff_type; buffAttachment.CalcType = calc_type; buffAttachment.UseCondition = this.mBuffEffect.param.cond; status.CopyTo(buffAttachment.status); return(buffAttachment); }
public Buff(BuffTypes type, float duration) { m_type = type; m_durationLeft = duration; m_totalDuration = duration; }
public void BuffEnemy(BuffTypes type) { }
public void CalcBuffStatus(ref BaseStatus status, BuffTypes buffType, SkillParamCalcTypes calcType) { for (int index = 0; index < this.targets.Count; ++index) { BuffEffect.BuffTarget target = this.targets[index]; if (target.buffType == buffType && target.calcType == calcType) { ParamTypes paramType = target.paramType; int num = (int)target.value; switch (paramType) { case ParamTypes.Hp: this.SetBuffValue(buffType, ref status.param.values_hp, num); continue; case ParamTypes.HpMax: this.SetBuffValue(buffType, ref status.param.values_hp, num); continue; case ParamTypes.Mp: this.SetBuffValue(buffType, ref status.param.values[0], num); continue; case ParamTypes.MpIni: this.SetBuffValue(buffType, ref status.param.values[1], num); continue; case ParamTypes.Atk: this.SetBuffValue(buffType, ref status.param.values[2], num); continue; case ParamTypes.Def: this.SetBuffValue(buffType, ref status.param.values[3], num); continue; case ParamTypes.Mag: this.SetBuffValue(buffType, ref status.param.values[4], num); continue; case ParamTypes.Mnd: this.SetBuffValue(buffType, ref status.param.values[5], num); continue; case ParamTypes.Rec: this.SetBuffValue(buffType, ref status.param.values[6], num); continue; case ParamTypes.Dex: this.SetBuffValue(buffType, ref status.param.values[7], num); continue; case ParamTypes.Spd: this.SetBuffValue(buffType, ref status.param.values[8], num); continue; case ParamTypes.Cri: this.SetBuffValue(buffType, ref status.param.values[9], num); continue; case ParamTypes.Luk: this.SetBuffValue(buffType, ref status.param.values[10], num); continue; case ParamTypes.Mov: this.SetBuffValue(buffType, ref status.param.values[11], num); continue; case ParamTypes.Jmp: this.SetBuffValue(buffType, ref status.param.values[12], num); continue; case ParamTypes.EffectRange: this.SetBuffValue(buffType, ref status.bonus.values[0], num); continue; case ParamTypes.EffectScope: this.SetBuffValue(buffType, ref status.bonus.values[1], num); continue; case ParamTypes.EffectHeight: this.SetBuffValue(buffType, ref status.bonus.values[2], num); continue; case ParamTypes.Assist_Fire: this.SetBuffValue(buffType, ref status.element_assist.values[1], num); continue; case ParamTypes.Assist_Water: this.SetBuffValue(buffType, ref status.element_assist.values[2], num); continue; case ParamTypes.Assist_Wind: this.SetBuffValue(buffType, ref status.element_assist.values[3], num); continue; case ParamTypes.Assist_Thunder: this.SetBuffValue(buffType, ref status.element_assist.values[4], num); continue; case ParamTypes.Assist_Shine: this.SetBuffValue(buffType, ref status.element_assist.values[5], num); continue; case ParamTypes.Assist_Dark: this.SetBuffValue(buffType, ref status.element_assist.values[6], num); continue; case ParamTypes.Assist_Poison: this.SetBuffValue(buffType, ref status.enchant_assist.values[0], num); continue; case ParamTypes.Assist_Paralysed: this.SetBuffValue(buffType, ref status.enchant_assist.values[1], num); continue; case ParamTypes.Assist_Stun: this.SetBuffValue(buffType, ref status.enchant_assist.values[2], num); continue; case ParamTypes.Assist_Sleep: this.SetBuffValue(buffType, ref status.enchant_assist.values[3], num); continue; case ParamTypes.Assist_Charm: this.SetBuffValue(buffType, ref status.enchant_assist.values[4], num); continue; case ParamTypes.Assist_Stone: this.SetBuffValue(buffType, ref status.enchant_assist.values[5], num); continue; case ParamTypes.Assist_Blind: this.SetBuffValue(buffType, ref status.enchant_assist.values[6], num); continue; case ParamTypes.Assist_DisableSkill: this.SetBuffValue(buffType, ref status.enchant_assist.values[7], num); continue; case ParamTypes.Assist_DisableMove: this.SetBuffValue(buffType, ref status.enchant_assist.values[8], num); continue; case ParamTypes.Assist_DisableAttack: this.SetBuffValue(buffType, ref status.enchant_assist.values[9], num); continue; case ParamTypes.Assist_Zombie: this.SetBuffValue(buffType, ref status.enchant_assist.values[10], num); continue; case ParamTypes.Assist_DeathSentence: this.SetBuffValue(buffType, ref status.enchant_assist.values[11], num); continue; case ParamTypes.Assist_Berserk: this.SetBuffValue(buffType, ref status.enchant_assist.values[12], num); continue; case ParamTypes.Assist_Knockback: this.SetBuffValue(buffType, ref status.enchant_assist.values[13], num); continue; case ParamTypes.Assist_ResistBuff: this.SetBuffValue(buffType, ref status.enchant_assist.values[14], num); continue; case ParamTypes.Assist_ResistDebuff: this.SetBuffValue(buffType, ref status.enchant_assist.values[15], num); continue; case ParamTypes.Assist_Stop: this.SetBuffValue(buffType, ref status.enchant_assist.values[16], num); continue; case ParamTypes.Assist_Fast: this.SetBuffValue(buffType, ref status.enchant_assist.values[17], num); continue; case ParamTypes.Assist_Slow: this.SetBuffValue(buffType, ref status.enchant_assist.values[18], num); continue; case ParamTypes.Assist_AutoHeal: this.SetBuffValue(buffType, ref status.enchant_assist.values[19], num); continue; case ParamTypes.Assist_Donsoku: this.SetBuffValue(buffType, ref status.enchant_assist.values[20], num); continue; case ParamTypes.Assist_Rage: this.SetBuffValue(buffType, ref status.enchant_assist.values[21], num); continue; case ParamTypes.Assist_GoodSleep: this.SetBuffValue(buffType, ref status.enchant_assist.values[22], num); continue; case ParamTypes.Assist_ConditionAll: this.SetBuffValue(buffType, ref status.enchant_assist.values[0], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[1], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[2], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[3], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[4], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[5], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[6], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[7], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[8], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[9], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[11], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[12], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[16], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[17], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[18], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[20], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[21], num); this.SetBuffValue(buffType, ref status.enchant_assist.values[24], num); continue; case ParamTypes.Resist_Fire: this.SetBuffValue(buffType, ref status.element_resist.values[1], num); continue; case ParamTypes.Resist_Water: this.SetBuffValue(buffType, ref status.element_resist.values[2], num); continue; case ParamTypes.Resist_Wind: this.SetBuffValue(buffType, ref status.element_resist.values[3], num); continue; case ParamTypes.Resist_Thunder: this.SetBuffValue(buffType, ref status.element_resist.values[4], num); continue; case ParamTypes.Resist_Shine: this.SetBuffValue(buffType, ref status.element_resist.values[5], num); continue; case ParamTypes.Resist_Dark: this.SetBuffValue(buffType, ref status.element_resist.values[6], num); continue; case ParamTypes.Resist_Poison: this.SetBuffValue(buffType, ref status.enchant_resist.values[0], num); continue; case ParamTypes.Resist_Paralysed: this.SetBuffValue(buffType, ref status.enchant_resist.values[1], num); continue; case ParamTypes.Resist_Stun: this.SetBuffValue(buffType, ref status.enchant_resist.values[2], num); continue; case ParamTypes.Resist_Sleep: this.SetBuffValue(buffType, ref status.enchant_resist.values[3], num); continue; case ParamTypes.Resist_Charm: this.SetBuffValue(buffType, ref status.enchant_resist.values[4], num); continue; case ParamTypes.Resist_Stone: this.SetBuffValue(buffType, ref status.enchant_resist.values[5], num); continue; case ParamTypes.Resist_Blind: this.SetBuffValue(buffType, ref status.enchant_resist.values[6], num); continue; case ParamTypes.Resist_DisableSkill: this.SetBuffValue(buffType, ref status.enchant_resist.values[7], num); continue; case ParamTypes.Resist_DisableMove: this.SetBuffValue(buffType, ref status.enchant_resist.values[8], num); continue; case ParamTypes.Resist_DisableAttack: this.SetBuffValue(buffType, ref status.enchant_resist.values[9], num); continue; case ParamTypes.Resist_Zombie: this.SetBuffValue(buffType, ref status.enchant_resist.values[10], num); continue; case ParamTypes.Resist_DeathSentence: this.SetBuffValue(buffType, ref status.enchant_resist.values[11], num); continue; case ParamTypes.Resist_Berserk: this.SetBuffValue(buffType, ref status.enchant_resist.values[12], num); continue; case ParamTypes.Resist_Knockback: this.SetBuffValue(buffType, ref status.enchant_resist.values[13], num); continue; case ParamTypes.Resist_ResistBuff: this.SetBuffValue(buffType, ref status.enchant_resist.values[14], num); continue; case ParamTypes.Resist_ResistDebuff: this.SetBuffValue(buffType, ref status.enchant_resist.values[15], num); continue; case ParamTypes.Resist_Stop: this.SetBuffValue(buffType, ref status.enchant_resist.values[16], num); continue; case ParamTypes.Resist_Fast: this.SetBuffValue(buffType, ref status.enchant_resist.values[17], num); continue; case ParamTypes.Resist_Slow: this.SetBuffValue(buffType, ref status.enchant_resist.values[18], num); continue; case ParamTypes.Resist_AutoHeal: this.SetBuffValue(buffType, ref status.enchant_resist.values[19], num); continue; case ParamTypes.Resist_Donsoku: this.SetBuffValue(buffType, ref status.enchant_resist.values[20], num); continue; case ParamTypes.Resist_Rage: this.SetBuffValue(buffType, ref status.enchant_resist.values[21], num); continue; case ParamTypes.Resist_GoodSleep: this.SetBuffValue(buffType, ref status.enchant_resist.values[22], num); continue; case ParamTypes.Resist_ConditionAll: this.SetBuffValue(buffType, ref status.enchant_resist.values[0], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[1], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[2], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[3], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[4], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[5], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[6], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[7], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[8], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[9], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[11], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[12], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[16], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[18], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[20], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[21], num); this.SetBuffValue(buffType, ref status.enchant_resist.values[24], num); continue; case ParamTypes.HitRate: this.SetBuffValue(buffType, ref status.bonus.values[3], num); continue; case ParamTypes.AvoidRate: this.SetBuffValue(buffType, ref status.bonus.values[4], num); continue; case ParamTypes.CriticalRate: this.SetBuffValue(buffType, ref status.bonus.values[5], num); continue; case ParamTypes.GainJewel: this.SetBuffValue(buffType, ref status.bonus.values[13], num); continue; case ParamTypes.UsedJewelRate: this.SetBuffValue(buffType, ref status.bonus.values[14], num); continue; case ParamTypes.ActionCount: this.SetBuffValue(buffType, ref status.bonus.values[15], num); continue; case ParamTypes.SlashAttack: this.SetBuffValue(buffType, ref status.bonus.values[6], num); continue; case ParamTypes.PierceAttack: this.SetBuffValue(buffType, ref status.bonus.values[7], num); continue; case ParamTypes.BlowAttack: this.SetBuffValue(buffType, ref status.bonus.values[8], num); continue; case ParamTypes.ShotAttack: this.SetBuffValue(buffType, ref status.bonus.values[9], num); continue; case ParamTypes.MagicAttack: this.SetBuffValue(buffType, ref status.bonus.values[10], num); continue; case ParamTypes.ReactionAttack: this.SetBuffValue(buffType, ref status.bonus.values[11], num); continue; case ParamTypes.JumpAttack: this.SetBuffValue(buffType, ref status.bonus.values[12], num); continue; case ParamTypes.GutsRate: this.SetBuffValue(buffType, ref status.bonus.values[16], num); continue; case ParamTypes.AutoJewel: this.SetBuffValue(buffType, ref status.bonus.values[17], num); continue; case ParamTypes.ChargeTimeRate: this.SetBuffValue(buffType, ref status.bonus.values[18], num); continue; case ParamTypes.CastTimeRate: this.SetBuffValue(buffType, ref status.bonus.values[19], num); continue; case ParamTypes.BuffTurn: this.SetBuffValue(buffType, ref status.bonus.values[20], num); continue; case ParamTypes.DebuffTurn: this.SetBuffValue(buffType, ref status.bonus.values[21], num); continue; case ParamTypes.CombinationRange: this.SetBuffValue(buffType, ref status.bonus.values[22], num); continue; case ParamTypes.HpCostRate: this.SetBuffValue(buffType, ref status.bonus.values[23], num); continue; case ParamTypes.SkillUseCount: this.SetBuffValue(buffType, ref status.bonus.values[24], num); continue; case ParamTypes.PoisonDamage: this.SetBuffValue(buffType, ref status.bonus.values[25], num); continue; case ParamTypes.PoisonTurn: this.SetBuffValue(buffType, ref status.bonus.values[26], num); continue; case ParamTypes.Assist_AutoJewel: this.SetBuffValue(buffType, ref status.enchant_assist.values[23], num); continue; case ParamTypes.Resist_AutoJewel: this.SetBuffValue(buffType, ref status.enchant_resist.values[23], num); continue; case ParamTypes.Assist_DisableHeal: this.SetBuffValue(buffType, ref status.enchant_assist.values[24], num); continue; case ParamTypes.Resist_DisableHeal: this.SetBuffValue(buffType, ref status.enchant_resist.values[24], num); continue; case ParamTypes.Resist_Slash: this.SetBuffValue(buffType, ref status.bonus.values[27], num); continue; case ParamTypes.Resist_Pierce: this.SetBuffValue(buffType, ref status.bonus.values[28], num); continue; case ParamTypes.Resist_Blow: this.SetBuffValue(buffType, ref status.bonus.values[29], num); continue; case ParamTypes.Resist_Shot: this.SetBuffValue(buffType, ref status.bonus.values[30], num); continue; case ParamTypes.Resist_Magic: this.SetBuffValue(buffType, ref status.bonus.values[31], num); continue; case ParamTypes.Resist_Reaction: this.SetBuffValue(buffType, ref status.bonus.values[32], num); continue; case ParamTypes.Resist_Jump: this.SetBuffValue(buffType, ref status.bonus.values[33], num); continue; case ParamTypes.Avoid_Slash: this.SetBuffValue(buffType, ref status.bonus.values[34], num); continue; case ParamTypes.Avoid_Pierce: this.SetBuffValue(buffType, ref status.bonus.values[35], num); continue; case ParamTypes.Avoid_Blow: this.SetBuffValue(buffType, ref status.bonus.values[36], num); continue; case ParamTypes.Avoid_Shot: this.SetBuffValue(buffType, ref status.bonus.values[37], num); continue; case ParamTypes.Avoid_Magic: this.SetBuffValue(buffType, ref status.bonus.values[38], num); continue; case ParamTypes.Avoid_Reaction: this.SetBuffValue(buffType, ref status.bonus.values[39], num); continue; case ParamTypes.Avoid_Jump: this.SetBuffValue(buffType, ref status.bonus.values[40], num); continue; default: continue; } } } }
public void CalcBuffStatus(ref BaseStatus status, EElement element, BuffTypes buffType, bool is_check_negative_value, bool is_negative_value_is_buff, SkillParamCalcTypes calcType, int up_count = 0) { for (int index = 0; index < this.targets.Count; ++index) { BuffEffect.BuffTarget target = this.targets[index]; if (target.buffType == buffType && (!is_check_negative_value || BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff) && target.calcType == calcType) { if (element != EElement.None) { bool flag = false; switch (target.paramType) { case ParamTypes.Assist_Fire: case ParamTypes.UnitDefenseFire: flag = element != EElement.Fire; break; case ParamTypes.Assist_Water: case ParamTypes.UnitDefenseWater: flag = element != EElement.Water; break; case ParamTypes.Assist_Wind: case ParamTypes.UnitDefenseWind: flag = element != EElement.Wind; break; case ParamTypes.Assist_Thunder: case ParamTypes.UnitDefenseThunder: flag = element != EElement.Thunder; break; case ParamTypes.Assist_Shine: case ParamTypes.UnitDefenseShine: flag = element != EElement.Shine; break; case ParamTypes.Assist_Dark: case ParamTypes.UnitDefenseDark: flag = element != EElement.Dark; break; } if (flag) { continue; } } BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType); ParamTypes paramType = target.paramType; int val1 = (int)target.value; if ((bool)this.param.mIsUpBuff) { val1 = (int)target.value_one * up_count; if (val1 > 0) { val1 = Math.Min(val1, (int)target.value); } else if (val1 < 0) { val1 = Math.Max(val1, (int)target.value); } } BuffEffect.SetBuffValues(paramType, buffMethodType, ref status, val1); } } }
public static Buff GetBuff(this string buff) => BuffTypes.GetValueOrDefault(buff);
private void InternalBuffSkill(BuffEffect effect, EElement element, BuffTypes buffType, bool is_check_negative_value, bool is_negative_value_is_buff, SkillParamCalcTypes calcType, BaseStatus status, List <BuffEffect.BuffValues> list = null) { for (int index1 = 0; index1 < effect.targets.Count; ++index1) { BuffEffect.BuffTarget target = effect.targets[index1]; if (target != null && target.buffType == buffType && (!is_check_negative_value || BuffEffectParam.IsNegativeValueIsBuff(target.paramType) == is_negative_value_is_buff) && target.calcType == calcType) { if (element != EElement.None) { bool flag = false; switch (target.paramType) { case ParamTypes.Assist_Fire: case ParamTypes.UnitDefenseFire: flag = element != EElement.Fire; break; case ParamTypes.Assist_Water: case ParamTypes.UnitDefenseWater: flag = element != EElement.Water; break; case ParamTypes.Assist_Wind: case ParamTypes.UnitDefenseWind: flag = element != EElement.Wind; break; case ParamTypes.Assist_Thunder: case ParamTypes.UnitDefenseThunder: flag = element != EElement.Thunder; break; case ParamTypes.Assist_Shine: case ParamTypes.UnitDefenseShine: flag = element != EElement.Shine; break; case ParamTypes.Assist_Dark: case ParamTypes.UnitDefenseDark: flag = element != EElement.Dark; break; } if (flag) { continue; } } BuffMethodTypes buffMethodType = this.GetBuffMethodType(target.buffType, calcType); ParamTypes paramType = target.paramType; int num = (int)target.value; if ((bool)effect.param.mIsUpBuff) { num = 0; } if (list == null) { BuffEffect.SetBuffValues(paramType, buffMethodType, ref status, num); } else { bool flag = true; for (int index2 = 0; index2 < list.Count; ++index2) { BuffEffect.BuffValues buffValues = list[index2]; if (buffValues.param_type == paramType && buffValues.method_type == buffMethodType) { buffValues.value += num; list[index2] = buffValues; flag = false; break; } } if (flag) { list.Add(new BuffEffect.BuffValues() { param_type = paramType, method_type = buffMethodType, value = num }); } } } } }
public StatBuff(float value, StatTypes statType, int?maxValue = null, int?minValue = null, BuffTypes buffType = BuffTypes.Additive, StatTypes?baseStat = null) : base(value, statType, maxValue, minValue) { BuffType = buffType; this.baseStat = baseStat; }