function init(hero) {
	hero.setName("Star-Lord");
	hero.setTier(3);

	hero.setHelmet("Mask");
	hero.setChestplate("Jacket");
	hero.setLeggings("Pants");
	hero.setBoots("Boots");
	hero.addEquipment("fiskheroes:rip_hunters_gun");
	hero.addEquipment("fiskheroes:chronos_rifle");

	hero.addAbilities("fiskheroes:propelled_flight", "fiskheroes:hover", "fiskheroes:energy_blast");
	hero.addAttribute("ATTACK_DAMAGE", 0.4, 1);
	hero.addAttribute("FALL_RESISTANCE", 0.75, 1);
	hero.addAttribute("PUNCH_DAMAGE", 2.5, 0);
	hero.addAttribute("JUMP_HEIGHT", 1, 0);

	hero.addKeyBind("AIM", "Quad-Blaster", 1);
	hero.addKeyBind("HOVER", "key.hover", 2);
	
	hero.setHasProperty(hasProperty);
    hero.supplyFunction("canAim", canAim);
	hero.setModifierEnabled(isModifierEnabled);
	hero.setRuleValueModifier(ruleModifier);
}

function hasProperty(entity, property) {
    switch (property) {
    case "MASK_TOGGLE":
        return true;
    case "BREATHE_UNDERWATER":
        return !entity.getData("fiskheroes:mask_open");
    case "BREATHE_SPACE":
        return !entity.getData("fiskheroes:mask_open");
    default:
        return false;
    }
}
    
function canAim(entity) {
    return entity.getHeldItem().name() == "fiskheroes:rip_hunters_gun" || entity.getHeldItem().name() == "fiskheroes:chronos_rifle" || entity.getHeldItem().isEmpty();
}

function isModifierEnabled(entity, modifier) {
	if (modifier == "fiskheroes:energy_blast") {
        return entity.getData("fiskheroes:aimed_timer") >= 1;
	}
	return true;
}

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:cooldown_energyblast") {
        return 7;
    }
   return null;
}