public static void FightOptionsHandler(int choice, ref ICharacters character, ref ICharacters opponent, out int ifPossible) { switch (choice) { case 1: { Timer.IfActionPossible(character, 0, out ifPossible); if (ifPossible == 1) { ifPossible = 1; FightOptionAttack.AttackMechanics(ref character, ref opponent, ifPossible); } else { ifPossible = 0; ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); } break; } case 2: { Timer.IfActionPossible(character, 2, out ifPossible); if (ifPossible == 1) { ifPossible = 1; FightOptionSpell.SpellMechanics(ref character, ref opponent, ifPossible); } else { ifPossible = 0; ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); } break; } case 3: { Timer.IfActionPossible(character, 4, out ifPossible); if (ifPossible == 1) { ifPossible = 1; FightOptionItem.ItemMechanics(ref character, ref opponent, ifPossible); } else { ifPossible = 0; ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); } break; } case 4: { ifPossible = 1; character.HitPoints = 0; ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); break; } default: { ifPossible = 1; ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); break; } } }
public static void SpellMechanics(ref ICharacters character, ref ICharacters opponent, int ifPossible) { FightOptionSpell.Spell(ref character, ref opponent); Timer.SetTime(character, "SPELL"); ChoicesOnFight.FightChoices(ref character, ref opponent, ifPossible); }