package lect78_impl.model; /** * @overview Armor Piercing projectile that ignores armor */ public class ProjectileAP extends Projectile { /** * @effects Initialize this as an APProjectile with given parameters */ public ProjectileAP(int damage, int angle, Tank source) { super(damage, angle, source); } /** * @effects Apply damage to the target tank ignoring armor */ @Override public void applyDamage(Tank target) { // AP projectiles ignore armor and deal full damage target.takeDamage(damage); System.out.println("AP damage: " + damage + " to tank at " + target.getPosition() + " (ignoring " + target.getArmor() + " armor)"); } }