protected virtual void ApplySurfaceRule(SurfaceRule surfaceRule, bool bonus, double bonusRate = 1) { if (bonus) { Wisdom += (int)(surfaceRule.Wisdom * bonusRate); Strength += (int)(surfaceRule.Strength * bonusRate); Agility += (int)(surfaceRule.Agility * bonusRate); HP += (int)(surfaceRule.HP * bonusRate); MP += (int)(surfaceRule.MP * bonusRate); } else { Wisdom -= (int)(surfaceRule.Wisdom * bonusRate); Strength -= (int)(surfaceRule.Strength * bonusRate); Agility -= (int)(surfaceRule.Agility * bonusRate); HP -= (int)(surfaceRule.HP * bonusRate); MP -= (int)(surfaceRule.MP * bonusRate); } }
public SurfaceAffectEventArgs(SurfaceType surfaceType, SurfaceRule actionRule) { this.actionRule = actionRule; this.surfaceType = surfaceType; }