package data.hullmods;

import com.fs.starfarer.api.combat.HullModEffect;
import com.fs.starfarer.api.combat.MutableShipStatsAPI;
import com.fs.starfarer.api.combat.ShipAPI;
import com.fs.starfarer.api.combat.ShipAPI.HullSize;

public class AdvancedOptics implements HullModEffect {

	public static final float BEAM_RANGE_BONUS = 120f;
	public static final float BEAM_DAMAGE_PENALTY = 25f;
	public static final float BEAM_TURN_PENALTY = 50f;
	
	public void applyEffectsBeforeShipCreation(HullSize hullSize, MutableShipStatsAPI stats, String id) {
		stats.getBeamWeaponRangeBonus().modifyFlat(id, BEAM_RANGE_BONUS);
		//stats.getBeamWeaponDamageMult().modifyPercent(id, -BEAM_DAMAGE_PENALTY);
		//stats.getBeamWeaponTurnRateBonus().modifyPercent(id, -BEAM_TURN_PENALTY);
	}
	
	public void applyEffectsAfterShipCreation(ShipAPI ship, String id) {
	}

	
	public String getDescriptionParam(int index, HullSize hullSize) {
		if (index == 0) return "" + (int) BEAM_RANGE_BONUS;
		//if (index == 1) return "" + (int) BEAM_DAMAGE_PENALTY;
		if (index == 1) return "" + (int) BEAM_TURN_PENALTY;
		return null;
	}


}
