Package org.freerealm.property

Examples of org.freerealm.property.Fight


        xml.append("/>");
        return xml.toString();
    }

    public Fight initializeFromNode(Realm realm, Node node) {
        Fight fight = new Fight();
        String attackPointsValue = node.getAttributes().getNamedItem("attackPoints").getNodeValue();
        fight.setAttackPoints(Integer.parseInt(attackPointsValue));
        String defencePointsValue = node.getAttributes().getNamedItem("defencePoints").getNodeValue();
        fight.setDefencePoints(Integer.parseInt(defencePointsValue));
        return fight;
    }
View Full Code Here


    public void removeUnit(int unitId) {
        containerManager.removeUnit(unitId);
    }

    public boolean canAttack() {
        Fight fight = (Fight) getType().getAbility("Fight");
        if (fight == null) {
            return false;
        }
        if (getMovementPoints() == 0) {
            return false;
View Full Code Here

        }
        return true;
    }

    public int getAttackPoints() {
        Fight fight = (Fight) getType().getAbility("Fight");
        if (fight == null) {
            return 0;
        }
        return fight.getAttackPoints();
    }
View Full Code Here

        }
        return fight.getAttackPoints();
    }

    public int getDefencePoints() {
        Fight fight = (Fight) getType().getAbility("Fight");
        if (fight == null) {
            return 0;
        }
        return fight.getDefencePoints();
    }
View Full Code Here

TOP

Related Classes of org.freerealm.property.Fight

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.