public void hit(GroupOfUnits target)
	{
		int no = 0;
		try {
			no = target.getNumber();
		} catch (NullPointerException e) {
			return;
		}
		
		if (humanPlaying()) {
			if (currentUnit.type.shooting) {
				gui.Sound.play("sound/shot.wav");
			} else {
				gui.Sound.play("sound/attk.wav");
			}
		}
			
		QApplication.processEvents();
		
		boolean isDead = currentUnit.hit(target);
		String l = currentUnit.type.name+" ("+currentUnit.getOwner().getColor().name+") uderzył "+target.type.name+" i zabił "+(no-target.getNumber())+" jednostek";
		log.emit(l);
		QApplication.processEvents();
		core.Point pos = p2u.get(target);
		if (isDead) {
			mapWidget.objectAt(pos.y, pos.x).setLayer(3, null);
			mapWidget.objectAt(pos.y, pos.x).setLayer(4, null);
			p2u.remove(target);
			units.remove(target);
			
			if (humanPlaying()) {
				gui.Sound.play("sound/kill.wav");
			}
			QApplication.processEvents();
			
		} else {
			mapWidget.objectAt(pos.y, pos.x).setLayer(4, new gui.WidgetLabel(""+target.getNumber(), target.getOwner().getColor()));
		}
		
	}