package electrosphere.game.data.creature.type;

import electrosphere.game.data.common.TreeDataState;

/**
 * Data about the health of a creature
 */
public class HealthSystem {

    //the maximum health
    int maxHealth;

    //the number of iframes on taking damage
    int onDamageIFrames;

    /**
     * The dying state
     */
    TreeDataState dyingState;

    /**
     * Gets the maximum health
     * @return The maximum health
     */
    public int getMaxHealth() {
        return maxHealth;
    }

    /**
     * Gets the number of iframes on damage
     * @return The number of iframes
     */
    public int getOnDamageIFrames() {
        return onDamageIFrames;
    }

    /**
     * Gets the dying state data
     * @return The dying state data
     */
    public TreeDataState getDyingState(){
        return dyingState;
    }
    
    /**
     * Clones health system data
     */
    public HealthSystem clone(){
        HealthSystem rVal = new HealthSystem();
        rVal.maxHealth = maxHealth;
        rVal.onDamageIFrames = onDamageIFrames;
        rVal.dyingState = dyingState;
        return rVal;
    }
    
}
