function init(hero) {
    hero.setName("War Machine");
    hero.setVersion("\u00A7l\u00A7o\u00A74Skarred \u00A7r\u00A7l\u00A76Heroes\u00A7r");
    hero.setTier(4);
    
    hero.setHelmet("item.superhero_armor.piece.helmet");
    hero.setChestplate("item.superhero_armor.piece.chestplate");
    hero.setLeggings("item.superhero_armor.piece.leggings");
    hero.setBoots("item.superhero_armor.piece.boots");
    
    hero.addPowers("sfiskpack:war_machine_armor");
    hero.addAttribute("PUNCH_DAMAGE", 8.0, 0);
	hero.addAttribute("WEAPON_DAMAGE", 4.0, 0);
    hero.addAttribute("FALL_RESISTANCE", 8.0, 0);
    
    hero.addKeyBind("AIM", "key.aim", 1); 
    hero.addKeyBind("HOVER", "key.hover", 2);
    hero.addKeyBind("SENTRY_MODE", "key.sentryMode", 3);
    hero.addKeyBind("CHARGED_BEAM", "Shoulder Mounted Gun", 4);
    
    hero.setRuleValueModifier(ruleModifier);
    hero.setModifierEnabled(isModifierEnabled);
    hero.setHasProperty(hasProperty);
    hero.supplyFunction("canAim", canAim);
}

function ruleModifier(entity, rule) {
    switch (rule.name()) {
    case "fiskheroes:ticks_chargedbeamshoot":
        return 50.0;
    default:
        return null;
    }
}

function isModifierEnabled(entity, modifier) {
    return modifier.name() != "fiskheroes:water_breathing" || !entity.getData("fiskheroes:mask_open");
}

function hasProperty(entity, property) {
    return property == "MASK_TOGGLE" || property == "BREATHE_SPACE" && !entity.getData("fiskheroes:mask_open");
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty() && !entity.getData("fiskheroes:jetpacking");
}
