private void setStatsFromSpread(StatSpread s) { StatSpread spread; if (hasAltStatSpread()) { spread = alternativeStatSpread; } else { spread = s; } int atkval, defval, spaval, spdval, speval; int hpval; atkval = statCalc(this.stats.atk, spread.atkIV, spread.atkEV, spread.atkNatureMod); defval = statCalc(this.stats.spa, spread.defIV, spread.defEV, spread.defNatureMod); spaval = statCalc(this.stats.def, spread.spaIV, spread.spaEV, spread.spaNatureMod); spdval = statCalc(this.stats.spd, spread.spdIV, spread.spdEV, spread.spdNatureMod); speval = statCalc(this.stats.spe, spread.speIV, spread.speEV, spread.speNatureMod); hpval = hpCalc(this.stats.hp, spread.hpIV, spread.hpEV, 100); realStats.Add("atk", atkval); realStats.Add("def", defval); realStats.Add("spa", spaval); realStats.Add("spd", spdval); realStats.Add("spe", speval); realStats.Add("hp", hpval); statSpread = spread; }
public void modifyRole() { RoleOverride ro = getRoleOverride(); if (ro != null) { if (!Object.ReferenceEquals(ro.role, null)) { this.role = ro.role; } if (!Object.ReferenceEquals(ro.deftype, null)) { this.deftype = ro.deftype; } if (!Object.ReferenceEquals(ro.statspread, null)) { this.statSpread = ro.statspread; } if (!Object.ReferenceEquals(ro.item, null)) { this.item = ro.item; } this.certainAbility = ro.certainAbility; } }
private void setStatsFromSpread(StatSpread s) { StatSpread spread; if (hasAltStatSpread()) spread = alternativeStatSpread; else spread = s; int atkval, defval, spaval, spdval, speval; int hpval; atkval = statCalc(this.stats.atk, spread.atkIV,spread.atkEV, spread.atkNatureMod); defval = statCalc(this.stats.spa, spread.defIV, spread.defEV, spread.defNatureMod); spaval = statCalc(this.stats.def, spread.spaIV, spread.spaEV, spread.spaNatureMod); spdval = statCalc(this.stats.spd, spread.spdIV, spread.spdEV, spread.spdNatureMod); speval = statCalc(this.stats.spe, spread.speIV, spread.speEV, spread.speNatureMod); hpval = hpCalc(this.stats.hp, spread.hpIV, spread.hpEV, 100); realStats.Add("atk", atkval); realStats.Add("def", defval); realStats.Add("spa", spaval); realStats.Add("spd", spdval); realStats.Add("spe", speval); realStats.Add("hp", hpval); statSpread = spread; }
public void modifyRole() { RoleOverride ro = getRoleOverride(); if (ro != null) { if (!Object.ReferenceEquals(ro.role, null)) this.role = ro.role; if (!Object.ReferenceEquals(ro.deftype, null)) this.deftype = ro.deftype; if (!Object.ReferenceEquals(ro.statspread, null)) this.statSpread = ro.statspread; if (!Object.ReferenceEquals(ro.item, null)) this.item = ro.item; } }