package model.ability_management.ability_set;

import model.ability_management.ability.Ability;
import model.transporters.Transporter;

import java.util.ArrayList;

/**
 * Created by TheNotoriousOOP on 4/12/2017.
 * Class Description:
 * Responsibilities:
 */
public class AbilitySet {
    //not using this
    private ArrayList<Ability> invalidAbilities;

    private ArrayList<Ability> validAbilities = new ArrayList<>();

    //not using this constructor
    public AbilitySet(ArrayList<Ability> invalidAbilities, ArrayList<Ability> validAbilities) {
        this.invalidAbilities = invalidAbilities;
        this.validAbilities = validAbilities;
    }

    public AbilitySet(){

    }

    public AbilitySet(ArrayList<Ability> validAbilities){
        this.validAbilities = validAbilities;

    }

    public void updateAbilitiesByNode(ArrayList<Ability> nodeValidAbilities){
        validAbilities.addAll(nodeValidAbilities);
    }

    //set the actor of each ability in the set
    public void addActorToSet(Transporter t){
        for (Ability ability : validAbilities){
            ability.setActor(t);
        }
    }

    public ArrayList<Ability> getInvalidAbilities() {
        return invalidAbilities;
    }

    public void setInvalidAbilities(ArrayList<Ability> invalidAbilities) {
        this.invalidAbilities = invalidAbilities;
    }

    public ArrayList<Ability> getValidAbilities() {
        return validAbilities;
    }

    public void setValidAbilities(ArrayList<Ability> validAbilities) {
        this.validAbilities = validAbilities;
    }
}

@@ -799,143 +799,8 @@
  %7D%0A%0A
-    public void updateAbilitiesByNode(ArrayList%3CAbility%3E nodeValidAbilities)%7B%0A        validAbilities.addAll(nodeValidAbilities);%0A    %7D%0A
 %0A   
@@ -991,232 +991,8 @@
  %7D%0A%0A
-    public ArrayList%3CAbility%3E getInvalidAbilities() %7B%0A        return invalidAbilities;%0A    %7D%0A%0A    public void setInvalidAbilities(ArrayList%3CAbility%3E invalidAbilities) %7B%0A        this.invalidAbilities = invalidAbilities;%0A    %7D
 %0A%0A  
@@ -1201,11 +1201,213 @@
 s;%0A    %7D
+%0A%0A    public void addValidAbility(Ability ability)%7B%0A        validAbilities.add(ability);%0A    %7D%0A%0A    public void removeAbilityFromValidList(Ability ability)%7B%0A        validAbilities.remove(ability);%0A    %7D
 %0A%7D%0A

add and remove element from ability set