diff --git a/build.gradle b/build.gradle index d0d696ae9..30d38ef00 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ allprojects { appName = 'Magic Ling Pixel Dungeon' appPackageName = 'com.ansdomagiclingpixeldungeon.ling' - appVersionCode =800852 - appVersionName = '0.6.1.0-Beta5.25(P3)' + appVersionCode =800857 + appVersionName = '0.6.1.0-Beta5.35(P3)' appJavaCompatibility = JavaVersion.VERSION_1_8 diff --git a/core/bin/main/com/shatteredpixel/shatteredpixeldungeon/items/weapon/gun/coming soon b/core/bin/main/com/shatteredpixel/shatteredpixeldungeon/items/weapon/gun/coming soon new file mode 100644 index 000000000..e69de29bb diff --git a/core/src/main/assets/interfaces/badges.png b/core/src/main/assets/interfaces/badges.png index d73e0b1ec..c4231f29e 100644 Binary files a/core/src/main/assets/interfaces/badges.png and b/core/src/main/assets/interfaces/badges.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index e77010d65..160158850 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1,6 +1,8 @@ #####MLPD-P3文本 -actors.mobs.bosses.diamondknight.name=宝箱之王 +actors.hero.hero.heartdied=死亡不是终点,而是新的开始。 + +actors.mobs.bosses.diamondknight.name=拟态之王 actors.mobs.bosses.diamondknight.desc=拟态的最终结果就是无限接近人类。\n原本作用拟形的钻石宝箱外壳化作盔甲,包裹住如王般的内在。\n衪是所有拟形怪的王——至少衪是这么认为的。\n王会战斗到最后一刻,直到粉身碎骨。 actors.mobs.bosses.diamondknight.notice=你杀了我很多的子嗣,你理应用你的命来赎罪! @@ -8,11 +10,14 @@ actors.mobs.bosses.diamondknight.now_go=真是有趣的家伙,本王带你看 actors.mobs.bosses.diamondknight.war_go=很久没有这么热血沸腾了!挑战者,或许你真的是这里唯一的光芒 actors.mobs.bosses.diamondknight.iswar_go=最大的敌人往往就是你自己,准备好和自己决一死战了吗? actors.mobs.bosses.diamondknight.ok_go=好吧,让我们以最纯朴的战斗结束这次的较量吧。 -actors.mobs.bosses.diamondknight.defeated=真是一场有趣的战斗,挑战者,这次就算你赢了! +actors.mobs.bosses.diamondknight.defeated=真是一场有趣的战斗,挑战者,这次就算你赢了!另外,我在来的路上杀死了一名刺客,他的面具就交给你了…… actors.mobs.bosses.dcrystal.name=深蓝水晶 actors.mobs.bosses.dcrystal.desc=深蓝水晶将缓慢治愈宝箱之王,还请留意。 +actors.mobs.bosses.tpdoor.name=神秘传送门 +actors.mobs.bosses.tpdoor.desc=神秘传送门的力量与拟态王有着千丝万缕的联系,摧毁它也许能对衪造成伤害。 +actors.mobs.bosses.tpdoor.lowdamage=你对传送门造成的伤害太低了,或许需要更强的力量才能击破它。 actors.mobs.salamander.name=深蓝蝾螈 actors.mobs.salamander.desc=来自森林的小生物,由于下方的邪恶力量侵蚀,它们已经由温顺变得凶猛。\n它们锋利的尾巴能穿透敌人,它们十分的聪明,且极其灵活,必须趁其不备将之杀掉。 @@ -96,7 +101,7 @@ actors.buffs.magicgirldebuff.magicgirlsaycursed.name=魔女的低语-束缚 actors.buffs.magicgirldebuff.magicgirlsaycursed.desc=束缚只是我的一个考验,而失去信心的你。想必比我这个考验更可怕吧。\n\n本大层装备会被诅咒,下一大层失效 actors.buffs.magicgirldebuff.magicgirlsaykill.name=魔女的低语-审判 -actors.buffs.magicgirldebuff.magicgirlsaykill.desc=灯火摇摆不定,朦胧中你似乎看见了一个魔女向你挥起了剑。(一切是你们咎由自取)\n\n本大层怪物近战伤害提升10% +actors.buffs.magicgirldebuff.magicgirlsaykill.desc=灯火摇摆不定,朦胧中你似乎看见了一个魔女向你挥起了剑。(一切是你们咎由自取)\n\n本大层英雄近战伤害降低至90% actors.buffs.magicgirldebuff.magicgirlsayslowy.name=魔女的低语-迟钝 actors.buffs.magicgirldebuff.magicgirlsayslowy.desc=缓慢的走向死亡吧……\n\n本大层英雄每移动10回合获得3回合残废。 @@ -107,6 +112,9 @@ actors.buffs.magicgirldebuff.magicgirlsaysoftdied.desc=软弱不是你的缺点 actors.buffs.magicgirldebuff.magicgirlsaymoneymore.name=魔女的低语-贪婪 actors.buffs.magicgirldebuff.magicgirlsaymoneymore.desc=贪婪的欲望是人类的本质\n\n本大层商店的价格除十字架和食物和治疗药水打1折,其他全部1.5倍价格。 +actors.buffs.magicgirldebuff.magicgirlsaytimelast.name=魔女的低语-流逝 +actors.buffs.magicgirldebuff.magicgirlsaytimelast.desc=流逝的是时间,不变的是地牢的模样。\n\n本大层每隔一段时间英雄获得随机火焰,中毒,流血其中之一。 + ### Good Blees Buffs actors.buffs.clearbleesdgoodbuff.blessgoodstr.name=纯洁的祝福-坚毅 actors.buffs.clearbleesdgoodbuff.blessgoodstr.desc=坚毅是我们不屈的斗志!\n\n本大层玩家额外追加2点力量 @@ -126,6 +134,9 @@ actors.buffs.clearbleesdgoodbuff.blessimmune.desc=隐没在这人群之中,我 actors.buffs.clearbleesdgoodbuff.blessgoread.name=纯洁的祝福-前路 actors.buffs.clearbleesdgoodbuff.blessgoread.desc=行走在这令人惧怕的地牢中,灯火是前路的指引\n\n本大层英雄灯火值高于60%的情况下,获得每回合进行血量回复。 +actors.buffs.clearbleesdgoodbuff.blessanmy.name=纯洁的祝福-共生 +actors.buffs.clearbleesdgoodbuff.blessanmy.desc=昏暗的地牢,其实仍然可以共生共存。\n\n本大层玩家获得_“共生法杖”_,可在每层选择一个怪物成为你的盟友,该法杖无法升级,且Buff效果消失后自动消失。(_共生只是为了生存,我们所做的只有拯救自己_) + ###MLPD actors.mobs.bosses.crossdiedtower.dead=控制目标已丢失,已自动摧毁…… actors.mobs.bosses.crossdiedtower.name=激光十字晶柱 @@ -1307,10 +1318,10 @@ actors.hero.hero.died=你的十字架毫无用处……,你彻底死在了雪 ##classes actors.hero.heroclass.warrior=蕾零安洁 actors.hero.heroclass.warrior_desc_item=蕾零安洁初始携带一枚可以贴附于护甲的_独特破损纹章。_\n\n蕾零安洁在装备附着纹章的护甲时会随时间产生生命值之上的护盾值。\n\n纹章可以在护甲之间转移,并且可以携带一级升级。 -actors.hero.heroclass.warrior_desc_loadout=蕾零安洁初始携带一把_破损的短剑。_这把武器的直接近战伤害是所有初始武器中最高的。\n\n蕾零安洁初始携带_三块石子。_石子可以扔出攻击远处,造成一定的少量伤害。\n\n蕾零安洁初始携带一个可以收纳各种药水并保护药水瓶不被冻碎的_药水架。_ -actors.hero.heroclass.warrior_desc_misc=蕾零安洁每次食用食物时都能恢复少量生命值。\n\n蕾零安洁开局鉴定的物品有:\n- 鉴定卷轴\n- 治疗药水\n- 盛怒卷轴 +actors.hero.heroclass.warrior_desc_loadout=蕾零安洁初始携带一把_破损的短剑。_这把武器的直接近战伤害是所有初始武器中最高的。\n\n蕾零安洁初始携带_三块石子。_石子可以扔出攻击远处,造成一定的少量伤害。\n\n蕾零安洁初始携带一个可以收纳各种药水并保护药水瓶不被冻碎的_药水架。_\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_ +actors.hero.heroclass.warrior_desc_misc=蕾零安洁每次食用食物时都能恢复少量生命值。\n\n蕾零安洁开局鉴定的物品有:\n- 鉴定卷轴\n- 治疗药水\n- 盛怒卷轴\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_ actors.hero.heroclass.warrior_desc_subclasses=在击杀第二个Boss后可以选择一种专精。蕾零安洁可以在两种专精中二选一: -actors.hero.heroclass.warrior_story=剧情故事待补充-123 +actors.hero.heroclass.warrior_story=蕾零安洁作为战士一族并没有过人的天赋,但在罗伦斯的教导下她掌握了召唤秘术。\n\n她初始携带的唤魔晶柱与她的秘术合二为一。\n\n这样所向披靡的她在战场上成为了一名无人能敌的战士。但谁又知道她的真实身份呢? actors.hero.heroclass.huntress_story=剧情故事待补充-456 actors.hero.heroclass.rogue_story=剧情故事待补充-789 actors.hero.heroclass.mage_story=剧情故事待补充-101112 @@ -1355,7 +1366,7 @@ actors.hero.herosubclass.sniper_desc=_远灵之主_乃远程战斗大师。她 actors.hero.herosubclass.warden=自然仙子 actors.hero.herosubclass.warden_desc=_自然仙子_与自然之力有强大的联结,这使得自然仙子具有穿透高草的视野,而且种下的种子周围会生出枯草。自然仙子在踩踏植物时会获得额外效果。 -actors.hero.heroclass.warrior_desc=蕾零安洁初始携带一枚可以贴附于护甲的_独特破损纹章。_他在装备附着纹章的护甲时会随时间产生生命值之上的护盾值。纹章可以在护甲之间转移,并且可以携带一级升级。\n\n同时,蕾零安洁初始携带一柄_破旧的短剑_,_三块投石_,布甲,水袋与绒布包。\n\n蕾零安洁开局鉴定的物品有:\n_-_鉴定卷轴\n_-_治疗药水\n_-_盛怒卷轴 +actors.hero.heroclass.warrior_desc=蕾零安洁初始携带一枚可以贴附于护甲的_独特破损纹章。_他在装备附着纹章的护甲时会随时间产生生命值之上的护盾值。纹章可以在护甲之间转移,并且可以携带一级升级。\n\n同时,蕾零安洁初始携带一柄_破旧的短剑_,_三块投石_,布甲,水袋与绒布包以及一个不会消耗的_唤魔晶柱_。\n\n蕾零安洁开局鉴定的物品有:\n_-_鉴定卷轴\n_-_治疗药水\n_-_盛怒卷轴 actors.hero.heroclass.mage_desc=茉莉伊洛初始携带一把_老魔杖_。老魔杖的自动充能速度显著快于一般法杖,并且有 1 点额外最大充能数。茉莉伊洛可以将地牢中找到的各式法杖灌注到老魔杖中。\n\n同时,茉莉伊洛初始携带一把已灌注了_魔弹法杖_的老魔杖、布甲、水袋与绒布包。\n\n茉莉伊洛开局鉴定的物品有:\n_- _鉴定卷轴\n_- _液火药剂\n_-_ 升级卷轴 diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 075296f49..9b51ce5fb 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1,6 +1,18 @@ ####MLPD-P3文本 items.weapon.melee.sdbsword.name=钻石大剑 -items.weapon.melee.sdbsword.desc=钻石制成的奇特大剑,现在它已经给予了足够多的能量,它回到了巅峰时刻\n剑身残留着钻石宝箱王的魔力,因此对其他魔力有着莫名的亲和性。相比于其他武器,这把武器会随着等级的提升增加更多伤害。\n这把武器攻击速度极慢,但精准极高。\n该武器已经重回巅峰,可以发射剑气。 +items.weapon.melee.sdbsword.desc=钻石制成的奇特大剑,现在它已经给予了足够多的能量,它回到了巅峰时刻\n剑身残留着钻石宝箱王的魔力,因此对其他魔力有着莫名的亲和性。相比于其他武器,这把武器会随着等级的提升增加更多伤害。\n这把武器攻击速度极慢,但精准极高。\n该武器已经重回巅峰,可以发射剑气。(该武器尚未完成,切勿使用) + +items.wands.wandofanmy.name=共生法杖 +items.wands.wandofanmy.desc=这把法杖是由神秘的能量驱使的,它们会在能量充足的时候,使地牢的怪物臣服于你(Boss除外)。\n\n该法杖无法自动升级,无法丢弃,且在神秘能量消散时一同消散…… +items.wands.wandofanmy.stats_desc=这根法杖能射出心灵控制波,\n没有任何伤害,但可以立刻控制一个怪物成为盟友。 +items.wands.wandofanmy$allytorestart.name=共生思维 +items.wands.wandofanmy$allytorestart.desc=合作或许是一种更好的解脱方式,也许我们本不应该与人类为敌…… + +items.books.bookslist.dimandbook.name=??? +items.books.bookslist.dimandbook.desc=你......杀死......我的子嗣......你......敢与我......对决吗? +items.books.bookslist.dimandbook.author=作者:未知 +items.books.bookslist.dimandbook.ac_read=挑战 + items.quest.mime$gold_one.name=镶金碧翠月牙宝石 items.quest.mime$gold_one.desc=来自于异世界的物品,虽然在这个世界无法产生它原有的作用。但它的宝贵价值足以让商人眼前一亮。 diff --git a/core/src/main/assets/messages/levels/levels.properties b/core/src/main/assets/messages/levels/levels.properties index a41e316bf..d17751e86 100644 --- a/core/src/main/assets/messages/levels/levels.properties +++ b/core/src/main/assets/messages/levels/levels.properties @@ -6,6 +6,10 @@ levels.features.chasm.jump=你确定要跳入洞口中?从这么高的地方 levels.features.chasm.ondeath=你落地过猛摔死了…… levels.features.chasm.rankings_desc=死于撞击 +levels.rooms.standard.magicdimandroom$chestmarker.name=暴风雪莹标记 +levels.rooms.standard.magicdimandroom$chestmarker.desc=一个神秘的标记,是谁在这里设计的呢? + + levels.prisonlevel.statue=树 levels.prisonlevel.statue_desc=地牢里面怎么会有树的存在?这令人匪夷所思! diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index 5ce7087ef..1a9a9e0ee 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -87,7 +87,7 @@ badges$badge.champion_5x=救世之主\n\n_开启10项以上挑战通关\n\n[不 badges$badge.unlock_mage=解锁法师 badges$badge.unlock_rogue=解锁盗贼 badges$badge.unlock_huntress=解锁女猎手 -badges$badge.kill_dm=击败拟态之王\n\n一场”公平"的对决 +badges$badge.kill_sm=击败拟态之王\n\n一场”公平"的对决 badges$badge.rlpt=_支离破碎征服者_\n\n开启挑战并击败古神\n\n_奖励:0层随机神器(四大基座上)_ badges$badge.sbdjs=风暴袭来,未完待续\n\n你通过它成功离开,却不知,外面风暴袭来\n\n水晶之心仍然在你手中闪闪发光,或许,这事还没完! badges$badge.kill_mg=击败冰雪魔女-冬铃\n\n冰雪之地的女王\n\n_奖励:0层额外十字架(四大基座上,与DM720不叠加)_ @@ -96,7 +96,7 @@ badges$badge.slimepr=击败史莱姆公主\n\n妥协的结果 badges$badge.drawf_head=击败矮人将军\n\n矮人王国的正规军残党 badges$badge.brcler=起始归一\n\n你已经粉碎了DM-ZERO的阴谋,现在是时候回归正常生活了。\n[完成首领对决] - +badges$badge.take_item=宝藏探索者\n\n获得宝藏迷宫的全部宝藏 badges$badge.kill_apple=击败克里弗斯之果\n\n盘踞在森林底部的幕后“主谋" badges$badge.spicealboss=累计击败全部特殊BOSS\n\n风暴正在降临 @@ -152,5 +152,6 @@ challenges.cs=挑战(占位符) challenges.cs_desc=这并不是挑战,请忽略不计。 + kill=\n_冰雪魔女:_\n_-_生命+25%\n_-_ 水中召唤的仆从更多\n-击败时必定掉落紫金宝石护符\n_矮人大师:_\n_-_ 致命技能更加频繁\n_-_ 生命值+50%\n-击败时必定掉落自然神圣护符\n_史莱姆王:_\n_-_ 生命值+100%\n_-_ 伤害更高,速度更快\n_-_ 在开局额外召唤豺狼诡术师,巨钳螃蟹,腐臭老鼠,蚀化史莱姆\n_-_ 击败时必定掉落凝胶手套\n_DM720:_\n_-_ 获得全新技能\n_-_ 击败时必定掉落DM150控制终端[尚未完成] diff --git a/core/src/main/assets/messages/scenes/scenes.properties b/core/src/main/assets/messages/scenes/scenes.properties index 758070fdd..3d0d82779 100644 --- a/core/src/main/assets/messages/scenes/scenes.properties +++ b/core/src/main/assets/messages/scenes/scenes.properties @@ -192,12 +192,11 @@ scenes.gamenewsscene$newsinfo.no_internet=正在检查新版本,长时间无响 scenes.gamenewsscene.read_more=继续游玩 scenes.gamenewsscene$articlebutton.update=最新版本! -scenes.gamenewsscene$articlebutton.desc=你的游戏版本为最新,点击下方继续游戏。 -scenes.gamenewsscene$articlebutton.download=Δ更新版本Δ +scenes.gamenewsscene$articlebutton.desc=恭喜!!!\n你的游戏版本为最新,请点击下方继续游玩的按钮以方便你继续游玩这个游戏。\n最新版更新内容如下所示: +scenes.gamenewsscene$articlebutton.download=Π更新版本Π +scenes.gamenewsscene$articlebutton.force_download=点我下载正版并关闭游戏 scenes.gamenewsscene$articlebutton.okay=继续游玩 - - scenes.rankingsscene.title=最高纪录 scenes.rankingsscene.total=游戏次数: scenes.rankingsscene.no_games=目前为止还没有已经结束的游戏。 diff --git a/core/src/main/assets/messages/ui/ui.properties b/core/src/main/assets/messages/ui/ui.properties index b627a1b5f..82c20a301 100644 --- a/core/src/main/assets/messages/ui/ui.properties +++ b/core/src/main/assets/messages/ui/ui.properties @@ -505,4 +505,9 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x58=-V0.6.1-Beta5\n1.修复FlameC02 ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x59=-V0.6.1-Beta5.1\n1.修复英雄祝福的错误给予回合\n2.修复经验为负的特殊情况\n-修复少量错误崩溃 +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x60=-V0.6.1-Beta5.275\n1.修复嗜血荆棘炼金的一些崩溃错误\n2.优化一些UI设置\n3.修复一些小型错误 + +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x61=-V0.6.1-Beta5.3\n1.修复一些疏漏错误\n2.平衡拟态王三阶段\n3.修复矮人大师,魔法火把,拟态王二阶段无法切换的诸多错误。 + + //ui.changelist.mlpd.vm0_5_x_changes.xxx// \ No newline at end of file diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index d6e378c71..ddf9785d8 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -5,6 +5,8 @@ windows.wndkeybindings.prev=《 windows.wndkeybindings.next=》 windows.wndkingshop.nomoney=看起来你并不是很有钱……,我这人不给穷人卖东西,你自求多福吧。 +windows.wndkeybindings.update=检查更新 + windows.newwndchallenges$1$1.title=挑战模式-Page1 windows.newwndchallenges$2$1.title=挑战模式-Page2 @@ -379,7 +381,9 @@ windows.wndstory.prisonboss=如果你做了坏事,就会付出与之相匹配 作为这个世界的第一个刺客,天狗的职责是什么?他究竟是否还在遵守那个契约?\n\n没有人知道这些。\n\n不过,你并不是天狗等待的那个人\n\n\ 因此,如果你想要去矿洞。必须要先想办法离开这里。\n\n虽然天狗与你无冤无仇,但,真正的钥匙在天狗那里,您必须为这一战付出艰辛的努力。\n\n不过,你究竟是常量吗?\n\n如果是,请拿出证明。 -windows.wndstory.caves=这座从废弃监狱延伸而下的洞穴,早已空无一人。这里对于城市而言过于深入且很难开发,其中极度匮乏的矿物也无法激起矮人的兴趣。曾经在这里有一个为两个势力建立的贸易站,但在矮人国度衰落之后,只有无所不在的豺狼人和地下生物还居住在这里。\n\n但这里早已经被邪恶的魔力控制\n\n这里已经十分危险了。 +windows.wndstory.coldchest=原本关押最危险犯人的区域变成了一个别样的模样,周围的气息越来越冷,一场恶战不可避免…… + +windows.wndstory.caves=暴风雪在此止步,但前方更加寒冷。这座从废弃监狱延伸而下的洞穴,早已空无一人,而如今还被冰雪覆盖。这里对于城市而言过于深入且很难开发,其中极度匮乏的矿物也无法激起矮人的兴趣。曾经在这里有一个为两个势力建立的贸易站,但在矮人国度衰落之后,只有无所不在的豺狼人和地下生物还居住在这里。\n\n但这里早已经被邪恶的魔力控制\n\n这里已经十分危险了。 windows.wndstory.cavesboss=起源,发展,盛世,腐朽,危机,暴乱,谋权,灭亡\n\n这便是这个矮人王国的发展历程\n\n现在,矮人王国的人似乎已经知道你正在前来的路上、\n\n\ 他们为你准备了一份大礼,你是否看见了前面的那台机器?\n\n那是DM,是矮人王国的中的一台巨型采矿机器。\n\n不过,现在这个机器只是在守卫这里。\n\n它在等待什么?\n\n我们又在这里干什么?\n\n 按照你曾经在家看见的古书记载,这里过去就是曾经繁荣昌盛的矮人国度。\n\nDM似乎并没有发现你,虽然这不是DM的错,但你是想寻找到地牢的深处。\n\n为此,你不得不得向这台机器进行殊死搏斗。\n\n记住,要相信自己,能够活下来! diff --git a/core/src/main/assets/sprites/items/items.png b/core/src/main/assets/sprites/items/items.png index 4c64ef59f..a13ede286 100644 Binary files a/core/src/main/assets/sprites/items/items.png and b/core/src/main/assets/sprites/items/items.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 2ce5eb5df..b65f3b16d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -316,6 +316,7 @@ public class Assets { public static final String FREA = "sprites/boss/FireCrstal.png"; public static final String DREA = "sprites/boss/DCrstal.png"; + public static final String TPDP = "sprites/boss/TPDoor.png"; public static final String ITEMS = "sprites/items/items.png"; public static final String WFS = "sprites/items/wf.png"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index b356b7735..beeaa582c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -167,7 +167,9 @@ public class Badges { CHAMPION_5X ( 116 ), NYZ_SHOP ( 117 ), DAGETO ( 118 ), - KILL_DM ( 119 ), + KILL_SM ( 119 ), + + TAKE_ITEM ( 120 ), //rudy FIREGIRL ( 128 ), @@ -961,11 +963,15 @@ public class Badges { validateAMZ(); } - public static void KILL_DMK() { - displayBadge( Badge.KILL_DM ); + public static void KILL_SMK() { + displayBadge( Badge.KILL_SM ); validateAMZ(); } + public static void KILL_OMP() { + displayBadge( Badge.TAKE_ITEM ); + } + public static void BIGX() { displayBadge( Badge.BIG_X ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 3608dca64..2a6aa6c53 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessAnmy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSight; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision; @@ -447,7 +448,9 @@ public class Dungeon { level = new PrisonLevel(); break; case 10: - if((Statistics.boss_enhance & 0x2) != 0) level = new ColdChestBossLevel(); + if((Statistics.boss_enhance & 0x2) != 0 || Statistics.mimicking){ + level = new ColdChestBossLevel(); + } else level = new PrisonBossLevel(); break; @@ -499,6 +502,10 @@ public class Dungeon { Statistics.deepestFloor--; } + if(Dungeon.hero.buff(BlessAnmy.class) != null && Statistics.TryUsedAnmy){ + Statistics.TryUsedAnmy = false; + } + level.create(); Statistics.qualifiedForNoKilling = !bossLevel(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java index 7f6c06505..01ae2cc50 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java @@ -73,22 +73,30 @@ public class Statistics { //宝藏迷宫 public static int goldchestmazeCollected; + //珍宝 + public static int dimandchestmazeCollected; + public static int dageCollected; + //首次对决 + public static boolean mimicking = false; + //Directly add float time will cause accuracy lose and stop timing if time is long enough //so use long to record seconds, float to count sub-seconds. //SPD-V1.3.2-ITEM SPAWN CODE public static long real_seconds = 0; public static float second_elapsed = 0; public static float turnsPassed = 0f; + public static boolean TryUsedAnmy= false; - public static void reset() { + public static void reset() { goldCollected = 0; deepestFloor = -1; enemiesSlain = 0; foodEaten = 0; goldchestmazeCollected = 0; + dimandchestmazeCollected =0; itemsCrafted = 0; piranhasKilled = 0; ankhsUsed = 0; @@ -102,6 +110,8 @@ public class Statistics { duration = 0; qualifiedForNoKilling = false; + + mimicking = false; amuletObtained = false; @@ -117,6 +127,8 @@ public class Statistics { bugsyncfixed = false; crivusfruitslevel2 = false; + TryUsedAnmy = false; + second_elapsed = 0f; real_seconds = 0; turnsPassed = 0f; @@ -168,12 +180,24 @@ public class Statistics { private static final String NAYAZICOLLECTED = "naiyaziCollected"; + private static final String AnmyMobs = "anmymobs"; + + private static final String MMC = "mmcsx"; + + private static final String DDK = "dada"; + public static void storeInBundle( Bundle bundle ) { bundle.put( LANTERACTIVE, lanterfireactive ); bundle.put(GOLDCHEST, goldchestmazeCollected); + bundle.put(DDK,dimandchestmazeCollected); + bundle.put( CrivusFruitsLevel2, crivusfruitslevel2 ); + bundle.put(MMC,mimicking); + + bundle.put( AnmyMobs, TryUsedAnmy ); + bundle.put( TIPSGO, tipsgodungeon ); bundle.put( BUG_SYNC_FIXED, bugsyncfixed ); @@ -216,10 +240,14 @@ public class Statistics { public static void restoreFromBundle( Bundle bundle ) { + dimandchestmazeCollected = bundle.getInt(DDK); + goldchestmazeCollected = bundle.getInt(GOLDCHEST); naiyaziCollected = bundle.getInt(NAYAZICOLLECTED); + mimicking = bundle.getBoolean(MMC); + goldCollected = bundle.getInt( GOLD ); deepestFloor = bundle.getInt( DEEPEST ); enemiesSlain = bundle.getInt( SLAIN ); @@ -237,6 +265,8 @@ public class Statistics { duration = bundle.getFloat( DURATION ); qualifiedForNoKilling = bundle.getBoolean( NO_KILLING_QUALIFIED ); + + TryUsedAnmy = bundle.getBoolean( AnmyMobs); amuletObtained = bundle.getBoolean( AMULET ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessAnmy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessAnmy.java new file mode 100644 index 000000000..7ac9accdf --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessAnmy.java @@ -0,0 +1,108 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfAnmy; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; +import com.watabou.utils.Bundle; + +public class BlessAnmy extends Buff { + + { + type = buffType.POSITIVE; + } + + public static int level = 0; + private int interval = 1; + + @Override + public boolean act() { + if (target.isAlive()) { + + spend(interval); + if (level <= 0) { + detach(); + } + + } + + return true; + } + + @Override + public void detach() { + if (target.sprite != null) fx( false ); + target.remove( this ); + + WandOfAnmy wandOfAnmy = Dungeon.hero.belongings.getItem(WandOfAnmy.class); + wandOfAnmy.detachAll( hero.belongings.backpack ); + } + + public int level() { + return level; + } + + public void set( int value, int time ) { + //decide whether to override, preferring high value + low interval + if (Math.sqrt(interval)*level <= Math.sqrt(time)*value) { + level = value; + interval = time; + spend(time - cooldown() - 1); + } + } + + @Override + public float iconFadePercent() { + if (target instanceof Hero){ + float max = ((Hero) target).lvl; + return Math.max(0, (max-level)/max); + } + return 0; + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", level, dispTurns(visualcooldown())); + } + + private static final String LEVEL = "level"; + private static final String INTERVAL = "interval"; + + @Override + public void storeInBundle( Bundle bundle ) { + super.storeInBundle( bundle ); + bundle.put( INTERVAL, interval ); + bundle.put( LEVEL, level ); + } + + @Override + public void restoreFromBundle( Bundle bundle ) { + super.restoreFromBundle( bundle ); + interval = bundle.getInt( INTERVAL ); + level = bundle.getInt( LEVEL ); + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(0x66bbcc); + } + + @Override + public int icon() { + return BuffIndicator.GOBUFF_UPRD; + } + + +} + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java index fba56c32d..85cce54a4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Hunger.java @@ -68,7 +68,7 @@ public class Hunger extends Buff implements Hero.Doom { if (Dungeon.level.locked || target.buff(WellFed.class) != null - || target.buff(ScrollOfChallenge.ChallengeArena.class) != null || Dungeon.depth == 0){ + || target.buff(ScrollOfChallenge.ChallengeArena.class) != null || Dungeon.depth == 0|| target.buff(IceHealHP.class) != null){ spend(STEP); return true; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/IceHpBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/IceHpBuff.java index 34f70a528..6e5b4ff80 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/IceHpBuff.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/IceHpBuff.java @@ -15,7 +15,7 @@ public class IceHpBuff extends Buff implements Hero.Doom { private static final String LEVEL = "level"; private static final String PARTIALDAMAGE = "partialDamage"; - private static final float STEP = 50.0f; + private static final float STEP = 25.0f; private float level; private float partialDamage; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayTimeLast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayTimeLast.java new file mode 100644 index 000000000..034bb5090 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayTimeLast.java @@ -0,0 +1,112 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; +import com.watabou.utils.Bundle; +import com.watabou.utils.Random; + +public class MagicGirlSayTimeLast extends Buff { + + { + type = buffType.POSITIVE; + } + + public static int level = 0; + private int interval = 1; + + @Override + public boolean act() { + if (target.isAlive()) { + + switch (Random.NormalIntRange(0,2)){ + case 0: + Buff.affect( hero, Burning.class ).reignite( hero, 20f ); + break; + case 1: + Buff.affect( hero, Poison.class ).set(Random.Int(5, 7) ); + break; + case 2: + Buff.affect( hero, Bleeding.class ).set(Random.Int(6,8) ); + break; + } + spend(350f); + if (level <= 0) { + detach(); + } + + } + + return true; + } + + public int level() { + return level; + } + + public void set( int value, int time ) { + //decide whether to override, preferring high value + low interval + if (Math.sqrt(interval)*level <= Math.sqrt(time)*value) { + level = value; + interval = time; + spend(time - cooldown() - 1); + } + } + + @Override + public float iconFadePercent() { + if (target instanceof Hero){ + float max = ((Hero) target).lvl; + return Math.max(0, (max-level)/max); + } + return 0; + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", level, dispTurns(visualcooldown())); + } + + private static final String LEVEL = "level"; + private static final String INTERVAL = "interval"; + + @Override + public void storeInBundle( Bundle bundle ) { + super.storeInBundle( bundle ); + bundle.put( INTERVAL, interval ); + bundle.put( LEVEL, level ); + } + + @Override + public void restoreFromBundle( Bundle bundle ) { + super.restoreFromBundle( bundle ); + interval = bundle.getInt( INTERVAL ); + level = bundle.getInt( LEVEL ); + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(0x990000); + } + + @Override + public int icon() { + return BuffIndicator.DEBUFF_DOWN; + } + + +} + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java index 5e9b03d3e..112043972 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Hero.java @@ -943,9 +943,12 @@ public class Hero extends Char { GLog.w(Messages.get(this, "heartdied")); getHeal.detach(belongings.backpack); } + //携带该物品时,玩家血量低于一半后自动隐身一段回合。 + //actMove实现 MIME.GOLD_TWO getFalseBody = Dungeon.hero.belongings.getItem(MIME.GOLD_TWO.class); if(getFalseBody != null && HT/5>HP){ + //给予一个看不见的隐形Buff,继承至Invisibility Buff.affect(this, InvisibilityRing.class, InvisibilityRing.DURATION); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index d1362a6ec..8130e2515 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -90,7 +90,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMys import com.shatteredpixel.shatteredpixeldungeon.items.spells.AquaBlast; import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion; -import com.shatteredpixel.shatteredpixeldungeon.items.spells.SummonElemental; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFlock; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast; @@ -102,7 +101,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfScale; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gauntlet; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LifeTreeSword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LockSword; @@ -165,11 +163,11 @@ public enum HeroClass { new LockSword().quantity(1).identify().collect(); new PotionOfInvisibility().quantity(45).identify().collect(); new PotionOfLevitation().quantity(100).identify().collect(); - new SDBSword().quantity(1).identify().collect(); + Buff.affect(hero, ChampionHero.AntiMagic.class, 50000f); new BloodthirstyThorn().quantity(1).identify().collect(); - new Gauntlet().quantity(1).identify().collect(); + new SDBSword().quantity(1).identify().collect(); new WashCrime().quantity(1).identify().collect(); new MagicTorch().quantity(1).identify().collect(); @@ -307,7 +305,7 @@ public enum HeroClass { stones.quantity(3).collect(); Dungeon.quickslot.setSlot(0, stones); - new SummonElemental().quantity(2).identify().collect(); + //new SummonElemental().quantity(1).identify().collect(); if (hero.belongings.armor != null){ hero.belongings.armor.affixSeal(new BrokenSeal()); } @@ -320,7 +318,7 @@ public enum HeroClass { MagesStaff staff; staff = new MagesStaff(new WandOfMagicMissile()); - new MIME.GOLD_FIVE().quantity(1).identify().collect(); + //new MIME.GOLD_FIVE().quantity(1).identify().collect(); (hero.belongings.weapon = staff).identify(); hero.belongings.weapon.activate(hero); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java index 77a30c92a..ee3401016 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Elemental.java @@ -34,8 +34,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Chill; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning; import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.HalomethaneFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame; @@ -49,6 +51,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ElementalSprite; import com.watabou.noosa.audio.Sample; +import com.watabou.noosa.particles.Emitter; import com.watabou.utils.Bundle; import com.watabou.utils.Random; @@ -405,6 +408,53 @@ public abstract class Elemental extends Mob { CursedWand.cursedEffect(null, this, enemy); } } + + public static class HaloWar extends Elemental { + + { + spriteClass = SFire.class; + loot = new ScrollOfTransmutation(); + lootChance = 1f; + } + + @Override + protected void rangedProc( Char enemy ) { + if (!level.water[enemy.pos]) { + Buff.affect( enemy, HalomethaneBurning.class ).reignite( enemy, 4f ); + } + if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5); + } + + @Override + protected void meleeProc( Char enemy, int damage ) { + if (Random.Int( 2 ) == 0 && !level.water[enemy.pos]) { + Buff.affect( enemy, HalomethaneBurning.class ).reignite( enemy ); + if (enemy.sprite.visible) Splash.at( enemy.sprite.center(), sprite.blood(), 5); + } + } + + public static class SFire extends ElementalSprite.Chaos { + + public SFire(){ + super(); + tint(0, 1, 1, 0.4f); + } + + @Override + protected Emitter createEmitter() { + Emitter emitter = emitter(); + emitter.pour( HalomethaneFlameParticle.FACTORY, 0.47f ); + return emitter; + } + + @Override + public void resetColor() { + super.resetColor(); + tint(0, 9, 9, 0.7f); + } + } + + } public static Class random(){ if (Random.Int( 50 ) == 0){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DiamondKnight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DiamondKnight.java index 3c1193679..358404d9d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DiamondKnight.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DiamondKnight.java @@ -28,15 +28,26 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Boss; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ColdMagicRat; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.items.Ankh; +import com.shatteredpixel.shatteredpixeldungeon.items.Gold; +import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SDBSword; import com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; @@ -46,7 +57,6 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DimandKingSprite; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; -import com.watabou.noosa.Camera; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; import com.watabou.utils.Random; @@ -60,6 +70,7 @@ public class DiamondKnight extends Boss { initStatus(80); EXP = 10; defenseSkill = 8; + flying=true; spriteClass = DimandKingSprite.class; @@ -74,8 +85,8 @@ public class DiamondKnight extends Boss { @Override public int damageRoll() { - int min = 1; - int max = (HP*2 <= HT) ? 12 : 8; + int min = 8; + int max = (HP*2 <= HT) ? 14 : 9; //模仿玩家的伤害 ColdChestBossLevel.State level = ((ColdChestBossLevel)Dungeon.level).pro(); @@ -102,10 +113,30 @@ public class DiamondKnight extends Boss { * @param effect 无敌效果 * @return true:无敌 */ -// @Override -// public boolean isInvulnerable(Class effect) { -// return this.HP==360; -// } + @Override + public boolean isInvulnerable(Class effect) { + return (this.HP>=301 && this.HP<=360) && effect != DiamondKnight.DiedDamager.class; + } + + public static class DiedDamager extends Buff { + + @Override + public boolean act() { + detach(); + spend( TICK ); + return true; + } + + @Override + public void detach() { + super.detach(); + for (Mob m : Dungeon.level.mobs.toArray(new Mob[0])){ + if (m instanceof DiamondKnight){ + m.damage(12, this); + } + } + } + } @Override public int defenseSkill(Char enemy) { @@ -114,11 +145,15 @@ public class DiamondKnight extends Boss { @Override public int drRoll() { - return Random.NormalIntRange(5,9); + return Random.NormalIntRange(4,8); } @Override public boolean act() { + if(this.HP <= 300 && phase == 1) { + GLog.n(Messages.get(DiamondKnight.class, "war_go")); + phase++; + } return super.act(); } @@ -129,7 +164,7 @@ public class DiamondKnight extends Boss { */ @Override protected boolean canAttack( Char enemy ) { - if (pumpedUp > 0){ + if ( Dungeon.level.distance(enemy.pos, pos) >= 2){ //we check both from and to in this case as projectile logic isn't always symmetrical. //this helps trim out BS edge-cases return Dungeon.level.distance(enemy.pos, pos) <= 2 @@ -140,28 +175,28 @@ public class DiamondKnight extends Boss { } } + private int combo = 0; @Override public int attackProc( Char enemy, int damage ) { damage = super.attackProc( enemy, damage ); -// if (Random.Int( 3 ) == 0) { -// Buff.affect( enemy, Ooze.class ).set( Ooze.DURATION ); -// enemy.sprite.burst( 0x000000, 5 ); -// } + //The gnoll's attacks get more severe the more the player lets it hit them + combo++; + int effect = Random.Int(4)+combo; - if (pumpedUp > 0) { - Camera.main.shake( 3, 0.2f ); + if (effect > 2) { + + if (effect >=6 && enemy.buff(Burning.class) == null){ + + if (Dungeon.level.flamable[enemy.pos]) + GameScene.add(Blob.seed(enemy.pos, 4, Fire.class)); + Buff.affect(enemy, Burning.class).reignite( enemy ); + + } else + Buff.affect( enemy, Poison.class).set((effect-2) ); } - return damage; } - @Override - public boolean attack( Char enemy, float dmgMulti, float dmgBonus, float accMulti ) { - boolean result = super.attack( enemy, dmgMulti, dmgBonus, accMulti ); - pumpedUp = 0; - return result; - } - @Override protected boolean getCloser( int target ) { @@ -172,7 +207,10 @@ public class DiamondKnight extends Boss { return super.getCloser( target ); } - + /** + * @param dmg 伤害 + * @param src 伤害来源 + */ @Override public void damage(int dmg, Object src) { if (!BossHealthBar.isAssigned()){ @@ -193,11 +231,11 @@ public class DiamondKnight extends Boss { ((ColdChestBossLevel)Dungeon.level).progress(); phase++; //血量低于300加载第三场景 - } else if(level == ColdChestBossLevel.State.MAZE_START && this.HP <= 300 && phase == 1) { - GLog.n(Messages.get(DiamondKnight.class,"war_go")); - GameScene.flash(0x808080); - ((ColdChestBossLevel)Dungeon.level).progress(); - phase++; +// } else if(level == ColdChestBossLevel.State.MAZE_START && this.HP <= 300 && phase == 1) { +// GLog.n(Messages.get(DiamondKnight.class,"war_go")); +// GameScene.flash(0x808080); +// ((ColdChestBossLevel)Dungeon.level).progress(); +// phase++; } else if (level == ColdChestBossLevel.State.VSBOSS_START && this.HP <= 240 && phase == 2) { ((ColdChestBossLevel)Dungeon.level).progress(); phase++; @@ -233,8 +271,34 @@ public class DiamondKnight extends Boss { Dungeon.level.unseal(); + Dungeon.level.drop( new TengusMask(), pos ).sprite.drop(); + int dropPos = this.pos; + + Dungeon.level.drop(new ScrollOfRecharging().quantity(2), dropPos).sprite.drop(pos); + + Ankh ankh = new Ankh(); + ankh.bless(); + + Dungeon.level.drop(new Ankh(), dropPos).sprite.drop(pos); + + Dungeon.level.drop(new Gold().quantity(Random.Int(400,900)), pos).sprite.drop(); + + Badges.KILL_SMK(); + + if(Statistics.dimandchestmazeCollected>=3){ + Badges.KILL_OMP(); + } + phase++; + if (!Badges.isUnlocked(Badges.Badge.KILL_SM)){ + Dungeon.level.drop( new SDBSword(), pos ).sprite.drop(); + } else if (Random.Float()<0.43f) { + Dungeon.level.drop( new SDBSword(), pos ).sprite.drop(); + } else { + Dungeon.level.drop( new PotionOfExperience(), pos ).sprite.drop(); + } + GameScene.bossSlain(); //入口 @@ -267,12 +331,15 @@ public class DiamondKnight extends Boss { private final String PUMPEDUP = "pumpedup"; private final String HEALINC = "healinc"; private static final String PHASE ="dimandphase"; + + private static final String COMBO = "combo"; @Override public void storeInBundle( Bundle bundle ) { super.storeInBundle( bundle ); phase = bundle.getInt(PHASE); bundle.put( PUMPEDUP , pumpedUp ); bundle.put( HEALINC, healInc ); + bundle.put(COMBO, combo); if(phase == 5) { spriteClass=DimandKingSprite.PrismaticSprite.class; @@ -299,25 +366,21 @@ public class DiamondKnight extends Boss { spriteClass=DimandKingSprite.class; } + combo = bundle.getInt( COMBO ); + } private void zap() { spend( TIME_TO_ZAP ); if (hit( this, enemy, true )) { - //TODO would be nice for this to work on ghost/statues too - if (enemy == hero && Random.Int( 2 ) == 0) { - Buff.prolong( enemy, Blindness.class, Degrade.DURATION ); - Sample.INSTANCE.play( Assets.Sounds.DEBUFF ); - } - - int dmg = Random.NormalIntRange( 10, 12 ); + int dmg = Random.NormalIntRange( 20, 30 ); enemy.damage( dmg, new ColdMagicRat.DarkBolt() ); - - if (enemy == hero && !enemy.isAlive()) { - Dungeon.fail( getClass() ); - GLog.n( Messages.get(this, "frost_kill") ); + if(Random.Float()<0.45f){ + Buff.affect( enemy, Bleeding.class ).set( 9 ); + Sample.INSTANCE.play( Assets.Sounds.CURSED ); } + Sample.INSTANCE.play( Assets.Sounds.ZAP ); } else { enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/TPDoor.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/TPDoor.java new file mode 100644 index 000000000..40b28c235 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/TPDoor.java @@ -0,0 +1,60 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.RedTrap; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.TPDoorSprites; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; + +public class TPDoor extends Mob { + + { + spriteClass = TPDoorSprites.class; + + HP = HT = 100; + + properties.add(Property.MINIBOSS); + properties.add(Property.INORGANIC); + properties.add(Property.ELECTRIC); + properties.add(Property.IMMOVABLE); + + state = PASSIVE; + + baseSpeed =0; + } + + @Override + public void damage(int dmg, Object src) { + if (dmg >= 20){ + //20 + dmg = 20; + if (hero.buff(DiamondKnight.DiedDamager.class) == null) { + Buff.affect(this, DiamondKnight.DiedDamager.class); + RedTrap run = new RedTrap(); + run.pos = super.pos; + run.activate(); + } + } else { + dmg = 0; + GLog.n(Messages.get(this,"lowdamage")); + } + super.damage(dmg, src); + } + + @Override + public void die( Object cause ) { + + super.die(cause); + GameScene.flash(0x808080); + ((ColdChestBossLevel) Dungeon.level).progress(); + + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/LanFire.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/LanFire.java index 7aa1b7ce4..1ff470835 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/LanFire.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/LanFire.java @@ -6,6 +6,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.IceHealHP; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.InvisibilityRing; import com.shatteredpixel.shatteredpixeldungeon.sprites.LanFireSprites; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -32,15 +33,17 @@ public class LanFire extends NPC { @Override protected boolean act() { - if (!seenBefore && Dungeon.level.heroFOV[pos]) { + if (!seenBefore && Dungeon.level.heroFOV[pos] && Dungeon.level.distance(pos, hero.pos) <= 3) { seenBefore = true; Buff.affect(hero, IceHealHP.class).set( (100), 1 ); + Buff.affect(this, InvisibilityRing.class, 1000f); GLog.p("篝火的温暖照亮每一个在寒冷中徒步的冒险者,在寒冷而又凛冽的地牢中,这里是唯一的休息站。"); spend(TICK); return true; } else if(seenBefore && !Dungeon.level.heroFOV[pos]) { seenBefore = false; Buff.detach( hero, IceHealHP.class ); + Buff.detach( hero, InvisibilityRing.class); GLog.n("离开温暖的篝火休息站,前方迎面而来的又是凛冽的寒风。"); return true; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Constants.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Constants.java index 1c461cc54..6877fa834 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Constants.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Constants.java @@ -6,6 +6,7 @@ public class Constants { public static final int MAX_DEPTH = 26; public static final int MAX_QUICKSLOTS = 12; + public static final int MOX_QUICKSLOTS = 8; public static final int MIN_QUICKSLOTS = 3; public static boolean gameIsAndroid(){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index f3eb04ee5..530e1ff54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -399,7 +399,7 @@ public class Generator { Greatshield.class }; - WEP_T5.probs = new float[]{ 6, 5, 5, 4, 4, 4}; + WEP_T5.probs = new float[]{ 1, 3, 2, 3, 2, 3}; WEP_T6.classes = new Class[]{ IceFishSword.class, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java new file mode 100644 index 000000000..121f35d2b --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java @@ -0,0 +1,29 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.items.books.Books; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.audio.Sample; + +public class DimandBook extends Books { + private static final String Read = "Read"; + { + image = ItemSpriteSheet.SOYBOOKS; + unique = true; + } + + @Override + public void execute(final Hero hero, String action) { + super.execute(hero, action); + if (action.equals( Read )) { + Sample.INSTANCE.play( Assets.Sounds.READ ); + detach( hero.belongings.backpack ); + GLog.n("你已接受来自未知敌人的挑战……,祝你好运!"); + Statistics.mimicking = true; + } + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java index 727bba251..194bafb54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java @@ -21,13 +21,18 @@ package com.shatteredpixel.shatteredpixeldungeon.items.quest; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.watabou.utils.Bundle; import com.watabou.utils.Random; @SuppressWarnings("all") public class MIME extends Item { + public boolean isMimeSupported = false; + { image = ItemSpriteSheet.DG21; } @@ -96,4 +101,28 @@ public class MIME extends Item { } } + public boolean doPickUp(Hero hero, int pos) { + if (super.doPickUp(hero, pos)) { + if(!isMimeSupported){ + Statistics.dimandchestmazeCollected++; + isMimeSupported = true; + } + return true; + } else { + return false; + } + } + + private static final String COMBO = "combox"; + @Override + public void storeInBundle( Bundle bundle ) { + super.storeInBundle(bundle); + isMimeSupported = bundle.getBoolean(COMBO); + } + + public void restoreInBundle( Bundle bundle ) { + super.storeInBundle(bundle); + isMimeSupported = bundle.getBoolean(COMBO); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/SummonElemental.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/SummonElemental.java index 559cf1733..ea9839633 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/SummonElemental.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/spells/SummonElemental.java @@ -28,15 +28,18 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.SpiritHawk; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Elemental; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.HalomethaneFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.RainbowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShaftParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlameX; import com.shatteredpixel.shatteredpixeldungeon.items.quest.Embers; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; @@ -115,7 +118,11 @@ public class SummonElemental extends Spell { summonClass = Elemental.AllyNewBornElemental.class; - detach(Dungeon.hero.belongings.backpack); + + if(Dungeon.hero.heroClass != HeroClass.WARRIOR){ + detach(Dungeon.hero.belongings.backpack); + } + } else { GLog.w(Messages.get(SpiritHawk.class, "no_space")); @@ -129,6 +136,7 @@ public class SummonElemental extends Spell { if (summonClass == Elemental.FrostElemental.class) return new ItemSprite.Glowing(0x8EE3FF); if (summonClass == Elemental.ShockElemental.class) return new ItemSprite.Glowing(0xFFFF85); if (summonClass == Elemental.ChaosElemental.class) return new ItemSprite.Glowing(0xE3E3E3, 0.5f); + if (summonClass == Elemental.HaloWar.class) return new ItemSprite.Glowing(0x00ffff, 0.5f); return super.glowing(); } @@ -143,6 +151,7 @@ public class SummonElemental extends Spell { if (summonClass == Elemental.FrostElemental.class) desc += Messages.get(this, "desc_frost"); if (summonClass == Elemental.ShockElemental.class) desc += Messages.get(this, "desc_shock"); if (summonClass == Elemental.ChaosElemental.class) desc += Messages.get(this, "desc_chaos"); + if (summonClass == Elemental.HaloWar.class) desc += Messages.get(this, "desc_halos"); return desc; } @@ -172,7 +181,7 @@ public class SummonElemental extends Spell { return item.isIdentified() && (item instanceof PotionOfLiquidFlame || item instanceof PotionOfFrost || item instanceof ScrollOfRecharging - || item instanceof ScrollOfTransmutation); + || item instanceof ScrollOfTransmutation || item instanceof PotionOfLiquidFlameX); } @Override @@ -202,6 +211,10 @@ public class SummonElemental extends Spell { Sample.INSTANCE.play(Assets.Sounds.READ); curUser.sprite.emitter().burst( RainbowParticle.BURST, 12 ); summonClass = Elemental.ChaosElemental.class; + } else if (item instanceof PotionOfLiquidFlameX){ + Sample.INSTANCE.play(Assets.Sounds.READ); + curUser.sprite.emitter().burst( HalomethaneFlameParticle.FACTORY, 12 ); + summonClass = Elemental.HaloWar.class; } curUser.sprite.operate(curUser.pos); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAnmy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAnmy.java new file mode 100644 index 000000000..03f872647 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAnmy.java @@ -0,0 +1,166 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.wands; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.MagicalFireRoom; +import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Image; +import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Callback; +import com.watabou.utils.PointF; +import com.watabou.utils.Random; + +public class WandOfAnmy extends DamageWand { + + public static class AllyToRestart extends AllyBuff { + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc"); + } + + @Override + public void fx(boolean on) { + if (on) { + target.sprite.add(CharSprite.State.SHIELDED); + Statistics.TryUsedAnmy = true; + } + else + target.sprite.remove(CharSprite.State.SHIELDED); + } + + @Override + public void tintIcon(Image icon) { + icon.hardlight(0x66bbcc); + } + + public int icon() { + return BuffIndicator.HEX; + } + + } + + @Override + protected int initialCharges() { + return 1; + } + + @Override + public void updateLevel() { + maxCharges = 1; + curCharges = Math.min( curCharges, maxCharges ); + } + + { + image = ItemSpriteSheet.WAND_KCX; + } + + + public int min(int lvl){ + return 2+lvl; + } + + public int max(int lvl){ + return 8+5*lvl; + } + + @Override + public void onZap(Ballistica bolt) { + + Heap heap = Dungeon.level.heaps.get(bolt.collisionPos); + if (heap != null) { + heap.freeze(); + } + + Fire fire = (Fire) Dungeon.level.blobs.get(Fire.class); + if (fire != null && fire.volume > 0) { + fire.clear( bolt.collisionPos ); + } + + MagicalFireRoom.EternalFire eternalFire = (MagicalFireRoom.EternalFire)Dungeon.level.blobs.get(MagicalFireRoom.EternalFire.class); + if (eternalFire != null && eternalFire.volume > 0) { + eternalFire.clear( bolt.collisionPos ); + //bolt ends 1 tile short of fire, so check next tile too + if (bolt.path.size() > bolt.dist+1){ + eternalFire.clear( bolt.path.get(bolt.dist+1) ); + } + + } + + Char ch = Actor.findChar(bolt.collisionPos); + if (ch != null){ + + int damage = 0; + + wandProc(ch, chargesPerCast()); + ch.damage(damage, this); + Sample.INSTANCE.play( Assets.Sounds.HIT_MAGIC, 1, 1.1f * Random.Float(0.87f, 1.15f) ); + + if (ch.isAlive() && !Statistics.TryUsedAnmy && (!ch.properties().contains(Char.Property.BOSS) || !ch.properties().contains(Char.Property.MINIBOSS))){ + Buff.affect(ch, AllyToRestart.class); + } else { + GLog.n("不能影响Boss和精英怪,也不能在使用后继续在本层使用,每层仅限一次使用。"); + } + } else { + Dungeon.level.pressCell(bolt.collisionPos); + } + } + + @Override + public void fx(Ballistica bolt, Callback callback) { + MagicMissile.boltFromChar(curUser.sprite.parent, + MagicMissile.FROST, + curUser.sprite, + bolt.collisionPos, + callback); + Sample.INSTANCE.play(Assets.Sounds.ZAP); + } + + @Override + public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) { + // + } + + @Override + public void staffFx(MagesStaff.StaffParticle particle) { + particle.color(0x88CCFF); + particle.am = 0.6f; + particle.setLifespan(2f); + float angle = Random.Float(PointF.PI2); + particle.speed.polar( angle, 2f); + particle.acc.set( 0f, 1f); + particle.setSize( 0f, 1.5f); + particle.radiateXY(Random.Float(1f)); + } + + @Override + public boolean isUpgradable() { + return false; + } + + @Override + public boolean isIdentified() { + return true; + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BloodthirstyThorn.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BloodthirstyThorn.java index 37e01bdcf..09f2192d0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BloodthirstyThorn.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/BloodthirstyThorn.java @@ -171,7 +171,7 @@ public class BloodthirstyThorn extends MeleeWeapon { /** * @param message 消息弹框控件 */ - public static void message(String message) { + public void message(String message) { Game.runOnRenderThread(() -> ShatteredPixelDungeon.scene().add(new WndMessage(message))); } @@ -201,7 +201,6 @@ public class BloodthirstyThorn extends MeleeWeapon { chaliceOfBlood1.cursed = true; chaliceOfBlood1.level=Random.NormalIntRange(1,3); chaliceOfBlood1.identify().quantity(1).collect(); - message(Messages.get(BloodthirstyThorn.class,"good")); } return sampleOutput(null); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/LockSword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/LockSword.java index f9fe244c6..9b55c8a98 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/LockSword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/LockSword.java @@ -37,14 +37,14 @@ public class LockSword extends MeleeWeapon { @Override public int max(int lvl) { - return Math.round(1.9f*(tier+1)) + + return Math.round(1.7f*(tier+1)) + lvl*Math.round(1.5f*(tier+1)); } @Override public int min(int lvl) { - return Math.round(1.5f*(tier+1)) + + return Math.round(1.4f*(tier+1)) + lvl*Math.round(0.5f*(tier+1)); } @@ -76,13 +76,13 @@ public class LockSword extends MeleeWeapon { lvl += 1; } else if (defender.properties().contains(Char.Property.BOSS) && defender.HP <= damage && lvl <= 1000) { //目标Boss血量小于实际伤害判定为死亡,+100 - lvl += 100; + lvl += 50; } else if (defender.properties().contains(Char.Property.MINIBOSS) && defender.HP <= damage && lvl <= 1000) { //目标迷你Boss血量小于实际伤害判定为死亡,+30 - lvl += 50; + lvl += 20; } else if (defender.HP <= damage && lvl <= 1000) { //目标血量小于实际伤害判定为死亡,+15 - lvl += 15; + lvl += 10; } if (lvl>= 900) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagicTorch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagicTorch.java index c1129fbd6..3db7fa2d9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagicTorch.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/MagicTorch.java @@ -69,22 +69,18 @@ public class MagicTorch extends MeleeWeapon { super.execute(hero, action); //当英雄使用魔法火把时,给英雄添加一个光环buff,光环buff会对周围的敌人造成伤害, // 伤害值为英雄的魔法火把的最大伤害值,持续时间为5回合,每回合造成一次伤害,伤害值为英雄的魔法火把的最大伤害值,光环buff的名称为“光环” - if (action.equals(AC_EQUIP)) { - //In addition to equipping itself, item reassigns itself to the quickslot - //This is a special case as the item is being removed from inventory, but is staying with the hero. - int slot = Dungeon.quickslot.getSlot(this); - doEquip(hero); - if (slot != -1) { - Dungeon.quickslot.setSlot(slot, this); - updateQuickslot(); - } - Buff.affect(hero, MagicLight.class).set( (100), 1 ); - } else if (action.equals(AC_UNEQUIP)) { - doUnequip(hero, true); - Buff.detach(hero, MagicLight.class); - } else if (action.equals(AC_THROW)) { - super.doThrow(hero); - Buff.detach(hero, MagicLight.class); + switch (action) { + case AC_EQUIP: + Buff.affect(hero, MagicLight.class).set((100), 1); + break; + case AC_UNEQUIP: + doUnequip(hero, true); + Buff.detach(hero, MagicLight.class); + break; + case AC_THROW: + super.doThrow(hero); + Buff.detach(hero, MagicLight.class); + break; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java index 450c6d73e..d23dccb6f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/WornShortsword.java @@ -22,6 +22,10 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Golem; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class WornShortsword extends MeleeWeapon { @@ -36,4 +40,31 @@ public class WornShortsword extends MeleeWeapon { bones = false; } + /** + * 这个方法是用来计算武器的最大伤害的 + * @param attacker 玩家 + * @param defender 怪物 + * @param damage 伤害 + * @return 返回玩家,怪物,伤害 + */ + @Override + public int proc(Char attacker, Char defender, int damage ) { + //为什么下面需要for循环? + //因为有可能有多个怪物,所以需要循环 + for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) { + /** 为什么这里检查if? + * 因为有可能是怪物,但是不是Golem,所以需要检查 + * 当是魔像的时候,返回的伤害还会追加5上去 + * 如果希望最大值能给予5,你也可以使用Math.max(damage, 5); + **/ + if(mob instanceof Golem) { + damage+=5; + } + } + return super.proc(attacker, defender, damage); + } + + + + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java index 562b87c06..fff4582f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java @@ -11,13 +11,21 @@ import static com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses.DCrystal; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses.DiamondKnight; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses.TPDoor; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.watabou.utils.Bundle; +import com.watabou.utils.PathFinder; +import com.watabou.utils.Random; import java.util.HashMap; @@ -57,11 +65,22 @@ public class ColdChestBossLevel extends Level { private static final int WIDTH = 35; private final int HEIGHT = 35; + @Override + public int randomRespawnCell( Char ch ) { + int pos = WIDTH + 16; //random cell adjacent to the entrance. + int cell; + do { + cell = pos + PathFinder.NEIGHBOURS8[Random.Int(8)]; + } while (!passable[cell] + || (Char.hasProp(ch, Char.Property.LARGE) && !openSpace[cell]) + || Actor.findChar(cell) != null); + return cell; + } + @Override protected boolean build() { setSize(WIDTH,HEIGHT); - this.entrance = 0; - this.exit = 0; + //首次构建地图 pro = GO_START; setMapStart(); @@ -69,6 +88,7 @@ public class ColdChestBossLevel extends Level { return true; } private static final short W = Terrain.WALL; + private static final short M = Terrain.WELL; private static final short E = Terrain.CHASM; private static final short X = Terrain.EXIT; @@ -92,7 +112,7 @@ public class ColdChestBossLevel extends Level { W,E,E,E,O,O,O,O,O,E,E,E,E,E,E,E,W,P,W,E,E,E,E,E,E,E,O,O,O,O,O,E,E,E,W, W,E,E,E,P,P,P,P,P,E,E,E,E,E,E,E,W,P,W,E,E,E,E,E,E,E,P,P,P,P,P,E,E,E,W, W,E,E,E,P,E,E,E,P,E,E,E,E,E,E,E,W,K,W,E,E,E,E,E,E,E,P,E,E,E,P,E,E,E,W, - W,E,P,E,P,E,P,E,P,E,P,E,P,E,P,E,W,P,W,E,P,E,P,E,P,E,P,E,P,E,P,E,P,E,W, + W,E,P,E,P,E,M,E,P,E,P,E,P,E,P,E,W,P,W,E,P,E,P,E,P,E,P,E,M,E,P,E,P,E,W, W,E,E,E,P,E,E,E,P,E,E,E,E,E,E,E,W,P,W,E,E,E,E,E,E,E,P,E,E,E,P,E,E,E,W, W,E,E,E,P,P,P,P,P,E,E,E,E,E,E,E,W,P,W,E,E,E,E,E,E,E,P,P,P,P,P,E,E,E,W, W,E,E,E,E,E,P,E,E,E,E,E,E,E,E,E,W,K,W,E,E,E,E,E,E,E,E,E,P,E,E,E,E,E,W, @@ -127,7 +147,7 @@ public class ColdChestBossLevel extends Level { private static final int[] MazeRoom = { W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W, - W,J,L,L,L,L,W,L,W,L,W,W,W,W,W,L,L,L,W,W,W,W,W,W,L,L,L,L,W,L,W,W,W,L,W, + W,L,L,L,L,L,W,L,W,L,W,W,W,W,W,L,L,L,W,W,W,W,W,W,L,L,L,L,W,L,W,W,W,L,W, W,W,W,W,W,L,W,L,W,L,W,W,W,W,W,L,W,W,W,W,W,W,W,W,L,W,L,L,W,L,W,W,W,L,W, W,W,W,B,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,L,L,L,W,L,L,W,L,W,W,W,L,W, W,W,W,L,W,W,W,L,W,W,W,L,W,L,L,L,L,L,W,L,L,L,L,W,W,W,L,L,L,L,L,L,W,L,W, @@ -154,31 +174,31 @@ public class ColdChestBossLevel extends Level { W,W,W,L,L,L,L,L,W,L,L,L,L,L,W,L,L,W,L,L,L,W,L,L,L,L,W,L,W,W,W,W,W,W,W, W,W,W,L,W,L,W,W,W,L,L,L,W,L,W,L,L,W,W,W,L,W,W,W,W,W,W,L,W,L,L,L,L,L,W, W,W,W,L,W,L,L,L,W,L,L,L,W,L,W,L,L,W,L,L,L,L,L,L,L,L,W,L,L,L,W,W,W,L,W, - W,W,W,L,W,L,L,W,W,L,W,L,W,L,L,L,L,W,L,W,W,W,L,W,L,L,W,L,W,L,W,L,W,L,W, + W,W,W,L,W,L,L,W,W,L,W,L,W,L,L,L,L,W,L,W,W,W,L,W,L,L,W,L,W,L,W,E,W,L,W, W,W,W,W,W,L,L,W,W,L,W,L,W,L,W,W,W,W,L,L,W,L,L,W,L,L,L,L,W,L,W,W,W,L,W, W,W,W,L,L,L,W,W,W,L,W,L,W,L,L,W,L,L,L,L,L,L,L,W,L,L,L,L,W,L,L,L,L,L,W, W,W,W,L,W,L,L,L,W,L,W,L,W,L,L,W,L,W,W,W,W,W,L,W,W,W,W,W,W,W,W,W,W,W,W, W,W,W,L,W,L,W,L,W,W,W,W,W,L,W,W,T,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,W, - W,B,L,L,W,L,W,L,L,L,L,L,L,L,L,W,W,W,W,W,W,L,W,L,L,L,W,L,L,L,W,L,T,X,W, + W,B,L,L,W,L,W,L,L,L,L,L,L,L,L,W,W,W,W,W,W,L,W,L,L,L,W,L,L,L,W,L,T,L,W, W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W, }; private static final int[] EndMap = { W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W, W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,B,B,B,B,B,B,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,K,K,K,K,K,B,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,K,B,B,B,K,B,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,B,B,T,B,B,B,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,K,B,B,B,K,B,E,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,K,K,K,K,K,B,E,E,W,W,W,K,O,K,W,W,W,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,B,B,B,B,B,B,B,E,E,W,S,K,K,K,K,K,S,W,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,B,E,E,E,E,E,W,K,O,K,O,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,B,E,W,W,W,W,W,K,O,K,O,K,O,K,W,W,W,W,W,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,B,E,W,S,K,K,K,K,O,K,O,K,O,K,K,K,K,S,W,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,B,E,W,K,O,O,O,O,O,K,O,K,O,O,O,O,O,K,W,E,E,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,B,E,W,K,O,K,S,K,K,K,T,K,K,K,S,K,O,K,W,E,E,E,E,E,E,E,E,W, + W,E,E,W,W,W,W,W,W,W,W,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,B,B,B,B,B,B,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,K,K,K,K,K,B,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,K,B,B,B,K,B,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,B,B,T,B,B,B,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,K,B,B,B,K,B,W,E,E,E,W,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,K,K,K,K,K,B,W,E,W,W,W,K,O,K,W,W,W,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,B,B,B,B,B,B,B,W,E,W,S,K,K,K,K,K,S,W,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,W,W,W,W,B,W,W,W,W,E,W,K,O,K,O,K,O,K,W,E,E,E,E,E,E,E,E,E,E,E,E,W, + W,E,E,E,E,E,W,B,W,W,W,W,W,W,K,O,K,O,K,O,K,W,W,W,W,W,E,E,E,E,E,E,E,E,W, + W,E,E,E,E,E,W,B,W,W,S,K,K,K,K,O,K,O,K,O,K,K,K,K,S,W,E,E,E,E,E,E,E,E,W, + W,E,E,E,E,E,W,B,W,W,K,O,O,O,O,O,K,O,K,O,O,O,O,O,K,W,E,E,E,E,E,E,E,E,W, + W,E,E,E,E,E,W,B,W,W,K,O,K,S,K,K,K,T,K,K,K,S,K,O,K,W,E,E,E,E,E,E,E,E,W, W,W,W,W,W,W,W,D,W,W,K,K,K,K,B,B,B,B,B,B,B,K,K,K,K,W,W,W,W,W,W,W,W,W,W, W,K,K,K,K,K,K,K,K,S,K,K,K,K,B,K,K,K,K,K,B,K,K,K,K,S,K,K,K,K,K,K,K,K,W, W,O,O,O,K,K,O,K,O,K,O,K,O,K,B,K,B,B,B,K,B,K,O,O,O,K,K,K,K,K,K,O,O,O,W, @@ -186,11 +206,11 @@ public class ColdChestBossLevel extends Level { W,O,O,O,K,K,K,K,K,K,O,O,O,K,B,K,B,B,B,K,B,K,O,K,O,K,O,K,O,K,K,O,O,O,W, W,K,K,K,K,K,K,K,K,S,K,K,K,K,B,K,K,K,K,K,B,K,K,K,K,S,K,K,K,K,K,K,K,K,W, W,W,W,W,W,W,W,W,W,W,K,O,K,K,B,B,B,B,B,B,B,K,K,K,K,W,W,D,W,W,W,W,W,W,W, - W,E,E,E,E,E,E,E,E,W,K,O,K,S,K,K,K,T,K,K,K,S,K,O,K,W,E,B,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,E,E,W,K,O,O,O,O,O,K,O,K,O,O,O,O,O,K,W,E,B,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,E,E,W,S,K,K,K,K,O,K,O,K,O,K,K,K,K,S,W,E,B,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,E,E,W,W,W,W,W,K,O,K,O,K,O,K,W,W,W,W,W,E,B,E,E,E,E,E,E,W, - W,E,E,E,E,E,E,E,E,E,E,E,E,W,K,O,K,O,K,O,K,W,E,E,E,E,E,B,E,E,E,E,E,E,W, + W,E,E,E,E,E,E,E,E,W,K,O,K,S,K,K,K,T,K,K,K,S,K,O,K,W,W,B,W,E,E,E,E,E,W, + W,E,E,E,E,E,E,E,E,W,K,O,O,O,O,O,K,O,K,O,O,O,O,O,K,W,W,B,W,E,E,E,E,E,W, + W,E,E,E,E,E,E,E,E,W,S,K,K,K,K,O,K,O,K,O,K,K,K,K,S,W,W,B,W,E,E,E,E,E,W, + W,E,E,E,E,E,E,E,E,W,W,W,W,W,K,O,K,O,K,O,K,W,W,W,W,W,W,B,W,E,E,E,E,E,W, + W,E,E,E,E,E,E,E,E,E,E,E,E,W,K,O,K,O,K,O,K,W,E,E,E,E,W,B,W,E,E,E,E,E,W, W,E,E,E,E,E,E,E,E,E,E,E,E,W,S,K,K,K,K,K,S,W,E,E,E,W,W,D,W,W,E,E,E,E,W, W,E,E,E,E,E,E,E,E,E,E,E,E,W,W,W,K,O,K,W,W,W,E,E,E,W,K,K,K,W,E,E,E,E,W, W,E,E,E,E,E,E,E,E,E,E,E,E,E,E,W,K,O,K,W,E,E,E,E,E,W,K,T,K,W,E,E,E,E,W, @@ -207,6 +227,12 @@ public class ColdChestBossLevel extends Level { map = WorldRoomShort.clone(); } + + public void setMapEnd(){ + this.entrance = 52; + this.exit = 647; + } + private static final HashMap MAIN_PORTAL = new HashMap<>(5); { MAIN_PORTAL.put(32 + WIDTH * 33, WIDTH*3 + 3); @@ -225,6 +251,24 @@ public class ColdChestBossLevel extends Level { IF_MAIN_PORTAL.put(241, 474); } + private static final HashMap S_MAIN_PORTAL = new HashMap<>(5); + { + S_MAIN_PORTAL.put(844, 111); + S_MAIN_PORTAL.put(869, 133); + + S_MAIN_PORTAL.put(181, 682); + S_MAIN_PORTAL.put(203, 682); + } + + private static final HashMap IF_S_MAIN_PORTAL = new HashMap<>(5); + { + IF_S_MAIN_PORTAL.put(844, 111); + IF_S_MAIN_PORTAL.put(869, 133); + + IF_S_MAIN_PORTAL.put(181, 682); + IF_S_MAIN_PORTAL.put(203, 682); + } + @Override public void occupyCell(Char ch) { super.occupyCell(ch); @@ -234,15 +278,32 @@ public class ColdChestBossLevel extends Level { if(ch == hero){ //指定区域 + + + + if(S_MAIN_PORTAL.containsKey(ch.pos) && pro == START) { + ScrollOfTeleportation.appear(ch, IF_S_MAIN_PORTAL.get(ch.pos)); + //传送目标区域 第一场景 + hero.interrupt(); + Dungeon.observe(); + GameScene.updateFog(); + if(ch.pos==682){ + Buff.detach(hero, Levitation.class); + } else if(ch.pos==111||ch.pos==133) { + Buff.affect( hero, Levitation.class, Levitation.DURATION*20 ); + } + } + if(MAIN_PORTAL.containsKey(ch.pos) && pro == MAZE_START) { ScrollOfTeleportation.appear(ch, IF_MAIN_PORTAL.get(ch.pos)); - //传送目标区域 + //传送目标区域 第二场景 hero.interrupt(); Dungeon.observe(); GameScene.updateFog(); } + } - //GLog.n(String.valueOf(hero.pos)); + //GLog.n(String.valueOf(Statistics.dimandchestmazeCollected)); } @@ -262,6 +323,23 @@ public class ColdChestBossLevel extends Level { set( 1102, Terrain.EMPTY ); GameScene.updateMap( 1102 ); Dungeon.observe(); + + //进行Roll判定 + switch(Random.NormalIntRange(0,3)){ + case 0: + drop( new MIME.GOLD_ONE(),634 ); + break; + case 1: + drop( new MIME.GOLD_ONE(),660 ); + break; + case 2: + drop( new MIME.GOLD_ONE(),308 ); + break; + case 3: + drop( new MIME.GOLD_ONE(),286 ); + break; + } + pro = START; break; case START: @@ -277,6 +355,95 @@ public class ColdChestBossLevel extends Level { //玩家移动到初始位 ScrollOfTeleportation.appear(hero, STARTPOS); boss.HP = 360; + + //进行Roll判定 获得一定的随机坐标 + if(Random.Float()<0.5f) { + switch(Random.NormalIntRange(0,4)){ + case 0: + drop( new MIME.GOLD_TWO(),570 ); + break; + case 1: + drop( new MIME.GOLD_TWO(),472 ); + break; + case 2: + drop( new MIME.GOLD_TWO(),1041 ); + break; + case 3: + drop( new MIME.GOLD_TWO(),52 ); + break; + case 4: + drop( new MIME.GOLD_TWO(),1096 ); + break; + } + } else { + switch(Random.NormalIntRange(0,4)){ + case 0: + drop( new MIME.GOLD_THREE(),570 ); + break; + case 1: + drop( new MIME.GOLD_THREE(),472 ); + break; + case 2: + drop( new MIME.GOLD_THREE(),1041 ); + break; + case 3: + drop( new MIME.GOLD_THREE(),52 ); + break; + case 4: + drop( new MIME.GOLD_THREE(),1096 ); + break; + } + } + + switch (Random.NormalIntRange(0,8)){ + case 0: + TPDoor ds0 = new TPDoor(); + ds0.pos = 613; + GameScene.add(ds0); + break; + case 1: + TPDoor ds1 = new TPDoor(); + ds1.pos = 888; + GameScene.add(ds1); + break; + case 2: + TPDoor ds2 = new TPDoor(); + ds2.pos = 1088; + GameScene.add(ds2); + break; + case 3: + TPDoor ds3 = new TPDoor(); + ds3.pos = 732; + GameScene.add(ds3); + break; + case 4: + TPDoor ds4 = new TPDoor(); + ds4.pos = 297; + GameScene.add(ds4); + break; + case 5: + TPDoor ds5 = new TPDoor(); + ds5.pos = 206; + GameScene.add(ds5); + break; + case 6: + TPDoor ds6 = new TPDoor(); + ds6.pos = 255; + GameScene.add(ds6); + break; + case 7: + TPDoor ds7 = new TPDoor(); + ds7.pos = 1186; + GameScene.add(ds7); + break; + case 8: + TPDoor ds8 = new TPDoor(); + ds8.pos = 820; + GameScene.add(ds8); + break; + } + + pro = MAZE_START; } } @@ -290,11 +457,33 @@ public class ColdChestBossLevel extends Level { if (pro == MAZE_START && boss.HP <= 300) { //动态修改整个房间 宝藏迷宫 changeMap(EndMap); + Buff.affect(boss, ChampionEnemy.Halo.class); ScrollOfTeleportation.appear(boss,647); //玩家移动到初始位 ScrollOfTeleportation.appear(hero, 962); //drop( new PotionOfPurity(),648 ); + //进行Roll判定 + if(Random.Float()<0.5f) { + switch(Random.NormalIntRange(0,1)){ + case 0: + drop( new MIME.GOLD_FOUR(),217 ); + break; + case 1: + drop( new MIME.GOLD_FOUR(),1042 ); + break; + } + } else { + switch(Random.NormalIntRange(0,1)){ + case 0: + drop( new MIME.GOLD_FIVE(),217 ); + break; + case 1: + drop( new MIME.GOLD_FIVE(),1042 ); + break; + } + } + //生成四个水晶,宝箱王持续回血 for (int i : FourCrystal) { DCrystal ds = new DCrystal(); @@ -336,9 +525,17 @@ public class ColdChestBossLevel extends Level { //如果楼层为开始且boss血量小于100 判定WIN if (pro == VSYOU_START && boss.HP <= 100) { pro = WIN; + Buff.detach(boss, ChampionEnemy.Halo.class); + setMapEnd(); } } } + //水晶自爆 + for (Mob boss : Dungeon.level.mobs.toArray(new Mob[0])) { + if (boss instanceof DCrystal) { + boss.die(true); + } + } break; case WIN: // diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java index 25c8b31bb..62384d2cc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -589,7 +589,7 @@ public abstract class Level implements Bundlable { visuals.add( new FlowParticle.Flow( i - width() ) ); } } - if(Dungeon.depth >= 6){ + if(Dungeon.depth >= 6 && Dungeon.depth <= 10){ visuals.add( new ColdSnowParticles.Snow(i)); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 379491a13..d3bdf1616 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -69,6 +69,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.AquariumRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.EntranceRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.ExitRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.MagicDimandRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BlazingTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap; @@ -233,6 +234,10 @@ public abstract class RegularLevel extends Level { if (Dungeon.aqiLevel() && (Dungeon.isChallenged(AQUAPHOBIA))) initRooms.add(new AquariumRoom()); + if(Dungeon.depth == 9){ + initRooms.add(new MagicDimandRoom()); + } + if (Dungeon.NxhyshopOnLevel()) { initRooms.add(new NxhyShopRoom()); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/MagicDimandRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/MagicDimandRoom.java index 43464d28e..776ace15f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/MagicDimandRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/MagicDimandRoom.java @@ -1,7 +1,7 @@ package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.items.quest.CeremonialCandle; +import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.DimandBook; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; @@ -36,6 +36,9 @@ public class MagicDimandRoom extends StandardRoom{ ChestMarker vis = new ChestMarker(); Point c = center(); vis.pos(c.x - 1, c.y - 1); + int pos = level.pointToCell(center()); + + level.drop( new DimandBook(),pos ); level.customTiles.add(vis); @@ -46,7 +49,7 @@ public class MagicDimandRoom extends StandardRoom{ // level.addItemToSpawn(new CeremonialCandle()); // level.addItemToSpawn(new CeremonialCandle()); - CeremonialCandle.ritualPos = c.x + (level.width() * c.y); + //CeremonialCandle.ritualPos = c.x + (level.width() * c.y); } public static class ChestMarker extends CustomTilemap { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java index 8484e5945..3bd0aa300 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java @@ -1,5 +1,6 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; +import com.badlogic.gdx.Gdx; import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; @@ -25,74 +26,68 @@ import com.watabou.utils.DeviceCompat; import java.util.ArrayList; -public class GameNewsScene extends PixelScene { - boolean displayingNoArticles = false; +public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继承PixelScene类 + + boolean displayingNoArticles = false; //声明一个布尔类型的变量,用于标记是否需要显示文章 + + private static final int BTN_HEIGHT = 22; //声明一个常量,表示Button的高度 + private static final int BTN_WIDTH = 100; //声明一个常量,表示Button的宽度 - private static final int BTN_HEIGHT = 22; - private static final int BTN_WIDTH = 100; - RenderedTextBlock title = PixelScene.renderTextBlock(Messages.get(this, "title"), 9); @Override - public void create() { - super.create(); + public void create() { //重写create方法 - uiCamera.visible = false; + super.create(); //调用父类的create方法 - int w = Camera.main.width; - int h = Camera.main.height; + uiCamera.visible = false; //设置UI相机不可见 - int fullWidth = PixelScene.landscape() ? 202 : 100; - int left = (w - fullWidth)/2; + int w = Camera.main.width; //获取主相机的宽度 + int h = Camera.main.height; //获取主相机的高度 - Archs archs = new Archs(); - archs.setSize(w, h); - add(archs); + int fullWidth = PixelScene.landscape() ? 202 : 100; //如果是横屏模式,设置整个场景的宽度为202,否则为100 + int left = (w - fullWidth) / 2; //左边列Button的左边沿位置 + Archs archs = new Archs(); //创建一个Archs实例,用作场景背景 + archs.setSize(w, h); //设置Archs实例的大小 + add(archs); //添加Archs实例到场景中 -// title.hardlight(Window.TITLE_COLOR); -// title.setPos( -// (w - title.width()) / 2f, -// (20 - title.height()) / 2f -// ); -// align(title); -// add(title); + float top = 18; //左边列Button的上边缘位置 - float top = 18; + displayingNoArticles = !UpdateNews.articlesAvailable(); //检查是否有文章可用,如果没有就设置displayingNoArticles为True + if (displayingNoArticles || Messages.lang() != Languages.CHINESE) { //如果没有文章或者语言不是中文 - displayingNoArticles = !UpdateNews.articlesAvailable(); - if (displayingNoArticles || Messages.lang() != Languages.CHINESE) { + Component newsInfo = new GameNewsScene.NewsInfo(); //创建一个新闻信息组件 + newsInfo.setRect(left, 20, fullWidth, 0); //设置组件的位置和大小 + add(newsInfo); //将组件添加到场景中 - Component newsInfo = new GameNewsScene.NewsInfo(); - newsInfo.setRect(left, 20, fullWidth, 0); - add(newsInfo); - - top = newsInfo.bottom(); + top = newsInfo.bottom(); //将左边列Button的上边沿位置设置为新闻信息组件的下边沿位置 } - StyledButton btnSite = new StyledButton(Chrome.Type.GREY_BUTTON_TR, Messages.get(this, "read_more")){ + StyledButton btnSite = new StyledButton(Chrome.Type.GREY_BUTTON_TR, Messages.get(this, "read_more")) { //创建一个样式化的Button @Override - protected void onClick() { + protected void onClick() { //重写当前Button的onClick方法,点击按钮时切换到标题场景 super.onClick(); - ShatteredPixelDungeon.switchNoFade( TitleScene.class ); + ShatteredPixelDungeon.switchNoFade(TitleScene.class); } }; - btnSite.icon(Icons.get(Icons.NEWS)); - btnSite.textColor(Window.TITLE_COLOR); - btnSite.setRect(left, 190, fullWidth, BTN_HEIGHT); - add(btnSite); + btnSite.icon(Icons.get(Icons.NEWS)); //为Button添加图标 + btnSite.textColor(Window.TITLE_COLOR); //设置Button文本的颜色 + btnSite.setRect(left, 190, fullWidth, BTN_HEIGHT); //设置Button的位置和大小 + add(btnSite); //将Button添加到场景中 - if (!displayingNoArticles) { - ArrayList articles = UpdateNews.articles(); + if (!displayingNoArticles) { //有文章可用于加载时 - float articleSpace = h - top - 2; - int rows = articles.size(); - if (PixelScene.landscape()){ - rows /= 2; + ArrayList articles = UpdateNews.articles(); //获取文章列表 + + float articleSpace = h - top - 2; //计算剩余空间 + int rows = articles.size(); //计算行数 + if (PixelScene.landscape()) { + rows /= 2; //如果是横屏模式,每行只放置两个Button } rows++; - while ((articleSpace) / (BTN_HEIGHT+0.5f) < rows) { + while ((articleSpace) / (BTN_HEIGHT + 0.5f) < rows) { //如果当前所有文章无法显示完整,则删除最后的文章 articles.remove(articles.size() - 1); if (PixelScene.landscape()) { articles.remove(articles.size() - 1); @@ -100,199 +95,232 @@ public class GameNewsScene extends PixelScene { rows--; } - float gap = ((articleSpace) - (BTN_HEIGHT * rows)) / (float)rows; + float gap = ((articleSpace) - (BTN_HEIGHT * rows)) / (float) rows; //计算空隙大小 - boolean rightCol = false; - for (GameUpdateNewsArticles article : articles) { - StyledButton b = new GameNewsScene.ArticleButton(article); - b.multiline = true; - if (!rightCol) { - top += gap; - b.setRect( left, top, BTN_WIDTH, BTN_HEIGHT); + boolean rightCol = false; //是否为右边的列 + for (GameUpdateNewsArticles article : articles) { //遍历文章列表中的所有文章 + + StyledButton b = new GameNewsScene.ArticleButton(article); //创建一个新的文章Button + b.multiline = true; //设置Button可换行 + + if (!rightCol) { //如果不是右边的列 + top += gap; //调整top位置 + b.setRect(left, top, BTN_WIDTH, BTN_HEIGHT); //设置Button位置和大小 } else { - b.setRect( left + fullWidth - BTN_WIDTH, top, BTN_WIDTH, BTN_HEIGHT); + b.setRect(left + fullWidth - BTN_WIDTH, top, BTN_WIDTH, BTN_HEIGHT); //设置Button位置和大小 } - align(b); - add(b); + + align(b); //将Button与其他元素对齐 + add(b); //将Button添加到场景中 + if (!PixelScene.landscape()) { top += BTN_HEIGHT; } else { - if (rightCol){ + if (rightCol) { top += BTN_HEIGHT; } rightCol = !rightCol; } - btnSite.visible= false; - btnSite.active= false; - if(article.ling > Game.versionCode || article.ling < Game.versionCode) { - RenderedTextBlock title = PixelScene.renderTextBlock("你的版本需要更新!", 9); - title.hardlight(Window.RED_COLOR); - title.setPos( - (w - title.width()) / 2f, - (20 - title.height()) / 2f - ); - align(title); - add(title); + btnSite.visible = false; //将Button的可见性设置为False + btnSite.active = false; //将Button的活跃状态设置为False + + RenderedTextBlock title; + + if (article.ling > Game.versionCode) { //如果文章需要更新的版本号大于当前版本号 + title = PixelScene.renderTextBlock("你的版本需要更新!", 9); //创建一个渲染的文本块,并设置为"你的版本需要更新!" + title.hardlight(Window.RED_COLOR); //将文本块突出显示为红色 + } else if (article.ling < Game.versionCode) { //如果文章需要更新的版本号小于当前版本号 + title = PixelScene.renderTextBlock("警告:你的版本可能是盗版!", 9); //创建一个渲染的文本块,并设置为"警告:你的版本可能是盗版!" + title.hardlight(Window.CBLACK); //将文本块突出显示为黑色 } else { - RenderedTextBlock title = PixelScene.renderTextBlock("已是最新版本!", 9); - title.hardlight(Window.TITLE_COLOR); - title.setPos( - (w - title.width()) / 2f, - (20 - title.height()) / 2f - ); - align(title); - add(title); + title = PixelScene.renderTextBlock("已是最新版本!", 9); //如果文章版本号与当前版本号相同,创建一个渲染的文本块,并设置为"已是最新版本!" + title.hardlight(Window.TITLE_COLOR); //将文本块突出显示为标题颜色 } + + title.setPos((w - title.width()) / 2f, (20 - title.height()) / 2f); //设置文本块位置 + align(title); //将文本块与其他元素对齐 + add(title); //将文本块添加到场景中 } - top += gap; - } else { - top += 18; } - - } - @Override - public void update() { - if (displayingNoArticles && UpdateNews.articlesAvailable()){ - ShatteredPixelDungeon.seamlessResetScene(); + public void update() { //重写update方法 + + if (displayingNoArticles && UpdateNews.articlesAvailable()) { //如果没有可用的文章并且有文章可用于加载 + ShatteredPixelDungeon.seamlessResetScene(); //重置场景 } - super.update(); + + super.update(); //调用父类的update方法 } - private static class NewsInfo extends Component { + private static class NewsInfo extends Component { //创建一个新闻信息组件 - NinePatch bg; - RenderedTextBlock text; + NinePatch bg; //声明一个NinePatch实例,用作背景 + RenderedTextBlock text; //声明一个RenderedTextBlock实例,用于显示文字信息 - RedButton button; + RedButton button; //声明一个RedButton实例 @Override - protected void createChildren() { - bg = Chrome.get(Chrome.Type.GREY_BUTTON_TR); + protected void createChildren() { //创建组件中的子元素 + + // 添加背景 + bg = Chrome.get(Chrome.Type.SCROLL); add(bg); - String message = Game.version+"---"+Game.versionCode; + // 设置消息文本信息,包含游戏版本号和版本代码 + String message = Game.version + "-VC" + Game.versionCode; - SPDSettings.WiFi(false); + // 检查是否有可用更新 UpdateNews.checkForNews(); - if (!UpdateNews.articlesAvailable()){ + // 如果没有可用新闻显示 + if (!UpdateNews.articlesAvailable()) { + // 判断用户是否允许显示新闻,并且在未连接到无限制网络下提示 if (SPDSettings.news()) { if (SPDSettings.WiFi() && !Game.platform.connectedToUnmeteredNetwork()) { + // 显示警告信息 message += "\n\n" + Messages.get(this, "metered_network"); - - button = new RedButton(Messages.get(this, "enable_data")) { - @Override - protected void onClick() { - super.onClick(); - SPDSettings.WiFi(false); - UpdateNews.checkForNews(); - ShatteredPixelDungeon.seamlessResetScene(); - } - }; - add(button); + // 添加红色按钮,用于启用数据 } else { + // 显示没有网络的信息 message += "\n\n" + Messages.get(this, "no_internet"); } } else { - message += "\n\n" + Messages.get(this, "news_disabled"); - - button = new RedButton(Messages.get(this, "enable_news")) { - @Override - protected void onClick() { - super.onClick(); - SPDSettings.news(true); - UpdateNews.checkForNews(); - ShatteredPixelDungeon.seamlessResetScene(); - } - }; - add(button); + // 新闻被禁用时,显示新闻禁用的信息,并添加红色按钮,用于启用新闻 + message += "\n\n" + Messages.get(this, "no_internet"); } } + // 去掉多余的换行符 if (message.startsWith("\n\n")) message = message.replaceFirst("\n\n", ""); + // 渲染文本块,并设置位置 text = PixelScene.renderTextBlock(message, 6); - text.hardlight(CharSprite.WARNING); + text.hardlight(CharSprite.DEFAULT); add(text); } + // 布局 @Override protected void layout() { + // 背景定位 bg.x = x; bg.y = y; - text.maxWidth((int)width - bg.marginHor()); - text.setPos(x + bg.marginLeft(), y + bg.marginTop()+1); + // 设置文本最大宽度 + text.maxWidth((int) width - bg.marginHor()); + // 设置文本位置 + text.setPos(x + bg.marginLeft(), y + bg.marginTop() + 1); + // 计算高度 height = (text.bottom()) - y; - - if (button != null){ + // 如果有按钮,增加高度 + if (button != null) { height += 4; + // 设置按钮为多行显示 button.multiline = true; button.setSize(width - bg.marginHor(), 16); button.setSize(width - bg.marginHor(), Math.max(button.reqHeight(), 16)); - button.setPos(x + (width - button.width())/2, y + height); + // 重新定位按钮 + button.setPos(x + (width - button.width()) / 2, y + height); height = button.bottom() - y; } + // 添加底部边距 height += bg.marginBottom() + 1; + // 设置背景大小 bg.size(width, height); - } } + // ArticleButton类,表现为一个StyledButton样式的按钮,并根据游戏版本号与服务器版本号的大小关系展示不同的图标 private static class ArticleButton extends StyledButton { - + // 消息提示 public static void message(String message) { Game.runOnRenderThread(() -> ShatteredPixelDungeon.scene().add(new WndMessage(message))); } + GameUpdateNewsArticles article; BitmapText date; + /** + * 创建一个新的按钮 + * + * @param article 按钮对应的文章 + * 如果游戏的版本号大于服务器的最大版本号,按钮会显示一个警告图标 + * 如果游戏的版本号小于服务器的最小版本号,按钮会显示一个更新图标 + * 如果游戏的版本号等于服务器的最大版本号,按钮会显示一个天赋图标 + */ public ArticleButton(GameUpdateNewsArticles article) { super(Chrome.Type.GREY_BUTTON_TR, article.title, 6); this.article = article; - if(article.ling > Game.versionCode || article.ling < Game.versionCode){ + if (article.ling > Game.versionCode || article.ling < Game.versionCode) { icon(UpdateNews.parseArticleIcon(article)); - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES), - article.title, - article.summary, - Messages.get(this, "download"),Messages.get(this, "okay")) { - @Override - protected void onSelect(int index) { - if (index == 0) { - //q:书写下面的代码效果注释 - //a:如果是桌面版,就打开桌面版的下载链接 - //a:如果是安卓版,就打开安卓版的下载链接 - if(DeviceCompat.isDesktop()){ - ShatteredPixelDungeon.platform.openURI(article.DesktopURL); + if (article.ling > Game.versionCode) { + // 向用户展示新文章可用的选项:下载或退出游戏 + ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES), + article.title, + article.summary, + Messages.get(this, "download"), Messages.get(this, "okay")) { + @Override + protected void onSelect(int index) { + if (index == 0) { + // 如果是桌面版就打开桌面版的下载链接,否则打开安卓版的下载链接 + if (DeviceCompat.isDesktop()) { + ShatteredPixelDungeon.platform.openURI(article.DesktopURL); + } else { + ShatteredPixelDungeon.platform.openURI(article.URL); + } + ShatteredPixelDungeon.switchNoFade(TitleScene.class); } else { - ShatteredPixelDungeon.platform.openURI(article.URL); + ShatteredPixelDungeon.switchNoFade(TitleScene.class); } - ShatteredPixelDungeon.switchNoFade(TitleScene.class); - } else { - ShatteredPixelDungeon.switchNoFade(TitleScene.class); } - } - @Override - public void onBackPressed() { - // - } - }); + + @Override + public void onBackPressed() { + // + } + }); + } else { + // 向用户展示新版本可用的选项:强制下载或退出游戏 + ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(article.ling < Game.versionCode ? + Icons.WARNING : Icons.CHANGES), + article.title, + article.summary, + Messages.get(this, "force_download")) { + @Override + protected void onSelect(int index) { + if (index == 0) { + // 如果是桌面版就打开桌面版的下载链接,否则打开安卓版的下载链接 + if (DeviceCompat.isDesktop()) { + ShatteredPixelDungeon.platform.openURI(article.DesktopURL); + } else { + ShatteredPixelDungeon.platform.openURI(article.URL); + } + Gdx.app.exit(); + } + } + + @Override + public void onBackPressed() { + // + } + }); + } } else { + // 显示天赋图标并提示用户已经更新完成 icon(UpdateNews.parseArticleIcon(article)); - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES), + ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.TALENT), Messages.get(this, "update"), - Messages.get(this, "desc"), + Messages.get(this, "desc")+"\n\n"+article.summary, Messages.get(this, "okay")) { @Override protected void onSelect(int index) { @@ -300,6 +328,7 @@ public class GameNewsScene extends PixelScene { ShatteredPixelDungeon.switchNoFade(TitleScene.class); } } + public void onBackPressed() { // } @@ -308,16 +337,17 @@ public class GameNewsScene extends PixelScene { } } + // 布局 @Override protected void layout() { super.layout(); - bg.active=false; - bg.visible=false; - icon.x = x + bg.marginLeft() + (16-icon.width())/2f; - icon.visible=false; + bg.active = false; + bg.visible = false; + icon.x = x + bg.marginLeft() + (16 - icon.width()) / 2f; + icon.visible = false; PixelScene.align(icon); text.setPos(x + bg.marginLeft() + 18, text.top()); - text.visible=false; + text.visible = false; if (date != null) { date.x = x + width - bg.marginRight() - date.width() + 1; date.y = y + height - bg.marginBottom() - date.height() + 2.5f; @@ -325,10 +355,11 @@ public class GameNewsScene extends PixelScene { } } + // 点击事件 @Override protected void onClick() { super.onClick(); - // + // } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index f02fd490b..3597bad91 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -41,6 +41,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessAnmy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessGoRead; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessGoodSTR; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessImmune; @@ -54,6 +55,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.Mag import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayNoSTR; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSaySlowy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSaySoftDied; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayTimeLast; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner; @@ -505,6 +507,13 @@ public class GameScene extends PixelScene { case 6: WndStory.showChapter( WndStory.ID_PRISON ); break; + case 10: + if((Statistics.boss_enhance & 0x2) != 0 || Statistics.mimicking) { + WndStory.showChapter(WndStory.ID_COLDCHESTBOSS); + } else { + WndStory.showChapter(WndStory.ID_PRISONBOSS); + } + break; case 11: WndStory.showChapter( WndStory.ID_CAVES ); break; @@ -1403,6 +1412,7 @@ public class GameScene extends PixelScene { Buff.detach( ch, BlessMixShiled.class ); Buff.detach( ch, BlessMobDied.class ); Buff.detach( ch, BlessNoMoney.class ); + Buff.detach( ch, BlessAnmy.class ); Buff.detach( ch, MagicGirlSayCursed.class ); Buff.detach( ch, MagicGirlSayKill.class ); @@ -1410,6 +1420,7 @@ public class GameScene extends PixelScene { Buff.detach( ch, MagicGirlSaySlowy.class ); Buff.detach( ch, MagicGirlSaySoftDied.class ); Buff.detach( ch, MagicGirlSayNoSTR.class ); + Buff.detach( ch, MagicGirlSayTimeLast.class ); } public static void bossSlain() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java index 21496e360..76f1e3eae 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -182,7 +182,7 @@ public class InterlevelScene extends PixelScene { fadeTime += 0.9f; //adds 1 second total //speed up transition when debugging } else if (DeviceCompat.isDebug()){ - fadeTime = 0.1f; + fadeTime = 0.9f; } SkinnedBlock bg = new SkinnedBlock(Camera.main.width, Camera.main.height, loadingAsset ){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java index 7ad0c2c47..fe81d8804 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java @@ -14,6 +14,7 @@ import com.watabou.utils.Callback; public class DimandKingSprite extends MobSprite { private Emitter teleParticles; + private Animation cast; public DimandKingSprite() { super(); @@ -31,12 +32,39 @@ public class DimandKingSprite extends MobSprite { attack = new Animation( 15, false ); attack.frames( frames, 5,6,7,8); + cast = attack.clone(); + die = new Animation( 3, false ); die.frames( frames, 9,10,11 ); play( idle ); } + @Override + public void attack( int cell ) { + if (!Dungeon.level.adjacent(cell, ch.pos)) { + + MagicMissile.boltFromChar( parent, + MagicMissile.SWORDLING, + this, + cell, + new Callback() { + @Override + public void call() { + ((DiamondKnight)ch).onZapComplete(); + } + } ); + + play( cast ); + turnTo( ch.pos , cell ); + + } else { + + super.attack( cell ); + + } + } + @Override public void link(Char ch) { super.link(ch); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java index 46f00e034..fe5688daa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -388,6 +388,8 @@ public class ItemSpriteSheet { public static final int WAND_REGROWTH = WANDS+11; public static final int WAND_TRANSFUSION = WANDS+12; public static final int WAND_HTR = WANDS+14; + + public static final int WAND_KCX = WANDS+15; static { for (int i = WANDS; i < WANDS+12; i++) assignItemRect(i, 14, 14); @@ -803,6 +805,8 @@ public class ItemSpriteSheet { public static final int DIFFCULTBOOT= MAINBOOKINDEX+12; public static final int STORYBOOKS= MAINBOOKINDEX+13; + public static final int SOYBOOKS= MAINBOOKINDEX+14; + private static final int MAINPALYBOOKS = xy(1, 40); public static final int MONEYBOOKS= MAINPALYBOOKS+1; public static final int PINKBOOKS= MAINPALYBOOKS+2; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwordLingSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwordLingSprites.java index 94e165989..7a5f11723 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwordLingSprites.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SwordLingSprites.java @@ -37,7 +37,7 @@ public class SwordLingSprites extends CharSprite{ PointF pointF1 = worldToCamera(to); PointF d = PointF.diff(pointF1,pointF); angle = 90 - (float)(Math.atan2(d.x,d.y) / 3.1415926 * 180); - speed.set(d).normalize().scale(10f); + speed.set(d).normalize().scale(90f); angularSpeed = 0; tweener = new PosTweener(this,pointF1,1f); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TPDoorSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TPDoorSprites.java new file mode 100644 index 000000000..ab2128af9 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TPDoorSprites.java @@ -0,0 +1,28 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.TextureFilm; + +public class TPDoorSprites extends MobSprite { + + public TPDoorSprites () { + super(); + + texture( Assets.Sprites.TPDP ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new Animation( 6, true ); + idle.frames( frames, 0,1,2 ); + + run = idle.clone(); + + attack = idle.clone(); + + die = new Animation( 7, false ); + die.frames( frames, 1,2 ); + + play( idle ); + } + +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ReloadButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ReloadButton.java index 2a7028dd0..ec608de47 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ReloadButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ReloadButton.java @@ -19,6 +19,7 @@ public class ReloadButton extends IconButton{ ShatteredPixelDungeon.switchNoFade(GameNewsScene.class); } + @Override protected String hoverText() { return Messages.titleCase(Messages.get(WndKeyBindings.class, "update")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java index e171f6120..9d514d5b6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Toolbar.java @@ -225,7 +225,37 @@ public class Toolbar extends Component { @Override protected void layout() { - final int maxHorizontalQuickslots = PixelScene.landscape() ? 12 : 3; + /** + * 现在的代码是为了适应不同的屏幕尺寸 + * 但是这样做会导致在不同的屏幕尺寸下,按钮的位置不一样 + * 为此使用三目运算符判定当前屏幕尺寸,然后根据不同的屏幕尺寸设置按钮的位置 + */ + float wMin = Game.width / PixelScene.MIN_WIDTH_FULL; + float hMin = Game.height / PixelScene.MIN_HEIGHT_FULL; + final int maxHorizontalQuickslots = + /** 中文 + * 如果是竖屏,那么最多显示12个快捷栏 + * 如果是竖屏且>=5x缩放,那么下方最多显示4个快捷栏 + * 如果是竖屏且>=4x缩放,那么下方最多显示5个快捷栏 + * 如果是竖屏且>=3x缩放,那么下方最多显示8个快捷栏 + * 如果是横屏,那么所有快捷栏在游戏界面底部生成布局 + */ + + /**English + //If it is a vertical screen, then at most 12 quick slots are displayed below + //If it is a vertical screen and >=5x zoom, then at most 4 quick slots are displayed below + //If it is a vertical screen and >=4x zoom, then at most 5 quick slots are displayed below + //If it is a vertical screen and >=3x zoom, then at most 8 quick slots are displayed below + //If it is a horizontal screen, then all quick slots are generated at the bottom of the game interface + */ + + PixelScene.landscape() ? 12 : + + SPDSettings.scale() >= 5 ? 4 : + + SPDSettings.scale() >= 4 ? 5 : + + SPDSettings.scale() >= 3 ? 8 : 12; float right = width; if (SPDSettings.interfaceSize() > 0){ btnInventory.setPos(right - btnInventory.width(), y); @@ -258,7 +288,8 @@ public class Toolbar extends Component { } } - for(int i = 0; i < Constants.MAX_QUICKSLOTS; i++) { + for(int i = 0; i < (Math.min(wMin, hMin) >= 2*Game.density ? Constants.MOX_QUICKSLOTS : + Constants.MAX_QUICKSLOTS); i++) { //FIXME doesn't work for portrait mode and no longer dynamically resizes. if (i == 0 && !SPDSettings.flipToolbar() || i == Math.min(SPDSettings.quickslots(), maxHorizontalQuickslots)-1 && SPDSettings.flipToolbar()) { @@ -302,26 +333,12 @@ public class Toolbar extends Component { } } - startY = 60; + startY = SPDSettings.scale() >= 4 ? 28 : 40; for (int i = maxHorizontalQuickslots; i < btnQuick.length; i++) { QuickslotTool tool = btnQuick[i]; tool.setPos(width - (tool.width() + 2), startY); if (i + 1 < btnQuick.length) { - if(i +1 < 7) { - startY = btnQuick[i].bottom(); - } else if (i == 7) { - startY = btnQuick[i].top(); - tool.setPos(width - (tool.width() + 24), startY); - } else if (i == 8) { - startY = btnQuick[i].top() - 24; - tool.setPos(width - (tool.width() + 24), startY); - } else if (i == 9) { - startY = btnQuick[i].top() - 48; - tool.setPos(width - (tool.width() + 24), startY); - } else if (i == 10) { - startY = btnQuick[i].top() - 24; - tool.setPos(width - (tool.width() + 24), startY); - } + startY = btnQuick[i].bottom(); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java index baebc5cde..cea558968 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Window.java @@ -53,7 +53,7 @@ public class Window extends Group implements Signal.Listener { public static final int G_COLOR = 0x00FF00; public static final int B_COLOR = 0x0000FF; public static final int Pink_COLOR = 0xFF1493; - public static final int DeepPK_COLOR = 0xFF0000; + public static final int DeepPK_COLOR = 0xFFFF44; public static final int SHPX_COLOR = 0x33BB33; public static final int TITLE_COLOR = 0x00FFFF; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java index fa6754cf0..d777fd0a4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java @@ -2,7 +2,6 @@ package com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewDM300; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkLingSprite; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.ChangesScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -49,6 +48,7 @@ public class vM0_6_7_X_Changes { public static void addAllChanges(ArrayList changeInfos) { add_v0_6_31_Changes(changeInfos); + add_v0_6_32_Changes(changeInfos); add_v0_6_30_Changes(changeInfos); add_v0_6_29_Changes(changeInfos); add_v0_6_28_Changes(changeInfos); @@ -82,48 +82,58 @@ public class vM0_6_7_X_Changes { add_v0_6_0_Changes(changeInfos); } - public static void add_v0_6_31_Changes( ArrayList changeInfos ) { - ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta5.1(P3)", true, ""); + public static void add_v0_6_32_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta5.275(P3)", true, ""); changes.hardlight(Window.TITLE_COLOR); changeInfos.add(changes); - changes = new ChangeInfo("即将到来", false, null); - changes.hardlight(Window.Pink_COLOR); - changeInfos.add(changes); - - Image issxsaxs =new DimandKingSprite(); - issxsaxs.scale.set(PixelScene.align(0.8f)); - changes.addButton(new ChangeButton(issxsaxs,("关于宝箱之王?"), - ("将在下个版本Beta5.3进行测试更新,请做好战斗准备!"))); - - changes.addButton(new ChangeButton(new PinkLingSprite(), ("狩猎系统1.0"), - ("击败两次宝箱之王后解锁狩猎系统,神秘NPC会入驻0层。并派发狩猎任务。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.FBK), ("灯火系统V3--狩猎与前行之章"), - ("灯火系统即将进行大改,敬请期待"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_14), ("寒冷系统V0.2"), - ("将追加矿洞层的寒冷惩罚和新的事件,敬请期待"))); - changes = new ChangeInfo("新内容", false, null); changes.hardlight(Window.GREEN_COLOR); changeInfos.add(changes); - changes.addButton(new ChangeButton(Icons.get(Icons.INFO), ("图鉴和炼金合成表加入新东西"), - ("请自行到游戏查看"))); +// changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("一些温馨提示"), +// ("对于尚未进行正常模式的玩家进行提示。例如BOSSRUSH模式。"))); - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.MAGIC_TORCH), ("新武器:魔法火把[捐赠物品]"), - ("感谢_落白_的投稿,该武器属于3阶武器。"))); + changes.addButton(new ChangeButton(Icons.get(Icons.CHANGES), ("自动更新系统"), + ("现在你可以在游戏内自动更新了,不需要再去下载更新包了。祝你游戏愉快!"))); - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.BloodDied), ("新武器:嗜血荆棘[捐赠物品]"), - ("感谢_落白_的投稿,该武器属于6阶武器。"))); + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WORN_SHORTSWORD), ("战士初始改动"), + ("现在战士使用唤魔晶柱不消耗数量,并且这也为战士后续的专精职业_召唤师-斗争战士_做了铺垫。该职业将替换原版狂战士职业并改变天赋。但目前暂时只是初始改动,敬请期待后续更新"))); changes = new ChangeInfo("改动", false, null); changes.hardlight(Window.CYELLOW); changeInfos.add(changes); changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16), - Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X59"))); + Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X60"))); + } + + public static void add_v0_6_31_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta5.32-35(P3)", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + Image issxsaxs =new DimandKingSprite(); + issxsaxs.scale.set(PixelScene.align(0.8f)); + changes.addButton(new ChangeButton(issxsaxs,("拟态之王"), + ("王会消灭每一个屠杀衪的子嗣的人"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("灯火系统V2.5"), + ("追加两个Buff,和其他改进"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_14), ("篝火系统0.2"), + ("在篝火房间现在寒冷值恢复得更快,且在寒冷回复期间不会受到饥饿效果"))); + + changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16), + Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X61"))); } public static void add_v0_6_30_Changes( ArrayList changeInfos ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/BossSettingWindows.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/BossSettingWindows.java index 507dd516a..7d4109c82 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/BossSettingWindows.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/BossSettingWindows.java @@ -1,5 +1,6 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -44,7 +45,8 @@ public class BossSettingWindows extends Window { cb.setRect(GAP, 500, WIDTH - GAP * 2, BOX_HEIGHT); } - if(1==2){ + //1 拟态王 + if(i == 1 && !Badges.isUnlocked(Badges.Badge.KILL_SM) || i == 0 || i==4){ cb.alpha(0.4f); cb.active=false; cb.checked(false); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java index 8015526f7..4220162e9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java @@ -65,6 +65,7 @@ public class WndChallenges extends Window { public WndChallenges( int checked, boolean editable, Callback callback ) { this(checked, 0, editable, callback); } + private WndChallenges( int checked, int index, boolean editable, Callback callback ) { super(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndFeedback.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndFeedback.java index 3ae38727c..3e48c3caa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndFeedback.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndFeedback.java @@ -15,7 +15,6 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.watabou.noosa.ColorBlock; import com.watabou.noosa.Game; -import com.watabou.utils.DeviceCompat; public class WndFeedback extends Window { @@ -54,12 +53,7 @@ public class WndFeedback extends Window { @Override protected void onClick() { super.onClick(); - if(DeviceCompat.isAndroid()){ - //由于安卓架构对于下方的LibGDX退出并非完全退出,仍然可能有进程在后台运行,为此强制抛出错误以达到游戏进程完全停止的目的。 - throw new IllegalStateException("Died"); - } else { - Gdx.app.exit(); - } + Gdx.app.exit(); } }; btnSponsor.icon(Icons.get(Icons.COMPASS)); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java index bd13fc8d8..df3b47a74 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndResurrect.java @@ -25,6 +25,8 @@ import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.crivusfruitslevel2; import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.TestDwarfMasterLock; import com.shatteredpixel.shatteredpixeldungeon.items.Ankh; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; @@ -146,6 +148,8 @@ public class WndResurrect extends Window { crivusfruitslevel2 = false; } + //矮人将军 + Buff.affect(hero, TestDwarfMasterLock.class).set((1), 1); InterlevelScene.mode = InterlevelScene.Mode.RESURRECT; Game.switchScene( InterlevelScene.class ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java index a24c5c958..a3039288c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStory.java @@ -39,6 +39,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.Mag import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayNoSTR; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSaySlowy; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSaySoftDied; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayTimeLast; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfAnmy; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; @@ -73,6 +75,8 @@ public class WndStory extends Window { public static final int ID_CHAPTONEEND = 10; public static final int ID_ICEBOSS = 11; + public static final int ID_COLDCHESTBOSS = 29; + //DLC BOSSRUSH public static final int ID_GAME = 12; @@ -110,6 +114,7 @@ public class WndStory extends Window { CHAPTERS.put( ID_HALLSBOOS, "hallsboss" ); CHAPTERS.put( ID_CHAPTONEEND, "new" ); CHAPTERS.put( ID_ICEBOSS, "icedead" ); + CHAPTERS.put( ID_COLDCHESTBOSS, "coldchest" ); CHAPTERS.put( ID_GAME, "bossrushstart" ); CHAPTERS.put( ID_NOMOBS, "nomobs" ); CHAPTERS.put( ID_CALA, "calaboss" ); @@ -206,7 +211,7 @@ public class WndStory extends Window { if(lanterfireactive) { if (Dungeon.depth == 6){ //TODO 首次到达6层 给予1个增益Buff - switch (Random.Int(4)){ + switch (Random.Int(5)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); break; @@ -222,13 +227,17 @@ public class WndStory extends Window { case 4: Buff.affect(hero, BlessImmune.class).set( (100), 1 ); break; + case 5: + new WandOfAnmy().quantity(1).identify().collect(); + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.b(Messages.get(WndStory.class,"start")); } if (RollLevel()) { //TODO 常规刷新 if (hero.lanterfire == 100){ - switch (Random.Int(4)){ + switch (Random.Int(5)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); break; @@ -244,10 +253,14 @@ public class WndStory extends Window { case 4: Buff.affect(hero, BlessImmune.class).set( (100), 1 ); break; + case 5: + new WandOfAnmy().quantity(1).identify().collect(); + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.p(Messages.get(WndStory.class,"good")); } else if (hero.lanterfire <= 99 && hero.lanterfire >= 90) { - switch (Random.Int(4)){ + switch (Random.Int(5)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); break; @@ -263,6 +276,10 @@ public class WndStory extends Window { case 4: Buff.affect(hero, BlessImmune.class).set( (100), 1 ); break; + case 5: + new WandOfAnmy().quantity(1).identify().collect(); + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.p(Messages.get(WndStory.class,"good")); } else if (hero.lanterfire <= 89 && hero.lanterfire >= 80 && Random.Float() <= 0.05f ) { @@ -288,7 +305,7 @@ public class WndStory extends Window { } GLog.n(Messages.get(WndStory.class,"bad")); } else if (hero.lanterfire <= 89 && hero.lanterfire >= 80 && Random.Float() <= 0.85f ) { - switch (Random.Int(4)){ + switch (Random.Int(5)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); break; @@ -304,11 +321,15 @@ public class WndStory extends Window { case 4: Buff.affect(hero, BlessImmune.class).set( (100), 1 ); break; + case 5: + new WandOfAnmy().quantity(1).identify().collect(); + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.p(Messages.get(WndStory.class,"good")); } else if (hero.lanterfire <= 89 && hero.lanterfire >= 80) { GLog.b(Messages.get(WndStory.class,"normoal")); - } else if (hero.lanterfire <= 79 && hero.lanterfire >= 60 && Random.Float() <= 0.25f ) { + } else if (hero.lanterfire <= 79 && hero.lanterfire >= 60 && Random.Float() <= 0.45f ) { switch (Random.Int(5)){ case 0: default: Buff.affect(hero, MagicGirlSayMoneyMore.class).set( (100), 1 ); @@ -330,8 +351,8 @@ public class WndStory extends Window { break; } GLog.n(Messages.get(WndStory.class,"bad")); - } else if (hero.lanterfire <= 79 && hero.lanterfire >= 60 && Random.Float() <= 0.70f ) { - switch (Random.Int(4)){ + } else if (hero.lanterfire <= 79 && hero.lanterfire >= 60 && Random.Float() <= 0.50f ) { + switch (Random.Int(5)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); break; @@ -347,12 +368,16 @@ public class WndStory extends Window { case 4: Buff.affect(hero, BlessImmune.class).set( (100), 1 ); break; + case 5: + new WandOfAnmy().quantity(1).identify().collect(); + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.p(Messages.get(WndStory.class,"good")); } else if (hero.lanterfire <= 79 && hero.lanterfire >= 60) { GLog.b(Messages.get(WndStory.class,"normoal")); - } else if (hero.lanterfire <= 59 && hero.lanterfire >= 35 && Random.Float() <= 0.40f ) { - switch (Random.Int(5)){ + } else if (hero.lanterfire <= 59 && hero.lanterfire >= 29 && Random.Float() <= 0.20f ) { + switch (Random.Int(6)){ case 0: default: Buff.affect(hero, MagicGirlSayMoneyMore.class).set( (100), 1 ); break; @@ -371,9 +396,12 @@ public class WndStory extends Window { case 5: Buff.affect(hero, MagicGirlSayNoSTR.class).set( (100), 1 ); break; + case 6: + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.n(Messages.get(WndStory.class,"bad")); - } else if (hero.lanterfire <= 59 && hero.lanterfire >= 35 && Random.Float() <= 0.20f ) { + } else if (hero.lanterfire <= 59 && hero.lanterfire >= 35 && Random.Float() <= 0.60f ) { switch (Random.Int(4)){ case 0: default: Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); @@ -394,8 +422,8 @@ public class WndStory extends Window { GLog.p(Messages.get(WndStory.class,"good")); } else if (hero.lanterfire <= 59 && hero.lanterfire >= 35) { GLog.b(Messages.get(WndStory.class,"normoal")); - } else if (hero.lanterfire <= 34 && hero.lanterfire >= 1 && Random.Float() <= 0.40f ) { - switch (Random.Int(5)){ + } else if (hero.lanterfire <= 30 && hero.lanterfire >= 1 && Random.Float() <= 0.40f ) { + switch (Random.Int(6)){ case 0: default: Buff.affect(hero, MagicGirlSayMoneyMore.class).set( (100), 1 ); break; @@ -414,6 +442,9 @@ public class WndStory extends Window { case 5: Buff.affect(hero, MagicGirlSayNoSTR.class).set( (100), 1 ); break; + case 6: + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); + break; } GLog.n(Messages.get(WndStory.class,"bad")); } else if (hero.lanterfire <= 34 && hero.lanterfire >= 1 && Random.Float() <= 0.35f ) { @@ -435,51 +466,32 @@ public class WndStory extends Window { break; } GLog.p(Messages.get(WndStory.class,"good")); - } else if (hero.lanterfire <= 34 && hero.lanterfire >= 1) { - GLog.b(Messages.get(WndStory.class,"normoal")); } else if (hero.lanterfire <= 0 && Random.Float() <= 0.48f ) { - switch (Random.Int(5)){ - case 0: default: - Buff.affect(hero, MagicGirlSayMoneyMore.class).set( (100), 1 ); + switch (Random.Int(6)) { + case 0: + default: + Buff.affect(hero, MagicGirlSayMoneyMore.class).set((100), 1); break; case 1: - Buff.affect(hero, MagicGirlSaySoftDied.class).set( (100), 1 ); + Buff.affect(hero, MagicGirlSaySoftDied.class).set((100), 1); break; case 2: - Buff.affect(hero, MagicGirlSayCursed.class).set( (100), 1 ); + Buff.affect(hero, MagicGirlSayCursed.class).set((100), 1); break; case 3: - Buff.affect(hero, MagicGirlSaySlowy.class).set( (100), 1 ); + Buff.affect(hero, MagicGirlSaySlowy.class).set((100), 1); break; case 4: - Buff.affect(hero, MagicGirlSayKill.class).set( (100), 1 ); + Buff.affect(hero, MagicGirlSayKill.class).set((100), 1); break; case 5: - Buff.affect(hero, MagicGirlSayNoSTR.class).set( (100), 1 ); + Buff.affect(hero, MagicGirlSayNoSTR.class).set((100), 1); + break; + case 6: + Buff.affect(hero, MagicGirlSayTimeLast.class).set( (100), 1 ); break; } - GLog.n(Messages.get(WndStory.class,"bad")); - } else if (hero.lanterfire <= 0 && Random.Float() <= 0.10f ) { - switch (Random.Int(4)){ - case 0: default: - Buff.affect(hero, BlessNoMoney.class).set( (100), 1 ); - break; - case 1: - Buff.affect(hero, BlessGoodSTR.class).set( (100), 1 ); - break; - case 2: - Buff.affect(hero, BlessMobDied.class).set( (100), 1 ); - break; - case 3: - Buff.affect(hero, BlessMixShiled.class).set( (100), 1 ); - break; - case 4: - Buff.affect(hero, BlessImmune.class).set( (100), 1 ); - break; - } - GLog.p(Messages.get(WndStory.class,"good")); - } else if (hero.lanterfire <= 0 ) { - GLog.b(Messages.get(WndStory.class,"normoal")); + GLog.n(Messages.get(WndStory.class, "bad")); } } }