public override int GetHashCode() { int hash = 1; if (TargetType.Length != 0) { hash ^= TargetType.GetHashCode(); } if (TargetStat.Length != 0) { hash ^= TargetStat.GetHashCode(); } if (ComparisonOperator != 0) { hash ^= ComparisonOperator.GetHashCode(); } if (TargetComparisonValue != 0L) { hash ^= TargetComparisonValue.GetHashCode(); } if (TargetStatIsPercentage != false) { hash ^= TargetStatIsPercentage.GetHashCode(); } if (ConditionTargetType != 0) { hash ^= ConditionTargetType.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public Stat ReturnStat(TargetStat target) { if (target == TargetStat.defense) { Stat stat = defense; return(stat); } if (target == TargetStat.special_defense) { Stat stat = special_Defense; return(stat); } if (target == TargetStat.attack) { Stat stat = attack; return(stat); } if (target == TargetStat.special) { Stat stat = special; return(stat); } if (target == TargetStat.luck) { Stat stat = luck; return(stat); } if (target == TargetStat.skill) { Stat stat = skill; return(stat); } if (target == TargetStat.speed) { Stat stat = speed; return(stat); } return(attack); }
public int ReturnStatValue(TargetStat target) { int statVal = 0; switch (target) { case TargetStat.defense: statVal = defense.GetValue(); break; case TargetStat.special_defense: statVal = special_Defense.GetValue(); break; case TargetStat.attack: statVal = attack.GetValue(); break; case TargetStat.special: statVal = special.GetValue(); break; case TargetStat.luck: statVal = luck.GetValue(); break; case TargetStat.skill: statVal = skill.GetValue(); break; case TargetStat.speed: statVal = speed.GetValue(); break; case TargetStat.level: statVal = level; break; case TargetStat.maxHP: statVal = hp.GetMaxValue(); break; case TargetStat.currentHP: statVal = hp.GetCurrentValue(); break; case TargetStat.maxSP: statVal = sp.GetMaxValue(); break; case TargetStat.currentSP: statVal = sp.GetCurrentValue(); break; case TargetStat.currentXp: statVal = currentXp; break; case TargetStat.XpToNextLevel: statVal = XpToNextLevel; break; } return(statVal); }