//devuelve siempre el valor resultado de lanzar una skill, en el caso de un atk devolvera el valor del daño que inflingira ese atk, en el caso de una skill supp //devolvera el valor a sumar en caso de aumentar el atk o defensa, si es para disminuir el spd devolvera el valor a reducir. public float ThrowSkill(Critter target, Critter caster, float additionalAtk, Skill skillToUse, float skillValueResult) { if (target != null && caster != null) { if (skillToUse is AtkSkill) { AtkSkill atkSkill = (AtkSkill)skillToUse; skillValueResult = atkSkill.UsingSkill(target, caster, additionalAtk); return(skillValueResult); } else if (skillToUse is SuppSkill) { SuppSkill suppSkill = (SuppSkill)skillToUse; skillValueResult = suppSkill.UsingSkill(target, suppSkill.StatChanged); return(skillValueResult); } } return(skillValueResult); }
private float AffinityMultiplier(Critter target, AtkSkill skill) { switch (skill.AffinitySkillType) { case Affinity.Fire: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 0; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 2f; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 1; return(affinityMultiplier); } return(affinityMultiplier); case Affinity.Wind: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 1; return(affinityMultiplier); } return(affinityMultiplier); case Affinity.Earth: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 0; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 2f; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 1; return(affinityMultiplier); } return(affinityMultiplier); case Affinity.Dark: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 2; return(affinityMultiplier); } return(affinityMultiplier); case Affinity.Water: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 2; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 0.5f; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 1; return(affinityMultiplier); } return(affinityMultiplier); case Affinity.Light: switch (target.AffinityType) { case Critter.Affinity.Fire: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Wind: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Earth: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Dark: affinityMultiplier = 2; return(affinityMultiplier); case Critter.Affinity.Water: affinityMultiplier = 1; return(affinityMultiplier); case Critter.Affinity.Light: affinityMultiplier = 0.5f; return(affinityMultiplier); } return(affinityMultiplier); } return(affinityMultiplier); }