function init(hero) {
    hero.setName("Wanda Maximoff/\u00A76\u00A7lUHP\u00A7r");
    hero.setCosmic();
    hero.setVersion("MCU");	
    hero.setTier(2);

    hero.setHelmet("Hair");
    hero.setChestplate("Jacket");
    hero.setLeggings("Pants");
    hero.setBoots("Heels");
    
    hero.addPowers("uhp:chaos_magic");
	
    hero.addKeyBind("AIM", "Energy Blast", 1);
	hero.addKeyBind("CHARGE_ENERGY", "Burst of Energy", 1);
    hero.addKeyBind("SPELL_MENU", "Cast Spell", 2);
    hero.addKeyBind("TELEPORT", "key.teleport", 2);
    hero.addKeyBind("HOVER", "key.hover", 3);
    hero.addKeyBind("SHIELD", "Energy Shield", 4);
	
    hero.addAttribute("FALL_RESISTANCE", 6.5, 0);
    hero.addAttribute("PUNCH_DAMAGE", 4.0, 0);
    hero.addAttribute("WEAPON_DAMAGE", 2.0, 0);
    hero.addAttribute("SPRINT_SPEED", 0.10, 1);

    hero.setModifierEnabled(isModifierEnabled);
    hero.setKeyBindEnabled(isKeyBindEnabled);

    hero.setRuleValueModifier(ruleModifier);
	
    hero.supplyFunction("canAim", canAim);
	
}

function isModifierEnabled(entity, modifier) {
    switch (modifier.name()) {
    case "fiskheroes:propelled_flight":
        return !entity.getData("fiskheroes:aiming") || entity.getData("fiskheroes:hovering");
    case "fiskheroes:hovering":
        return entity.getData("fiskheroes:jetpacking");
    case "fiskheroes:retractable_shield":
        return !entity.getData("fiskheroes:hovering");
    case "fiskheroes:energy_blast":
        return !entity.isSneaking();
    case "fiskheroes:energy_manipulation":
        return entity.getHeldItem().isEmpty() && entity.isSneaking() && !entity.getData("fiskheroes:jetpacking");
    default:
        return true;
    }
}

function ruleModifier(entity, rule) {
    if (rule.name() == "fiskheroes:dmg_laserbolt") {
        return 6.5;
    }
    else if (rule.name() == "fiskheroes:cooldown_energyblast") {
        return 15.5;
    }
    else if (rule.name() == "fiskheroes:dmg_energydischarge") {
        return 16.0;
    }  
    return null;
}

function isKeyBindEnabled(entity, keyBind) {
    switch (keyBind) {
	case "AIM":
        return !entity.isSneaking();
	case "SPELL_MENU":
        return !entity.isSneaking();
	case "TELEPORT":
        return entity.isSneaking();
	case "CHARGE_ENERGY":
        return entity.isSneaking();

    default:
        return true;
    }
}

function canAim(entity) {
    return entity.getHeldItem().isEmpty();
}