package com.company;
public class Dragon extends Monster {
@Override
public void kill(Hero hero) {
// TODO Auto-generated method stub
if(!super.isLive())return;
if(!hero.isLive())return;
System.out.println(super.getName()+"挥舞着它可怕的"+super.getWeapon()+"冲向了"+hero.getName());
System.out.println("我们族的人可以扰乱你的心智,可以让你变的迟钝,降低你的躲避概率!而且我们的皮极厚");
hero.setCounteravoid((int)(getCounterattack()*0.5));
hero.hurt(this);
show();
}
public Dragon(String name, String weapon, int life, int attacker, int defender, int type,int counterattack) {
super(name , weapon, life, attacker, defender*2, type, counterattack);
}
public Dragon() {
}
}
package com.company;
import java.sql. *;
import java.util.*;
/*import java.math.*;
*/
public class Games {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in)
|