代码拉取完成,页面将自动刷新
同步操作将从 吕焱飞/zuul 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
import java.util.*;
import java.awt.Robot;
import java.util.Date;
public class Player
{
private static int strength = 500;
private int chivalrouslife = 100;
private int playerdamage = 30;
private int playerdefense = 20;
private int chivalrousdamage = 23;
private Map<String, Thing> bag = new HashMap<>();
public void step(){
strength-=5;
System.out.println("体力值:"+strength+"(体力-5) 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void wuDang_chivalrous_start(){
System.out.println("卧槽发现叶孤城,看小爷灭了他哈哈哈哈哈!!!");
chivalrouslife = 70;
chivalrousdamage = 8;
}
public void wuDang_chivalrous_end(){
System.out.println("获得独孤九剑剑法(攻击力+10)");
playerdamage +=10;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void huaShan_chivalrous_start(){
System.out.println("偶遇花满楼,言语不和大打出手");
chivalrouslife = 80;
chivalrousdamage = 12;
}
public void huaShan_chivalrous_end(){
System.out.println("获得未知功法(防御力+3)");
playerdefense +=3;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void guMu_chivalrous_start(){
System.out.println("尹志平!!!");
System.out.println("哎呀呀,我龙傲天今天便要为民除害");
chivalrouslife = 80;
chivalrousdamage = 15;
}
public void guMu_chivalrous_end(){
System.out.println("获得玉女心经(防御力+5)");
playerdefense +=5;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void jianZhong_chivalrous_start(){
System.out.println("独孤大侠宠物大雕,与其相处啊融洽。");
}
public void jianZhong_chivalrous_end(){
System.out.println("获得玄铁重剑(攻击力+6)");
playerdamage += 6;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void shaMo_chivalrous_start(){
System.out.println("只见地上貌似有一个茶壶???");
System.out.println("摸一摸,卧槽神灯");
chivalrouslife = 150;
chivalrousdamage = 18;
}
public void shaMo_chivalrous_end(){
System.out.println("神秘力量(攻击力+8)");
playerdamage += 8;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void lingJiuSi_chivalrous_start(){
System.out.println("喝,此寺庙看上去颇为不凡,待我进去瞅瞅");
chivalrouslife = 200;
chivalrousdamage = 16;
}
public void lingJiuSi_chivalrous_end(){
System.out.println("获得易筋经(攻击力+6 防御力+6)");
playerdefense += 6;
playerdamage +=6;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void eMei_chivalrous_start(){
chivalrouslife = 200;
chivalrousdamage = 16;
}
public void eMei_chivalrous_end(){
System.out.println("获得九阴真经(攻击力+6 防御力+6)");
playerdefense += 6;
playerdamage +=6;
System.out.println("体力值:"+strength+" 攻击力:"+playerdamage+" 防御力:"+playerdefense);
}
public void chivalrous(){
while(chivalrouslife>0){
int damage=testRandom();
chivalrouslife-=(playerdamage+damage);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("对游侠儿造成"+playerdamage+"(+"+damage+")"+"点伤害");
damage=testRandom();
strength-=(chivalrousdamage+damage);
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("目标对你造成"+chivalrousdamage+"(+"+damage+")"+"(-"+playerdefense+")"+"点伤害");
}
try {
Thread.sleep(1000);
} catch (InterruptedException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
System.out.println("杀死目标");
}
public void eat (String thingName){
Thing thing = bag.get(thingName);
if(thing !=null){
strength +=thing.getEnergy();
if(thing.getEnergy()>0) {
System.out.println("体力值增加 "+thing.getEnergy()+".");
if(this.strength > 500){}
this.strength = 500;
System.out.println("体力值已达上限值,不会再增加");
System.out.println("现在的体力值为 "+strength);
}
else{
System.out.println("你用了有毒的物品.");
System.out.println("体力减少 "+thing.getEnergy()+".");
}
}
else
System.out.println("用什么?");
bag.remove(thingName);
if(strength<=0){
System.out.println("你凉了");
System.out.println("游戏结束 ");
System.exit(1);//退出游戏
}
}
public void pick(Thing thing){
if(thing==null)
System.out.println("这里没有东西!");
else
{
System.out.println("你获得了" + thing.getName());
bag.put(thing.getName(),thing);
}
}
public void checkss(){
for(String key : bag.keySet()){
System.out.println(" "+key);
}
}
public int testRandom(){
int min = 1;
int max = 10;
int intBounded = min + ((int) (new Random().nextFloat() * (max - min)));
return intBounded;
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。