package electrosphere.data.entity.creature.attack;

import java.util.List;

import electrosphere.data.entity.common.treedata.TreeDataState;

/**
 * Data about a single attack move this creature is capable of
 */
public class AttackMove {

    /*
    Base data
    */
    String attackMoveId;
    String type;

    /*
    Animation stuff
    */
    TreeDataState windupState;
    TreeDataState holdState;
    TreeDataState attackState;
    TreeDataState blockRecoilState;
    TreeDataState cooldownState;

    /*
    Damage stuff
    */
    int windupFrames;
    int attackFrames;
    int cooldownFrames;
    boolean firesProjectile;

    /*
    move chaining stuff
    */
    String nextMoveId;
    int moveChainWindowStart; //when do we open the posibility for a chained move
    int moveChainWindowEnd; // when do we close the opportunity to chain into the next move
    boolean initialMove; // is this the initial move in its movelist?

    /*
    move drift
    this is the term to use when describing forward momentum generated by the attack move
    */
    float driftGoal; // this is the amount we want the animation to push us forward
    int driftFrameStart; //when do we start drifting
    int driftFrameEnd; //when do we stop drifting

    /**
     * The list of bones to activate as hitboxes when this attack move is active
     */
    List<String> activeBones;

    /**
     * Hitstun
     */
    Integer hitstun;

    /**
     * Gets the id of the attack move
     * @return the id of the attack move
     */
    public String getAttackMoveId(){
        return attackMoveId;
    }

    /**
     * Gets the type of attack move
     * @return the attack move type
     */
    public String getType() {
        return type;
    }

    /**
     * Gets the state to play for the windup
     * @return the state data
     */
    public TreeDataState getWindupState() {
        return windupState;
    }

    /**
     * Gets the state to play for the hold
     * @return the state data
     */
    public TreeDataState getHoldState() {
        return holdState;
    }

    /**
     * Gets the state to play for the attack
     * @return the state data
     */
    public TreeDataState getAttackState() {
        return attackState;
    }

    /**
     * Gets the state to play for the recoil
     * @return the state data
     */
    public TreeDataState getBlockRecoilState() {
        return blockRecoilState;
    }

    /**
     * Gets the state to play for the cooldown
     * @return the state data
     */
    public TreeDataState getCooldownState() {
        return cooldownState;
    }

    /**
     * Gets the number of frames to windup for
     * @return the number of frames
     */
    public int getWindupFrames() {
        return windupFrames;
    }

    /**
     * Gets the number of frames to attack for
     * @return the number of frames
     */
    public int getAttackFrames() {
        return attackFrames;
    }

    /**
     * Gets the number of frames to cooldown for
     * @return the number of frames
     */
    public int getCooldownFrames(){
        return cooldownFrames;
    }

    /**
     * Gets the id of the next attack move
     * @return the id of the next attack move
     */
    public String getNextMoveId() {
        return nextMoveId;
    }

    /**
     * Gets the frame number where the window to chain the next attack starts
     * @return the frame number
     */
    public int getMoveChainWindowStart(){
        return moveChainWindowStart;
    }

    /**
     * Gets the frame number where the window to chain the next attack ends
     * @return the frame number
     */
    public int getMoveChainWindowEnd(){
        return moveChainWindowEnd;
    }

    /**
     * Gets the amount we want the animation to push the creature forward
     * @return the amount to push forward
     */
    public float getDriftGoal(){
        return driftGoal;
    }

    /**
     * Gets the frame number where the drift starts
     * @return the frame number
     */
    public int getDriftFrameStart(){
        return driftFrameStart;
    }

    /**
     * Gets the frame number where the drift starts
     * @return the frame number
     */
    public int getDriftFrameEnd(){
        return driftFrameEnd;
    }

    /**
     * Returns if the move is the initial move in the attack chain
     * @return true if the initial move, false otherwise
     */
    public boolean isInitialMove(){
        return initialMove;
    }

    /**
     * Returns if it fires a projectile
     * @return true if it fires a projectile, false otherwise
     */
    public boolean getFiresProjectile(){
        return firesProjectile;
    }


    /**
     * The number of frames to freeze for on successfully landing this attack
     * @return The number of frames or null
     */
    public Integer getHitstun(){
        return hitstun;
    }

    /**
     * Gets the list of bones to activate as hitboxes while the move is active
     * @return The list of bones
     */
    public List<String> getActiveBones() {
        return activeBones;
    }

    
    
    
}
