public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three) { abilities = new SpecialAbility[4]; abilityCount = 3; abilities[0] = one; abilities[1] = two; abilities[2] = three; abilities[3] = null; }
public SpecialAbilityList(SpecialAbility one, SpecialAbility two, SpecialAbility three, SpecialAbility four) { abilities = new SpecialAbility[4]; abilityCount = 4; abilities[0] = one; abilities[1] = two; abilities[2] = three; abilities[3] = four; }
public SpecialAbilityList(SpecialAbility one) { abilities = new SpecialAbility[4]; abilityCount = 1; abilities[0] = one; abilities[1] = null; abilities[2] = null; abilities[3] = null; }
public void addAbility(SpecialAbility newAbility) { if( abilityCount >= 0 && abilityCount < 4 ) { abilities[abilityCount] = newAbility; abilityCount++; } else { int removedIndex = removeAbility(); if(removedIndex >= 0) abilities[removedIndex] = newAbility; } }
public void addAbility(SpecialAbility newAbility) { if (abilityCount >= 0 && abilityCount < 4) { abilities[abilityCount] = newAbility; abilityCount++; } else { int removedIndex = removeAbility(); if (removedIndex >= 0) { abilities[removedIndex] = newAbility; } } }
public override void turn(Character enemy) { Console.WriteLine(Name + "'s turn: "); Console.WriteLine("1. Basic attack"); Console.WriteLine("2. Special abilities"); Console.WriteLine("3. Inventory"); Console.WriteLine("4. Run"); int option = GameManager.getInputBetween(1, 4); if (option == 1) { basicAttack(enemy); } else if (option == 2) { SpecialAbility picked = abilities.getAbility(); picked.useAbility(this, enemy); } else if (option == 3) { inventory.useItem(this, enemy); } }