packagegame;publicclassMonster{Stringtype;intlife;booleanisLive;publicMonster(intmt){if(mt==1){this.type="普通僵尸";life=40;isLive=true;}elseif(mt==2){this.type="魔法僵尸...
package game;
public class Monster {
String type;
int life;
boolean isLive;
public Monster(int mt){
if(mt==1){
this.type="普通僵尸";
life=40;
isLive=true;
}
else if(mt==2){
this.type="魔法僵尸";
life=35;
isLive=true;
}
else if(mt==2){
this.type="普通僵尸";
life=60;
isLive=true;
}
}
public void injured(){
System.out.println(type+"嗷嗷嗷啊");
life=life-20;
if(life<=0){