internal override void Cast(Character attacker, Character target) { attacker.Attack(target, Globals.ELEMENT_NATURE, Name, Power * 15); if (attacker is PC) attacker.Element = Globals.ELEMENT_NATURE; }
//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); }
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); }
private void nextTurn() { curIndex++; if (current == MonsterList[0]) { curIndex = 0; } if (curIndex > 2) { current = MonsterList[0]; return; } current = StateHandler.GetPC(curIndex); if (current.Health < 1) { bool gameOver = true; for(int i = 0; i < 3; i++) { if (PCBuilder.getPC(i).Health > 0) gameOver = false; } if (gameOver) { StateHandler.AddDelay(); Defeat(); } else nextTurn(); } else cameraTarget = current; }
public void initialize() { MediaHandler.playBGM(FSCMStrikesBackLogic.Properties.Resources.Five_Armies, "Five_Armies"); background.model = ModelFactory.loadModel("SuperBattleCave"); background.Scale = 3.0f; TurnList.Add(StateHandler.GetPC(0)); TurnList.Add(StateHandler.GetPC(1)); TurnList.Add(StateHandler.GetPC(2)); for(int i=0; i<MonsterList.Length; i++) TurnList.Add(MonsterList[i]); current = StateHandler.GetPC(0); cameraTarget = PCBuilder.getPC(0); strategy = 0; x = 75; y = 50; z = 10; }
internal virtual void Cast(Character attacker, Character target) { }