internal void use(Character user, Character target) { if (Globals.IS_SET(type, Globals.TYPE_CONSUMABLE_POTION)) target.Damage(Globals.ELEMENT_NONE, -(power * 25), user.Name, "", false); else if (Globals.IS_SET(type, Globals.TYPE_CONSUMABLE_ETHER)) target.Damage(Globals.ELEMENT_NONE, -(power * 25), user.Name, "", true); else user.Attack(target, type, this.name, power * 25); }
internal void use(Character user, Character target) { if (Globals.IS_SET(type, Globals.TYPE_CONSUMABLE_POTION)) { target.Damage(Globals.ELEMENT_NONE, -(power * 25), user.Name, "", false); } else if (Globals.IS_SET(type, Globals.TYPE_CONSUMABLE_ETHER)) { target.Damage(Globals.ELEMENT_NONE, -(power * 25), user.Name, "", true); } else { user.Attack(target, type, this.name, power * 25); } }
//TODO: Visitor internal void Attack(Character attackee, int attackElement, string attackName, int bonus) { int baseDam; defending = false; if (attackElement == Globals.ELEMENT_PHYSICAL) { baseDam = getAttack(); } else { baseDam = getMagic(); } baseDam = (baseDam / 2) + Globals.Random(0, baseDam); baseDam += level * 5; if (attackElement == Globals.ELEMENT_PHYSICAL) { baseDam -= defense / 2; } else { baseDam -= magicdefense / 2; } baseDam -= level * 5; if (baseDam < 1) { baseDam = 1; } if (this is PC) { baseDam += (int)(baseDam * StateCombat.strategy * 0.05f); } else { baseDam -= (int)(baseDam * StateCombat.strategy * 0.05f); } attackee.Damage(attackElement, baseDam + bonus, attackName, Name, false); }
//TODO: Visitor internal void Attack(Character attackee, int attackElement, string attackName, int bonus) { int baseDam; defending = false; if (attackElement == Globals.ELEMENT_PHYSICAL) baseDam = getAttack(); else baseDam = getMagic(); baseDam = (baseDam / 2) + Globals.Random(0, baseDam); baseDam += level * 5; if (attackElement == Globals.ELEMENT_PHYSICAL) baseDam -= defense / 2; else baseDam -= magicdefense / 2; baseDam -= level * 5; if (baseDam < 1) baseDam = 1; if (this is PC) baseDam += (int)(baseDam * StateCombat.strategy * 0.05f); else baseDam -= (int)(baseDam * StateCombat.strategy * 0.05f); attackee.Damage(attackElement, baseDam+bonus, attackName, Name, false); }