import java.awt.Color;
import java.awt.Graphics;

public class HPplus extends Item{
	private int plus;
	public HPplus(){
		super("HP1");
		plus = 1;
		permanent = false;
	}
	public HPplus(int n){
		super("HP"+n);
		plus = n;
		permanent = false;
	}
	public void action(SimObject so){
		so.increaseHP(plus);
	}
	public void drawImage(Graphics g,int x, int y, int w, int h){
		int[] xPos = {x+w/6,x+w/3,x+w/2,x+2*w/3,x+5*w/6,x+w/2};
		int[] yPos = {y+h/2,y+h/6,y+h/3,y+h/6,y+h/2,y+5*h/6};
		g.setColor(Color.black);
		g.fillRect(x+1,y+1,w-4,h-4);
		g.setColor(Color.red);
		g.fillPolygon(xPos,yPos,6);
		g.setColor(Color.blue);
		g.drawString(""+plus,x+2*w/5,y+2*h/3);
	}
}