diff --git a/build.gradle b/build.gradle index 356d3f4c8..82bacd4e2 100644 --- a/build.gradle +++ b/build.gradle @@ -18,10 +18,10 @@ allprojects { appName = 'Magic Ling Pixel Dungeon' appPackageName = 'com.ansdomagiclingpixeldungeon.ling' - appVersionCode =907500 - appVersionName = '0.6.5.0-Alpha4' + appVersionCode =917000 + appVersionName = '0.6.5.0-Alpha6-Patch7' - appJavaCompatibility = JavaVersion.VERSION_11 + appJavaCompatibility = JavaVersion.VERSION_1_8 appAndroidCompileSDK = 33 appAndroidMinSDK = 19 diff --git a/core/build.gradle b/core/build.gradle index 0468242ac..f1bd28b3a 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -6,5 +6,12 @@ sourceCompatibility = targetCompatibility = appJavaCompatibility dependencies { api project(':SPD-classes') implementation project(':services') + + // 添加 Lunar-Java 依赖 接入农历计算 + + //由于作者的版本号问题,136才是最新版 + + //noinspection GradleDependency + implementation 'cn.6tail:lunar:1.3.6' } diff --git a/core/src/main/assets/DiLing.png b/core/src/main/assets/DiLing.png new file mode 100644 index 000000000..5c59357cc Binary files /dev/null and b/core/src/main/assets/DiLing.png differ diff --git a/core/src/main/assets/SRPD/TorchHuntsman.png b/core/src/main/assets/SRPD/TorchHuntsman.png index 5e5fca123..34c037d2f 100644 Binary files a/core/src/main/assets/SRPD/TorchHuntsman.png and b/core/src/main/assets/SRPD/TorchHuntsman.png differ diff --git a/core/src/main/assets/dog.png b/core/src/main/assets/dog.png new file mode 100644 index 000000000..79c3453a0 Binary files /dev/null and b/core/src/main/assets/dog.png differ diff --git a/core/src/main/assets/effects/effects.png b/core/src/main/assets/effects/effects.png index 8cda68ea8..a618c24db 100644 Binary files a/core/src/main/assets/effects/effects.png and b/core/src/main/assets/effects/effects.png differ diff --git a/core/src/main/assets/environment/custom_tiles/prison_exit.png b/core/src/main/assets/environment/custom_tiles/prison_exit.png index 2030603d0..9de0c6edb 100644 Binary files a/core/src/main/assets/environment/custom_tiles/prison_exit.png and b/core/src/main/assets/environment/custom_tiles/prison_exit.png differ diff --git a/core/src/main/assets/environment/custom_tiles/prison_quests.png b/core/src/main/assets/environment/custom_tiles/prison_quests.png index 6bf5d0722..39fe6b7ac 100644 Binary files a/core/src/main/assets/environment/custom_tiles/prison_quests.png and b/core/src/main/assets/environment/custom_tiles/prison_quests.png differ diff --git a/core/src/main/assets/environment/terrain_features.png b/core/src/main/assets/environment/terrain_features.png index 865a37860..88c1640fd 100644 Binary files a/core/src/main/assets/environment/terrain_features.png and b/core/src/main/assets/environment/terrain_features.png differ diff --git a/core/src/main/assets/environment/tiles_cold.png b/core/src/main/assets/environment/tiles_cold.png index e1adca8a7..c9479bb47 100644 Binary files a/core/src/main/assets/environment/tiles_cold.png and b/core/src/main/assets/environment/tiles_cold.png differ diff --git a/core/src/main/assets/environment/tiles_garden.png b/core/src/main/assets/environment/tiles_garden.png new file mode 100644 index 000000000..22982d700 Binary files /dev/null and b/core/src/main/assets/environment/tiles_garden.png differ diff --git a/core/src/main/assets/environment/tiles_halloween.png b/core/src/main/assets/environment/tiles_halloween.png new file mode 100644 index 000000000..b9f65014d Binary files /dev/null and b/core/src/main/assets/environment/tiles_halloween.png differ diff --git a/core/src/main/assets/environment/tiles_prison.png b/core/src/main/assets/environment/tiles_prison.png index 8893e9d61..d72652d08 100644 Binary files a/core/src/main/assets/environment/tiles_prison.png and b/core/src/main/assets/environment/tiles_prison.png differ diff --git a/core/src/main/assets/environment/tiles_sewers.png b/core/src/main/assets/environment/tiles_sewers.png index ae31f917b..9878fa258 100644 Binary files a/core/src/main/assets/environment/tiles_sewers.png and b/core/src/main/assets/environment/tiles_sewers.png differ diff --git a/core/src/main/assets/environment/tiles_tengu.png b/core/src/main/assets/environment/tiles_tengu.png new file mode 100644 index 000000000..d94043bbe Binary files /dev/null and b/core/src/main/assets/environment/tiles_tengu.png differ diff --git a/core/src/main/assets/environment/water0.png b/core/src/main/assets/environment/water0.png index f7d237649..d9b5f58e1 100644 Binary files a/core/src/main/assets/environment/water0.png and b/core/src/main/assets/environment/water0.png differ diff --git a/core/src/main/assets/environment/water7.png b/core/src/main/assets/environment/water7.png new file mode 100644 index 000000000..7909ba071 Binary files /dev/null and b/core/src/main/assets/environment/water7.png differ diff --git a/core/src/main/assets/interfaces/arcs1.png b/core/src/main/assets/interfaces/arcs1.png index 5d36c54d0..e53b4b6a8 100644 Binary files a/core/src/main/assets/interfaces/arcs1.png and b/core/src/main/assets/interfaces/arcs1.png differ diff --git a/core/src/main/assets/interfaces/arcs2.png b/core/src/main/assets/interfaces/arcs2.png index 48cf7a11a..cbdc8397c 100644 Binary files a/core/src/main/assets/interfaces/arcs2.png and b/core/src/main/assets/interfaces/arcs2.png differ diff --git a/core/src/main/assets/interfaces/arcs2_night.png b/core/src/main/assets/interfaces/arcs2_night.png new file mode 100644 index 000000000..9b3e6907e Binary files /dev/null and b/core/src/main/assets/interfaces/arcs2_night.png differ diff --git a/core/src/main/assets/interfaces/badges.png b/core/src/main/assets/interfaces/badges.png index a37796266..3daaae04b 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/interfaces/bosslogo/dm300or-clear.png b/core/src/main/assets/interfaces/bosslogo/dm300or-clear.png new file mode 100644 index 000000000..e22367dc1 Binary files /dev/null and b/core/src/main/assets/interfaces/bosslogo/dm300or-clear.png differ diff --git a/core/src/main/assets/interfaces/bosslogo/dm300or-title.png b/core/src/main/assets/interfaces/bosslogo/dm300or-title.png new file mode 100644 index 000000000..d030dc15d Binary files /dev/null and b/core/src/main/assets/interfaces/bosslogo/dm300or-title.png differ diff --git a/core/src/main/assets/interfaces/bosslogo/tengu-clear.png b/core/src/main/assets/interfaces/bosslogo/tengu-clear.png new file mode 100644 index 000000000..e19ed6b1f Binary files /dev/null and b/core/src/main/assets/interfaces/bosslogo/tengu-clear.png differ diff --git a/core/src/main/assets/interfaces/bosslogo/tengu-title.png b/core/src/main/assets/interfaces/bosslogo/tengu-title.png new file mode 100644 index 000000000..1b61554f3 Binary files /dev/null and b/core/src/main/assets/interfaces/bosslogo/tengu-title.png differ diff --git a/core/src/main/assets/interfaces/chrome.png b/core/src/main/assets/interfaces/chrome.png index db652b7c9..8671e1ca9 100644 Binary files a/core/src/main/assets/interfaces/chrome.png and b/core/src/main/assets/interfaces/chrome.png differ diff --git a/core/src/main/assets/interfaces/go-surface.png b/core/src/main/assets/interfaces/go-surface.png index 4c576d7b1..ad7560afe 100644 Binary files a/core/src/main/assets/interfaces/go-surface.png and b/core/src/main/assets/interfaces/go-surface.png differ diff --git a/core/src/main/assets/interfaces/icons.png b/core/src/main/assets/interfaces/icons.png index a1e2cdbb5..a01f67f6a 100644 Binary files a/core/src/main/assets/interfaces/icons.png and b/core/src/main/assets/interfaces/icons.png differ diff --git a/core/src/main/assets/interfaces/icons_normal.png b/core/src/main/assets/interfaces/icons_normal.png new file mode 100644 index 000000000..5955d6c67 Binary files /dev/null and b/core/src/main/assets/interfaces/icons_normal.png differ diff --git a/core/src/main/assets/interfaces/loading_sewers.png b/core/src/main/assets/interfaces/loading_sewers.png index a3e72dfd3..5d6613693 100644 Binary files a/core/src/main/assets/interfaces/loading_sewers.png and b/core/src/main/assets/interfaces/loading_sewers.png differ diff --git a/core/src/main/assets/interfaces/mapname/hollow.png b/core/src/main/assets/interfaces/mapname/hollow.png new file mode 100644 index 000000000..3a7b04f32 Binary files /dev/null and b/core/src/main/assets/interfaces/mapname/hollow.png differ diff --git a/core/src/main/assets/interfaces/passwordbadges.png b/core/src/main/assets/interfaces/passwordbadges.png index 196ece7de..c9a2b1e9f 100644 Binary files a/core/src/main/assets/interfaces/passwordbadges.png and b/core/src/main/assets/interfaces/passwordbadges.png differ diff --git a/core/src/main/assets/interfaces/status_pane.png b/core/src/main/assets/interfaces/status_pane.png index dd53e4043..c2a1b7f0d 100644 Binary files a/core/src/main/assets/interfaces/status_pane.png and b/core/src/main/assets/interfaces/status_pane.png differ diff --git a/core/src/main/assets/interfaces/surface.png b/core/src/main/assets/interfaces/surface.png index be311407c..13fac1f0f 100644 Binary files a/core/src/main/assets/interfaces/surface.png and b/core/src/main/assets/interfaces/surface.png differ diff --git a/core/src/main/assets/interfaces/talent_button.png b/core/src/main/assets/interfaces/talent_button.png index 7dd6734fc..76244aee7 100644 Binary files a/core/src/main/assets/interfaces/talent_button.png and b/core/src/main/assets/interfaces/talent_button.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 11a197d63..58753dd99 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -1,5 +1,86 @@ #####MLPD-P3文本 +actors.mobs.bosses.cerberus.name=刻耳柏洛斯 +actors.mobs.bosses.cerberus.desc=刻耳柏洛斯,是一只来自异界的守门恶犬。它凝视着周围的一切,似乎充满了恶意和威胁。\n它身边的环境异常寂静,毫无生机。刻耳柏洛斯以死亡和绝望为代表,具有无比的威力,堪称死亡的化身。 + + +actors.mobs.hollow.apprenticewitch.name=见习魔女 +actors.mobs.hollow.apprenticewitch.desc=她曾是某魔法学院的学生,因为太过顽皮,没能通过魔法考试,所以无法成为一名合格的法师。\n\n有些人会吸取教训,继续努力学习成为出色的法师,但她却渐渐失去了对魔力的控制,境况逐渐堕落。如今,她只能作为一名见习魔女游荡在荒野之外,以汲取过路人灵魂或给予她糖果为乐。如果没有给她糖果,那么她会生气,你的灵魂会被她汲取。 + +actors.mobs.hollow.frankenstein.name=未尽梦偶 +actors.mobs.hollow.frankenstein.desc=游荡在万圣大殿的未完成人偶,据说制作它们的主人因为它们失败的外型和缓慢的速度最终抛弃了它们。它们已经陷入了癫狂之中,会寻找一切活着的生命,并撕碎他们的灵魂。 + +actors.mobs.hollow.hollowmimic.minames=南瓜灯 +actors.mobs.hollow.hollowmimic.midescs=古堡中随处可见的南瓜灯,你能看见它正在对你微笑,这让你不免毛骨悚然。 + +actors.mobs.hollow.hollowmimic.name=墙怪 +actors.mobs.hollow.hollowmimic.desc=墙怪也是拟态怪家族的一员,只不过,它们与它的宝箱怪近亲不同的地方在于它们并不喜欢用宝箱勾引冒险者上钩。\n\n它们更加喜欢让冒险家放松警惕时倚靠墙壁时吗,从背后来上一大口,使冒险者背后出现一个大的伤口,从而失血过多昏迷而死。 + +actors.mobs.blackmimic.name=暗金宝箱怪 +actors.mobs.blackmimic.desc=宝箱怪是一种能随意改变外形的魔法生物。在地牢里它们几乎一直以宝箱形态出现,因为这样总能吸引不防备的冒险者。\n\n暗金宝箱怪是在极度魔力紊乱下才会出现的极度危险的怪物。它们潜伏在暗影中等待猎物的到来…… + +actors.mobs.flowerslime.name=丛林繁花史莱姆 +actors.mobs.flowerslime.desc= 在丛林中随处可见的生物,原本应该是比较温顺的一种生物,可能是受到地牢诅咒影响,它们也开始主动袭击过往的人类。\n\n史莱姆的身体富有粘性,很显然,这个史莱姆身上沾满了这片地区的植物,也许上面还有些种子。 + +actors.mobs.olddm300.name=DM275-原型机 +actors.mobs.olddm300.desc=这台机器是DM300量产前,矮人王国研发的原型试验机,由于其较为笨重的原因,原型机已被废弃,你现在看见的这台应该是最后一台!\n\n在燃料耗尽前可以进行极大范围的远程攻击,在水面移动时可以进行自我修复并填装一定的燃料但会蒸发水面。血量低于一定比列后立刻吸收本层所有DM201的能量给自己生成护盾,同时被吸收能量的DM201也会立刻被关闭。 +actors.mobs.olddm300.notice=侦察到入侵者…… +actors.mobs.olddm300.defeated=系统能量不足,自动关…… +actors.mobs.olddm300.repair=自我修复 + + +actors.mobs.greenslting.name=绿野精灵 +actors.mobs.greenslting.desc=丛林中的植物精灵,对入侵者没有任何好感……也包括你!!! + +actors.mobs.npcs.pinkghost.name=粉色幽灵 +actors.mobs.npcs.pinkghost.desc=这个幽灵正在发出非常靓丽的光芒,在地牢中就像一盏希望的冥灯。这个幽灵的脸上露出了灿烂的笑容…… + +actors.mobs.npcs.ghostnpc.name=悲伤幽灵 +actors.mobs.npcs.ghostnpc.desc=这个幽灵几乎不能被看见。它看起来像是由一片无形的昏暗光斑和一张悲痛的面孔所组成的。 + +actors.mobs.npcs.pinkghostnpc.name=粉色幽灵 +actors.mobs.npcs.pinkghostnpc.desc=这个幽灵正在发出非常靓丽的光芒,在地牢中就像一盏希望的冥灯。这个幽灵的脸上露出了灿烂的笑容…… + +actors.mobs.npcs.pinkghost.hello=你好呀,冒险家,啊,请不要害怕我,我曾经也是你们的一员。 +actors.mobs.npcs.pinkghost.hello_1=你能帮我一个忙吗?在这层地牢里有个隐藏的花园,在哪里我记不太清了,总之,里面有一朵白色的玫瑰,那是前一段时间我种下的,现在应该已经开花了。说起来,在地牢里收集玫瑰种子真不容易。另外,在那个花园有一些游走的幽灵,它们与我不一样,它们是可怕的怨灵。 +actors.mobs.npcs.pinkghost.hello_2=你可以帮我找回那朵花吗?如果可以的话,我这里有些可能有用的东西,到时候就和你交换好了。 +actors.mobs.npcs.pinkghost.hello_3=如果你后面准备好了,就再次和我对话,我会使用我的力量让你前往那里的。 +actors.mobs.npcs.pinkghost.good_desc=啊呀,谢谢你,我还以为我再也见不到这朵玫瑰了呢。\n\n把玫瑰给我吧,给你的东西我已经带过来了,希望对你接下来的旅途能有所帮助。 +actors.mobs.npcs.pinkghost.why_red=你已经回来了,但你这里并没有白玫瑰,你丢掉它了吗? +actors.mobs.npcs.pinkghost.giverose=给予白玫瑰 +actors.mobs.npcs.pinkghost.givemoon=给予小月饼 +actors.mobs.npcs.pinkghost.whatmoon=啊拉,谢谢你,幽灵是不用吃月饼的,你的心意我就收下了。 +actors.mobs.npcs.pinkghost.moonname=等等,这个月饼......上面为什么会有我的名字?\n\n什么,是一个幽灵给你的?难道他......他真的...... +actors.mobs.npcs.pinkghost.moonlost=粉色的幽灵带着月饼消失了...... +actors.mobs.npcs.pinkghost.goodluck=祝你一路顺风,冒险家! +actors.mobs.npcs.pinkghost.not_sorry=抱歉,冒险家,让你看见了我伤心的样子...... +actors.mobs.npcs.pinkghost.not_sorry_1=我之前说过,我也是冒险家,不过在我进地牢前就已经放弃了冒险家的身份了。我之所以在地牢里变成这副样子,是为了我的爱人。 +actors.mobs.npcs.pinkghost.not_sorry_2=我的爱人准备与我结婚前最后完成一件任务,我记得是在地牢浅层收集材料。可是过了好几天也不见他回来,我很着急,但是没有冒险家协会的许可或冒险家的担保的话是无法进入地牢的,所以我找到了_罗伦斯_,他是一名矮人工匠,也不是冒险家协会的成员。但是,他帮我找到了一条能够避开守卫的路,最终,我们成功进入了地牢。 +actors.mobs.npcs.pinkghost.not_sorry_3=进入地牢后,罗伦斯便不知所踪,我只得一个人探索。\n\n但是,我没能在前几层找到他,我猜想可能是他去到了更深的地方,便继续探索,直到我最终不幸倒在了毒气里......但是万幸,有位穿棕色斗篷的人救了我,只是我的肉体受伤太严重,他只得先冰封我的肉体,让我以灵魂姿态继续游荡在这黑暗的地牢......可是,我还是没能寻到他的线索。我便猜想,我可能太着急了,他应该早就回去了,只是先去旁边的镇子休整两天而已。可是,我已经没法再回头了。 +actors.mobs.npcs.pinkghost.not_sorry_4=既然你从一位幽灵那里拿到了这块月饼,那说明他也遭遇了不测......但我还会继续寻找他的。哪怕我们再也无法回到地面,再也无法像以前一样相拥而眠,再也无法笨拙地给对方烤制不知道什么馅的月饼,我也会寻找他的。 +actors.mobs.npcs.pinkghost.talk_desc=我相信他还在那里等我。\n\n总之,谢谢你。\n\n对了,这些东西忘记给你了,真诚的希望能帮上你的忙。\n\n白玫瑰就留给你做纪念了…… +actors.mobs.npcs.pinkghost.givego=收下物品 +actors.mobs.npcs.pinkghost.take=他就在这里! +actors.mobs.npcs.pinkghost.whathere=啊,他不在这里的。谢谢你安慰我…… +actors.mobs.npcs.pinkghost.rose=等等,这是......我送他的玫瑰!这么久了,竟然还没枯死吗......\n\n难道,他,他就在这附近? + +actors.mobs.npcs.pinkghost.love&love=他们以不存在的形体再次拥抱在一起。白玫瑰和红玫瑰轻轻地从他们手中落下。一种说不上来的情感布满了你的心头。 + +actors.mobs.npcs.ghostnpc.love=亲爱的,是我..... +actors.mobs.npcs.pinkghost.oh_no=天啊!你......你怎么也变成这副模样了? +actors.mobs.npcs.ghostnpc.sorry=对不起,我......疏忽了。 +actors.mobs.npcs.pinkghost.linklove=不,该说抱歉的是我,我应该和你一起去的...... + +actors.mobs.npcs.pinkghost.thanks=冒险家,我非常感谢您的帮助。 +actors.mobs.npcs.pinkghost.thanks_1=没有你,我无法和我的爱人重逢。 +actors.mobs.npcs.pinkghost.thanks_2=我的救命恩人在召唤我了,我的爱人也会和我一起去见祂。 +actors.mobs.npcs.pinkghost.thanks_3=或许在今后的轮回旅途中,我和你以及我的爱人见面次数会更少。但请告诉轮回中的他,我一直都在他旁边。 +actors.mobs.npcs.pinkghost.thanks_4=再见,%s。 +actors.mobs.npcs.pinkghost.thanks_5=它们消失在了空气中,只有一束白玫瑰和红玫瑰并发着红色光芒见证它们的挚爱之情…… + +actors.mobs.bluewraith.name=蓝色怨灵 +actors.mobs.bluewraith.desc=这个怨灵曾经与你一样都是地牢的佼佼者,由于一些原因被困在了这里,并最终迎接了死亡…… + actors.mobs.spical.gnollhero.name=豺狼部族长老 actors.mobs.spical.gnollhero.desc=与其他豺狼不同的是,它清楚最大的威胁不是冒险者。同时,它会使用古老的占卜魔法狩猎预知告知玩家即将要狩猎的稀有生物在何处。\n\n但它们并不是完全帮助冒险者,如果冒险者有出格的举动,部族长老会让冒险者知道”叛徒“的下场…… actors.mobs.spical.gnollhero.chat_1=哦,看看这是谁,这不是为了寻找水晶之心的冒险者吗? @@ -21,7 +102,7 @@ actors.mobs.bosses.sakafishboss.rankings_desc=成为了萨卡班甲鱼的食物 actors.mobs.bosses.dictfish.name=板足鲎 -actors.mobs.bosses.dictfish.desc=底栖顶级捕食者,他的巨鳌和巨颚可以碾碎你的铠甲。\n\n与_房角石_是共生互助,因此死后房角石会狂暴,获得的特殊攻击带有冲击,可以击退敌人造成大量伤害。 +actors.mobs.bosses.dictfish.desc=底栖顶级捕食者,他的巨鳌和巨颚可以碾碎你的铠甲。\n\n与_房角石_是共生互助,因此死后房角石会狂暴,获得的特殊攻击带有冲击,可以击退敌人造成大量伤害。且免疫火焰。 actors.mobs.bosses.dictfish.notice=板足鲎:大哥! actors.mobs.bosses.dictfish.death=大哥,接下来就交给你了! actors.mobs.bosses.dictfish.angry=板足鲎:大哥!该死的人类!我要你们付出代价! @@ -158,6 +239,8 @@ actors.buffs.nyctophobia.name4=静谧光束 actors.buffs.nyctophobia.name5=黑暗蚕食 actors.buffs.nyctophobia.name6=寂灭若寞 +actors.buffs.nyctophobia.ondeath=无尽的黑暗涌入了你的意识,你最终被黑暗拖入了深渊... + actors.buffs.nyctophobia.desc=灯火一路向前,你信心满满。 actors.buffs.nyctophobia.desc2=灯火摇曳不定,但你仍然无所畏惧。 actors.buffs.nyctophobia.desc3=灯火开始变得更加微弱,你开始对自己的信心产生了怀疑。 @@ -366,8 +449,8 @@ custom.testmode.mobplacer.elite_name9=失败体 custom.testmode.mobplacer.elite_name10=爆炸体 custom.testmode.mobplacer.elite_name11=完全体 custom.testmode.mobplacer.elite_name12=危险体 -custom.testmode.mobplacer.elite_name13=烟雾体 -custom.testmode.mobplacer.elite_name14=酸液体 +custom.testmode.mobplacer.elite_name13=酸液体 +custom.testmode.mobplacer.elite_name14=烟雾体 custom.testmode.mobplacer.elite_name15=[友好[ @@ -415,6 +498,7 @@ custom.testmode.levelteleporter.ac_view = 探查 custom.testmode.levelteleporter.ac_teleport = 传送 custom.testmode.levelteleporter.cannot_send= 无法移动。不能在楼层封锁时移动,以及不能移动出这个地牢。 custom.testmode.levelteleporter.ac_interlevel_tp = 返回 +custom.testmode.levelteleporter.ac_reset = 重置 custom.testmode.levelteleporter.interlevel_teleport_title = 选择传送楼层 custom.testmode.levelteleporter.interlevel_teleport_go = 前往_%d_层 @@ -426,6 +510,42 @@ custom.testmode.mobplacer.forbidden=你不能在这里放置怪物。 custom.testmode.mobplacer.prompt=选择目标地点 custom.testmode.mobplacer.elite=精英词缀数量 +custom.testmode.spawnweapon.name=武器生成秘卷 +custom.testmode.spawnweapon.desc=生成需要的武器以及属性。\n\n原作者:Alexstrasza\n\n复刻者:潘多拉\n\n优化者:KDSALing +custom.testmode.spawnweapon.ac_spawn=生成 +custom.testmode.spawnweapon$weaponsetting.weapon_tier=武器阶数 +custom.testmode.spawnweapon$weaponsetting.enchant=附魔 +custom.testmode.spawnweapon$weaponsetting.current_enchant=_当前附魔:%s_ +custom.testmode.spawnweapon$weaponsetting.no_enchant=_无附魔_ +custom.testmode.spawnweapon$weaponsetting.enchant_rarity=附魔种类 +custom.testmode.spawnweapon$weaponsetting.enchant_id=附魔编号 +custom.testmode.spawnweapon$weaponsetting.cursed=诅咒物品 +custom.testmode.spawnweapon$weaponsetting.select_weapon=尚未选择武器 +custom.testmode.spawnweapon$weaponsetting.weapon_level=自定义武器等级 +custom.testmode.spawnweapon$weaponsetting.weapon_level_desc=输入要生成的武器的等级,非数字会被自动处理,同时也不能超过6666级 +custom.testmode.spawnweapon$weaponsetting.weapon_level_error=必须选择武器才能打开等级设定界面! +custom.testmode.spawnweapon$weaponsetting.create=生成武器 +custom.testmode.spawnweapon$weaponsetting.enchant_text = 请先选择附魔种类,然后会出现对应的编号。\n\n通过下方滑块滑动选择对应的编号即可。 +custom.testmode.spawnweapon$weaponsetting.confirm=确定 +custom.testmode.spawnweapon$weaponsetting.cancel=取消 + +custom.testmode.spawnarmor.name=护甲生成秘卷 +custom.testmode.spawnarmor.desc=生成需要的护甲以及属性。\n\n原作者:Alexstrasza\n\n复刻者:潘多拉\n\n优化者:KDSALing +custom.testmode.spawnarmor.ac_spawn=生成 +custom.testmode.spawnarmor$armorsetting.enchant=附魔 +custom.testmode.spawnarmor$armorsetting.current_enchant=_当前附魔:%s_ +custom.testmode.spawnarmor$armorsetting.no_enchant=_无附魔_ +custom.testmode.spawnarmor$armorsetting.enchant_rarity=附魔种类 +custom.testmode.spawnarmor$armorsetting.enchant_id=附魔编号 +custom.testmode.spawnarmor$armorsetting.cursed=诅咒物品 +custom.testmode.spawnarmor$armorsetting.select_armor=尚未选择护甲 +custom.testmode.spawnarmor$armorsetting.armor_level=自定义护甲等级 +custom.testmode.spawnarmor$armorsetting.armor_level_desc=输入要生成的护甲的等级,非数字会被自动处理,同时也不能超过6666级 +custom.testmode.spawnarmor$armorsetting.armor_level_error=必须选择护甲才能打开等级设定界面! +custom.testmode.spawnarmor$armorsetting.create=生成护甲 +custom.testmode.spawnarmor$armorsetting.enchant_text = 请先选择附魔种类,然后会出现对应的编号。\n\n通过下方滑块滑动选择对应的编号即可。 +custom.testmode.spawnarmor$armorsetting.confirm=确定 +custom.testmode.spawnarmor$armorsetting.cancel=取消 actors.buffs.sanity.bad=我感觉我不太好…… actors.buffs.sanity.tobad=理智过低了会死吗? @@ -768,18 +888,18 @@ actors.mobs.npcs.ren.message2=你好,我是REN-33!我是唯一的个体……, actors.mobs.npcs.ren.message3=猎枪击毙了穹顶天上的椋鸟群落,此时即可眺望繁星、即可观测天津星肆、即可瞭望海之灯塔,为之祈祷。 actors.mobs.npcs.ren.def_verb=随机应变 -actors.mobs.npcs.goonpc.name=粘咕-天痕座 +actors.mobs.npcs.goonpc.name=粘咕 -actors.mobs.npcs.slyl.name=冷群 -actors.mobs.npcs.slyl.message1=我叫冷群,这是我的真名。 +actors.mobs.npcs.slyl.name=冷 +actors.mobs.npcs.slyl.message1=你好!冒险家! actors.mobs.npcs.slyl.message2=地牢最深处的黑暗……似乎有点忘记了。但据说最近有冒险者在地牢新发现了一批特别的书籍,它们或多或少都沾染过魔法。 actors.mobs.npcs.slyl.message3=地牢已经有成千上万的冒险者为了“水晶之心”而前往,但没有一个人回来……我不清楚他的做法是否正确,但风暴就要到来了……我们别无选择,我们只能继续这样…… actors.mobs.npcs.slyl.tips=温馨提示:Boss终端暂时被禁用,敬请期待后续版本。 actors.mobs.npcs.slyl.readbooks=温馨提示:教程书籍正在翻修,敬请期待后续版本。 actors.mobs.npcs.slyl.def_verb=风暴将临 -actors.mobs.npcs.slyl.desc=_冷群_是一位掌握冰系力量的魔女,是300年前_寒冰圣都_的管理者。\n由于地下异常的不断出现,她来到这里调查异常的原因。\n看起来她似乎正在摸鱼。 -actors.mobs.npcs.slyl.howuse=你好,我是冷群。\n\n欢迎使用我们_寒冰圣都_的可以扰乱_魔力流_的_魔法金币_,通过它我们可以看见_特定的首领_。\n\n其中_抛动一次_会出现_天痕粘咕(5层),天狗(10层),DM300(15层),矮人国王(20层),Yog(25层)_\n]抛动两次]是_史莱姆王(5层),钻石宝箱王(10层),DM720(15层),矮人将军(20层),Yog-Zot(25层)_\n[抛动三次[是_(15层 寒冰魔女)_(抛动三次次仅在_特定楼层显示_)\n\n同时,仅在Boss前一楼层显示,每一次的最后的一次抛动将会决定下一层Boss的生成。\n\n好的,以上就是_使用方法和介绍了_,祝你_地牢冒险愉快_。 +actors.mobs.npcs.slyl.desc=_冷_是一位掌握冰系力量的魔女,是300年前_寒冰圣都_的管理者。\n由于地下异常的不断出现,她来到这里调查异常的原因。\n看起来她似乎正在摸鱼。 +actors.mobs.npcs.slyl.howuse=你好,我是冷。\n\n欢迎使用我们_寒冰圣都_的可以扰乱_魔力流_的_魔法金币_,通过它我们可以看见_特定的首领_。\n\n其中_抛动一次_会出现_天痕粘咕(5层),天狗(10层),DM300(15层),矮人国王(20层),Yog(25层)_\n]抛动两次]是_史莱姆王(5层),钻石宝箱王(10层),DM720(15层),矮人将军(20层),Yog-Zot(25层)_\n[抛动三次[是_(15层 寒冰魔女)_(抛动三次次仅在_特定楼层显示_)\n\n同时,仅在Boss前一楼层显示,每一次的最后的一次抛动将会决定下一层Boss的生成。\n\n好的,以上就是_使用方法和介绍了_,祝你_地牢冒险愉快_。 actors.mobs.npcs.renshop.guards=看来你并不是好人。 actors.mobs.npcs.renshop.thief=看来你的命运多舛。 @@ -840,7 +960,7 @@ actors.mobs.slimeking.name=史莱姆王子 actors.mobs.slimeking.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。[设计原型:泰拉瑞亚] actors.mobs.spical.slimekingmob.name=史莱姆王子 -actors.mobs.spical.slimekingmob.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。[设计原型:泰拉瑞亚] +actors.mobs.spical.slimekingmob.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。\n\n怪物设计原型:泰拉瑞亚 actors.mobs.slimeking.notice=你清楚你在与谁抗衡吗? actors.mobs.slimeking.defeated=不……这不可能…… @@ -1091,7 +1211,7 @@ actors.buffs.championenemy$longsider.name=突变烟雾体 actors.buffs.championenemy$longsider.desc=攻击力减少10%,攻击范围+2,攻击敌人10%概率造成眩晕……\n\n突变烟雾体喜好在远处骚扰敌人,他就像烟雾一样来无影去无踪…… actors.buffs.championenemy$sider.name=突变酸液体 -actors.buffs.championenemy$sider.desc=该词条的敌人获得远程攻击,攻击范围+6,造成自身可造成的伤害20%的额外法术伤害并有概率随机产生一种有害烟雾。\n\n突变酸液体喜欢使用酸液来攻击敌人,他们的酸液不稳定性可以造成大量伤害,但是这种致命的酸液需要时间来准备,因此他们的攻击速度会降低_200%_。 +actors.buffs.championenemy$sider.desc=该词条的敌人获得远程攻击,攻击范围+2,造成自身可造成的伤害20%的额外法术伤害并有概率随机产生一种有害烟雾。\n\n突变酸液体喜欢使用酸液来攻击敌人,他们的酸液不稳定性可以造成大量伤害,但是这种致命的酸液需要时间来准备,因此他们的攻击速度会降低_300%_。\n\n部分敌人突变为酸液体还会进行多次连击造成巨额伤害。 actors.buffs.charm.name=魅惑 @@ -1792,6 +1912,7 @@ actors.mobs.npcs.blacksmith.completed=噢,你终于回来了… 算了,总 actors.mobs.npcs.blacksmith.get_lost=我忙着呢。滚开! actors.mobs.npcs.blacksmith.same_item=选择2个不一样的,不是2次一样的! actors.mobs.npcs.blacksmith.diff_type=选择2个相同类型的物品! +actors.mobs.npcs.blacksmith.oil=这是什么垃圾?!我不能帮你合成这玩意! actors.mobs.npcs.blacksmith.un_ided=我得知道我在拿什么干活,先鉴定! actors.mobs.npcs.blacksmith.cursed=我可不碰诅咒的东西! actors.mobs.npcs.blacksmith.degraded=这简直就是个垃圾,质量太差了! @@ -1839,6 +1960,9 @@ actors.mobs.npcs.ratking.not_sleeping=我可不是在睡觉! actors.mobs.npcs.ratking.what_is_it=你这是想干什么?我可没时间管这些破事。我的王国可不会自己运转下去! actors.mobs.npcs.ratking.confused=这……我这是在哪?我的王国需要我! actors.mobs.npcs.ratking.crown_clothes=把衣服穿上!会见皇室的礼仪都不懂吗! + +actors.mobs.npcs.ratking.what=把这件衣服取下!皇室血脉的我发现这件衣服上面有未知的魔力,它与我的力量所排斥!你无法通过这件%1$s让我与你交换。 + actors.mobs.npcs.ratking.crown_desc=哇,那个皇冠是要给本王的吗!?它看上去比我的皇冠更闪更亮,那我就好心好意地接受了!\n\n当然,我堂堂鼠王也不会白拿的。作为交换,本王能赐你一项配得上「英雄」之称的强大能力!怎么样?要不要? actors.mobs.npcs.ratking.crown_yes=当然了! actors.mobs.npcs.ratking.crown_info=我愿闻其详。 @@ -1928,8 +2052,8 @@ actors.mobs.brute$bruterage.desc=这个豺狼暴徒的死亡已经不可避免 actors.mobs.causticslime.name=蚀化史莱姆 actors.mobs.causticslime.desc=这个史莱姆似乎已经被下方渗透的黑暗能量完全侵蚀了。它已经失去了体表原有的绿色光泽,并且在不断滴落腐蚀污泥。 -actors.mobs.crab.name=密林螃蟹 -actors.mobs.crab.desc=这些巨型的螃蟹位居密林食物链的顶端。它们行动极其迅速且其厚重的甲壳能承受沉重的打击。 +actors.mobs.crab.name=丛林螃蟹 +actors.mobs.crab.desc=这些巨型的螃蟹位居丛林食物链的顶端。它们行动极其迅速且其厚重的甲壳能承受沉重的打击。 actors.mobs.crystalmimic.name=水晶宝箱怪 actors.mobs.crystalmimic.ate=水晶宝箱怪吃掉了你的%s! @@ -2009,14 +2133,19 @@ actors.mobs.ghoul.name=矮人尸群 actors.mobs.ghoul.desc=在矮人王国逐渐衰亡,现在的矮人国王掌握了绝对的权力时,一些较为弱小的或是反抗国王的矮人受到了不公的待遇。然而随着矮人国王逐渐精通黑暗魔法,这些矮人逐渐屈从于其意志,并最终沦为了其大军中的一枚棋子。\n\n矮人尸群中的个体本身没有强大的战斗力,但它们总是结伴作战,试图利用数量优势击败强大的对手。_一名矮人尸群成员被击倒时,如果周围仍有其他同类,它将会在几回合后重生_。 actors.mobs.gnoll.name=豺狼巡查 -actors.mobs.gnoll.desc=豺狼是鬣狗状的类人生物。它们在密林和地牢里游荡,不时向上行动试图向地表发起进攻。豺狼巡查是它们种群里最普通的一员,它们既没有豺狼暴徒强壮,也赶不上萨满聪明。 +actors.mobs.gnoll.desc=豺狼是鬣狗状的类人生物。它们在丛林和地牢里游荡,不时向上行动试图向地表发起进攻。豺狼巡查是它们种群里最普通的一员,它们既没有豺狼暴徒强壮,也赶不上萨满聪明。 actors.mobs.gnolltrickster.name=豺狼诡术师 actors.mobs.gnolltrickster.desc=即使以豺狼人的标准来看,这个生物也非常的诡异。它佝偻着腰,鬼鬼祟祟地行进着,大嘴咧开,露出邪恶的笑容,肩上挂着的挎包鼓得同摇篮一般。它的瞳孔中混杂着恐惧与兴奋。\n\n它的挎包里有一大批粗制滥造的飞镖,它们似乎包含着各种有害物质。 +#actors.mobs.1r.name=兽型猎人 +#actors.mobs.1r.desc=半人半兽的残暴生物。\n\n他曾是一名正常的赏金猎人。地牢中的恐怖之物将他侵蚀,在他意识溃散殆尽后,这里只有仅存癫狂的人形野兽。 + actors.mobs.goldenmimic.name=金色宝箱怪 actors.mobs.goldenmimic.desc=宝箱怪是一种能随意改变外形的魔法生物。在地牢里它们几乎一直以宝箱形态出现,因为这样总能吸引不防备的冒险者。\n\n金色宝箱怪是试图吸引顶尖冒险者的强大宝箱怪。它们拥有更丰厚的财宝,但相对通常的宝箱怪也更为强大。 + + actors.mobs.golem.name=魔像 actors.mobs.golem.def_verb=格挡 actors.mobs.golem.desc=魔像是矮人们试图利用魔法的新应用弥补机械设备长久以来的缺陷的产物。它们虽不似DM-300那样庞大笨重,但仍具有不可小觑的破坏力。\n\n魔像因体型过大无法进入过道,但矮人们赋予了魔像魔力来弥补这一点——魔像能在各个房间之间传送,并能将无法触及的敌人从远处拉回来。 @@ -2029,16 +2158,16 @@ actors.mobs.goo.pumpup=粘咕正在不断地抽动! actors.mobs.goo.enraged=激怒 actors.mobs.goo.gluuurp=咕——————! actors.mobs.goo.rankings_desc=被粘咕消化 -actors.mobs.goo.desc=我们对粘咕所知甚少。它甚至很有可能不是一个生物,而是密林表面聚集的邪恶物质得到基本智能而产生的实体。不管怎样,很明显是黑暗魔法造就了这个生物。\n\n其凝胶性质让它吸收了很多黑暗能量,你光是靠近就感受到了一股寒意。如果粘咕使用这种能量对你进行攻击那你肯定支撑不了多久。 +actors.mobs.goo.desc=我们对粘咕所知甚少。它甚至很有可能不是一个生物,而是丛林表面聚集的邪恶物质得到基本智能而产生的实体。不管怎样,很明显是黑暗魔法造就了这个生物。\n\n其凝胶性质让它吸收了很多黑暗能量,你光是靠近就感受到了一股寒意。如果粘咕使用这种能量对你进行攻击那你肯定支撑不了多久。 actors.mobs.spical.goomob.name=粘咕 -actors.mobs.spical.goomob.desc=我们对粘咕所知甚少。它甚至很有可能不是一个生物,而是密林表面聚集的邪恶物质得到基本智能而产生的实体。不管怎样,很明显是黑暗魔法造就了这个生物。\n\n其凝胶性质让它吸收了很多黑暗能量,你光是靠近就感受到了一股寒意。如果粘咕使用这种能量对你进行攻击那你肯定支撑不了多久。 - +actors.mobs.spical.goomob.desc=我们对粘咕所知甚少。它甚至很有可能不是一个生物,而是丛林表面聚集的邪恶物质得到基本智能而产生的实体。不管怎样,很明显是黑暗魔法造就了这个生物。\n\n其凝胶性质让它吸收了很多黑暗能量,你光是靠近就感受到了一股寒意。如果粘咕使用这种能量对你进行攻击那你肯定支撑不了多久。 +actors.mobs.spical.goomob.notice=给我过来!曾经的敌人! actors.mobs.greatcrab.name=巨大螃蟹 actors.mobs.greatcrab.noticed=巨型螃蟹用它硕大的钳子格挡了这次攻击。 actors.mobs.greatcrab.def_verb=格挡 -actors.mobs.greatcrab.desc=这只螃蟹的块头相当大,甚至超过了其他的密林螃蟹。它的蓝色甲壳上布满了裂纹和藤壶,足以证明其经历的无数岁月。它爬行缓慢,那只巨大的钳子让它难以保持平衡。\n\n尽管这螃蟹只剩下一边的钳子,但钳子的个头完全弥补了这点不足。螃蟹只要发现危险就会把爪子举在身前,利用坚不可摧的甲壳进行防御。不过螃蟹无法格挡未察觉的攻击,也无法同时格挡多个敌人的进攻。 +actors.mobs.greatcrab.desc=这只螃蟹的块头相当大,甚至超过了其他的丛林螃蟹。它的赤色甲壳上布满了裂纹和藤壶,足以证明其经历的无数岁月。它爬行缓慢,那只巨大的钳子让它难以保持平衡。\n\n尽管这螃蟹只剩下一边的钳子,但钳子的个头完全弥补了这点不足。螃蟹只要发现危险就会把爪子举在身前,利用坚不可摧的甲壳进行防御。不过螃蟹无法格挡未察觉的攻击,也无法同时格挡多个敌人的进攻。 actors.mobs.guard.name=监狱守卫 actors.mobs.guard.scorpion=给我过来! @@ -2087,7 +2216,7 @@ actors.mobs.pylon.desc_inactive=这是一座用于分配区域内机械用电的 actors.mobs.pylon.desc_active=这是一座用于分配区域内机械用电的能量塔。此刻能量塔电能涌动,定是它正在为DM-300充能!\n\n这时的能量塔可被摧毁,却会顺时针向四周释放电弧。厚重的金属结构为其提供了强劲的防御。 actors.mobs.rat.name=啮齿小鼠 -actors.mobs.rat.desc=虽说啮齿小鼠们具有攻击性,可它们依旧是密林居民里的弱者。它们的啮咬非常烦人,但只有数量巨大时才会有生命威胁。 +actors.mobs.rat.desc=虽说啮齿小鼠们具有攻击性,可它们依旧是丛林居民里的弱者。它们的啮咬非常烦人,但只有数量巨大时才会有生命威胁。 actors.mobs.ripperdemon.name=恶魔撕裂者 actors.mobs.ripperdemon.leap=恶魔撕裂者正准备扑杀! @@ -2123,9 +2252,9 @@ actors.mobs.skeleton.desc=骷髅是从那些悲惨的冒险者及地牢原住民 actors.mobs.slime.name=史莱姆 actors.mobs.slime.def_verb=格挡 -actors.mobs.slime.desc=史莱姆是一种具有胶质外形与液态内核的奇特魔法生物。城市的密林为它们提供了充分的水源和富足的养分。\n\n史莱姆的外层胶膜具有极强的弹性,这使得任何单次攻击都难以对它们造成超过_6点的伤害_。 +actors.mobs.slime.desc=史莱姆是一种具有胶质外形与液态内核的奇特魔法生物。城市的丛林为它们提供了充分的水源和富足的养分。\n\n史莱姆的外层胶膜具有极强的弹性,这使得任何单次攻击都难以对它们造成超过_6点的伤害_。 -actors.mobs.snake.name=密林巨蛇 +actors.mobs.snake.name=丛林巨蛇 actors.mobs.snake.hint=试试点击检查按钮再选择蛇,以了解如何击败它们。 actors.mobs.snake.desc=这些体型庞大的蛇能通过快速滑行以闪避普通的攻击,让它们难以命中。不过伏击与魔法攻击会使它们措手不及。\n\n在这条蛇的视野外攻击它时可以触发伏击。当这条蛇在追击你时,可以尝试躲入一扇门后,再_在蛇进门的瞬间发动攻击_。 @@ -2153,6 +2282,12 @@ actors.mobs.tengu.defeated=终于...我解脱了... actors.mobs.tengu.rankings_desc=被天狗暗杀 actors.mobs.tengu.desc=一位著名的神秘皇家刺客,其名源于她脸上面具的蚀刻。\n\n天狗的手腕和膝下都带着镣铐,但她似乎很久以前就摆脱掉了锁链的束缚。\n\n她将利用陷阱、欺骗性的魔法、精准致命的攻击,来消灭唯一能阻止她逃脱的人:你。 +actors.mobs.tengu.cut_you=天狗突然出现在你面前! +actors.mobs.tengu.cut_you2=%s,我已经在此等候多时了!接招! +actors.mobs.tengu.rose=突然间,一张玫瑰结界在你面前展开....... +actors.mobs.tengu.ready=好,%s,你的反应力不错,那么,让我来见识见识你的利爪! + + actors.mobs.tengu$bombability$bombblob.desc=这里翻滚着一片过热的烟尘。当心,要爆炸了! actors.mobs.tengu$bombability$bombitem.name=烟尘炸弹 actors.mobs.tengu$bombability$bombitem.cant_pickup=它固定在地面上,你无法搬动它! @@ -2226,6 +2361,14 @@ actors.mobs.yogfist$darkfist.name=暗影之拳 actors.mobs.yogfist$darkfist.teleport=暗影之拳在一片使你光源熄灭的漆黑中传送到了别处! actors.mobs.yogfist$darkfist.desc=暗影之拳是由纯粹的暗能量形成的。它能在每回合射出强大的暗黑法术!这些法术除了造成大量伤害外,还会削弱你的光源。暗影之拳为了逃脱还能瞬间使全场陷入一片漆黑!\n\n暗影之拳在近战中并没有特殊能力。 +actors.mobs.yogfist$freezingfist.name=寒冰之拳 +actors.mobs.yogfist$freezingfist.desc=寒冰之拳催生于地牢的冰寒之气,它能够施展魔法能量,每隔3回合释放出冻伤的力量。\n\n_寒冰之拳常与鬼磷之拳一同行动。当鬼磷之拳存在时,寒冰之拳将不会受到任何与火有关的伤害。_ +actors.mobs.yogfist$halofist.name=鬼磷之拳 +actors.mobs.yogfist$halofist.desc=鬼磷之拳的诞生源自无数冒险者的尸体聚集,古神巧妙地利用这股怨气创造了这个怪物。\n\n鬼磷之拳足迹所及之处,将留下熠熠发光的磷火,同时水分也会被蒸发殆尽。\n\n此外,若鬼磷之拳的生命力渐趋微弱且战斗持续时间过长,它还会定期借助亡灵的诅咒释放一道道激光来对你进行攻击。这些激光充满邪恶之力,将给你带来巨大的威胁。\n\n_鬼磷之拳通常与寒冰之拳一起行动。_ + +actors.mobs.yogfist.halofist=鬼磷之拳已被击败,寒冰之拳的免疫火焰效果已失效。 + + actors.char.kill=%s杀害了你… actors.char.defeat=你击败了%s。 diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 5c9ab1ee9..b92bf174e 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -1,5 +1,31 @@ ####MLPD-P3文本 +### 特别武器 + +items.weapon.melee.icedewvialsword.name=露水神剑-冰 +items.weapon.melee.icedewvialsword.desc=WIP + +items.quest.red.name=白玫瑰 +items.quest.red.desc=在这危险而阴森的地牢中,这朵白玫瑰仿佛刺破了周遭的黑暗,向你展示着名为“人文”的力量。 +items.quest.red.ac_interlevel_tp=返回 + +items.potions.potionofpurity$potionofpurityling.name=毒气中和药剂 +items.potions.potionofpurity$potionofpurityling.desc=从骸骨中翻出的药剂,你突然明白过来,曾经有一批更早的冒险家来过这里。然而很不幸,他们没能幸存下来。\n\n这瓶毒气中和药剂是其他冒险家提取丛林的植物精华制作而成,它可以中和丛林最深处的危险毒气。\n\n希望你能继承其他冒险家的精神与意志,将丛林的毒瘤斩草除根! + +items.quest.devitem.crystalling.name=水晶项链 +items.quest.devitem.crystalling.desc=这个紫色项链下挂着一块蓝紫色的琉璃,当光线透过水晶,水晶的中间仿佛也亮堂了起来。\n\n根据历史记载,翼绫使用圣洁之心创造了世界,将其一半力量分给了三使者后,又让他们将另一半铸造为水晶之心。\n\n圣洁之心并没有常规意义上的实体,尽管没有人真正见过水晶之心,但人们还是按照传说中的模样复制出了这个项链。\n\n他们在翼绫的生日这天制造这种水晶项链,以此寻求着创世神的祝福。至少他们也在用自己的方式寻求着自己的未来。\n\n你知道这块水晶并不能给你带来什么,但是,当你握住这块水晶时,你仍然感觉心里踏实了许多。 + +items.quest.devitem.crystalling.active=\n\n此为MLPD制作团队主要开发者-Ling生日物品\n\n有效加成时间:8.22-8.25(阴历) +items.quest.devitem.crystalling.end=\n\n开发者Ling的生日活动已经结束,该物品的所有额外加成全部失效。 +items.quest.devitem.crystalling.last=\n\n今天是水晶项链的有效期最后一天,切勿错失使用良机。 + +items.quest.redwhiterose.name="一种载体" +items.quest.redwhiterose.desc=他们从未离开,这两束玫瑰配不上他们。\n\n情感无需载体,意志无需证明。\n\n而你也不曾放弃。 + +items.weapon.melee.fiveren.name=五仁月饼 +items.weapon.melee.fiveren.stats_desc=这是一件相当缓慢的武器。\n这把武器有额外的攻击距离。\n该武器有概率腐化敌人。 +items.weapon.melee.fiveren.desc=中秋佳节,祝各位玩家节日快乐。\n\n月饼在古代由来已久,其实月饼最初的原型叫“饼饵”。\n贾公谚:“以酒燚为饼,若今起胶饼”,中秋食月饼的记载多始见于明清时。\n明人田汝成在《西游览志余》中说:“八月十五谓之中秋,民间以月饼遗,取团圆之意。”因古人称中秋为“团圆节”,所以月饼又称“团圆饼”。\n明清时,中秋食月饼的风俗已相当盛行,清人富察敦崇在《燕京岁时记》中说:“中秋月饼,以前门致美斋者为京师第一,他处不足食也。至供月饼,到处皆有,大者尺余,上绘月宫蟾兔之形,有祭毕而食者,有留至除夕而食者,谓之团圆饼”。月饼除了是中秋佳节的必备食品外,还是馈赠亲友的节日礼物。\n\n随着时间的推移,月饼已由当初的家庭手工制作逐渐变成了一种专业化生产,品种不断增多,质量不断提高,明清时已发展成为传统的糕点形式。 + ### 传奇武器 items.weapon.melee.legend.legendweapon.typical_stats_desc=这是一件_%1$s阶_传奇武器,这件传奇武器的技能通常造成为:%2$s\n这个技能通常可以造成_%3$s~%4$s点伤害_。 @@ -54,7 +80,7 @@ items.quest.mime$gold_four.name=幽蓝碑文纪念章 items.quest.mime$gold_four.desc=不属于这个时间线的产物,自身散发出诡异的能量。幽蓝的碑文似乎记录了一些事情,但已无从查证。应该可以在商人那里兑换一定的金币。 items.quest.mime$gold_five.name=“创始神”之心 -items.quest.mime$gold_five.desc=为了纪念创世神,人们雕刻了这个了工艺品。如今早已没有人再去制作这个工艺品,也无人再记得她,这可能是现存的唯一真品了。你能感受到上面还残留了创世神的力量,卖给商人可以得到一个好价钱,但如果将它携带在背包中说不定能得到创世神的祝福。\n\n_携带该物品时,玩家治疗效果翻倍,且首次受到致命伤没十字架时无敌数回合,并进入创世神之怒状态。_ +items.quest.mime$gold_five.desc=为了纪念创世神,人们雕刻了这个了工艺品。如今早已没有人再去制作这个工艺品,也无人再记得她,这可能是现存的唯一真品了。你能感受到上面还残留了创世神的力量,卖给商人可以得到一个好价钱,但如果将它携带在背包中说不定能得到创世神的祝福。\n\n_携带该物品时,玩家治疗效果翻倍,且血量低于1/4时无敌数回合,并进入创世神之怒状态。(该物品总是优先于十字架之前触发)_ items.weapon.melee.lifetreesword.name=“倒悬的生命树” items.weapon.melee.lifetreesword.desc=克里弗斯之果破碎时,四周的藤蔓缠结在暴露出的种子上,形成剑的形状。剑身触碰到生物时会汲取他们的生命力提供给种子,期待着它再一结出猩红的果实。\n\n这是一个比较精准的武器。\n\n特别说明:克里弗斯之果Boss专武,每击杀_75只怪物_可以使用特殊武器技能,并重置杀敌计数。\n\n杀敌点数: @@ -101,12 +127,15 @@ items.lightblack.oilpotion.desc=里面蕴含了提灯需要的物质,在提灯 items.lightblack.oilpotion.ac_refill=装填 items.lightblack.oillantern.name = 提灯 -items.lightblack.oillantern.desc = 这盏来自硬化玻璃的提灯是暗无天日的地牢中不可缺少的物品。\n\n即使是在最黑暗的地牢里,这个简单的提灯也能照亮你的道路,只要你有油瓶来保持它的光亮。\n\n在你落寞的时候,她就是你身旁的最好归宿。 +items.lightblack.oillantern.desc = 这盏来自硬化玻璃的提灯是暗无天日的地牢中不可缺少的物品。\n\n即使是在最黑暗的地牢里,这个简单的提灯也能照亮你的道路,只要你有油瓶来保持它的光亮。\n\n在你落寞的时候,她就是你身旁的最好归宿。\n\n目前里面装填了_%1$s_个备用油瓶和_%2$s_个由火把转换的提灯火芯,这些可以补充提灯的灯油以保证它的光亮。 items.lightblack.oillantern.ac_light = 点亮 items.lightblack.oillantern.ac_snuff = 熄灭 items.lightblack.oillantern.ac_refill = 加油 items.lightblack.oillantern.ac_burn = 点燃 +items.lightblack.oillantern.lanternosoul=你陷入灵魂残缺的迷茫当中,因此无法引燃提灯。 +items.lightblack.oillantern.lantermostic=你已有其他光芒效果,在这些效果取消或主动失效前,暂时无法使用提灯的效果。 + items.lightblack.oillantern.lanterneedsx=你的提灯需要新的油瓶来加油。 items.lightblack.oillantern.lanterneedsxs=你的油瓶还未加入提灯中,请点击"加油"按钮 items.lightblack.oillantern.lanterdied=你的提灯忽隐忽现地熄灭了! @@ -183,8 +212,8 @@ items.scrolls.exotic.scrollofconfusion.desc=当阅读这张秘卷后,所有你 items.scrolls.exotic.scrollofpetrification.name=石化秘卷 items.scrolls.exotic.scrollofpetrification.desc=一道红色的诡异闪光将以恐惧压垮使用者视觉范围内生物的心智并使它们呆立在原地。 -items.weapon.enchantments.haloblazing.name=鬼磷%s -items.weapon.enchantments.haloblazing.desc=这个附魔会使磷火从武器中喷薄而出,能够使用点燃敌人并对正在燃烧的敌人造成中毒的额外伤害。 + + items.potions.exotic.potionofdragonkingbreath.name=龙王祝福合剂 items.potions.exotic.potionofdragonkingbreath.desc=瓶子内奇特的化合物来自于_龙王-磷邬_,会在接触武器,护甲后激发它们的力量(获得一种随机附魔),并迅速消散在空中,与此同时还会产生一个大范围的磷火区域。 @@ -273,50 +302,50 @@ items.books.bookslist.indexbooks.ac_read=打开看看 items.books.bookslist.yellowsunbooks.name=《朝阳教团史-Dr.BloodMoon纪年326年卷二》 -items.books.bookslist.yellowsunbooks.desc=此册编撰者以鲜血与性命示忠于原_地表势力_的领头者_朝阳教团_并承诺绝无欺骗 \n\n……但是在300年前的_那件事_发生后,_朝阳教团_因管理不利而渐渐衰落,从此便销声匿迹了,它原有的地位与名誉被_深渊魔都_和_极地圣境_两方势力所分食。\n\n两方的_管理者_携手封印了地牢的最深处的入口,并且对她进行了_水晶力量抑制_,于Dr.BloodMoon纪年17年她封印在了金城水晶实验室。\n\n……距封印之日已过去三百余年,随着她_力量的增强_,_水晶_已经开始_极不稳定_……\n\n……Dr.BloodMoon纪年326年四月中旬,一名_朝阳教团的残支_要求接见管理者……并且声称,朝阳教团可以帮助他们彻底_杀死她_…… -items.books.bookslist.yellowsunbooks.author=--作者:_Kiley-Alien_ +items.books.bookslist.yellowsunbooks.desc=此册编撰者以鲜血与性命示忠于原地表势力的领头者朝阳教团并承诺绝无欺骗 \n\n……但是在300年前的那件事发生后,朝阳教团因管理不利而渐渐衰落,从此便销声匿迹了,它原有的地位与名誉被深渊魔都和极地圣境两方势力所分食。\n\n两方的管理者携手封印了地牢的最深处的入口,并且对她进行了水晶力量抑制,于Dr.BloodMoon纪年17年她封印在了金城水晶实验室。\n\n……距封印之日已过去三百余年,随着她力量的增强,水晶已经开始极不稳定……\n\n……Dr.BloodMoon纪年326年四月中旬,一名朝阳教团的残支要求接见管理者……并且声称,朝阳教团可以帮助他们彻底杀死她…… +items.books.bookslist.yellowsunbooks.author=--作者:Kiley-Alien items.books.bookslist.yellowsunbooks.ac_read=阅读书籍 items.books.bookslist.yellowsunbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.yellowsunbooks.anmazing=你解读书中的奥秘,你领悟到了敌法的力量! items.books.bookslist.icecitybooks.name=《寒冰圣域游记》 items.books.bookslist.icecitybooks.desc=这是坐拥于曾经的寒冰地带的一座大型城市,似乎已经驱走了严寒的危机,而我现在就站在这里。\n现在由"一位神秘人"进行着管理。\n\n这里的人们都生活的悠哉游哉,似乎工作都是以享受的姿态去迎接的。在冬季的十二月月末下雪的日子,居民们还会举办大型的盛典来庆祝。\n\n似乎所有人都忘记了三百年前的那件事了…… -items.books.bookslist.icecitybooks.author=--作者:_LunRes_ +items.books.bookslist.icecitybooks.author=--作者:LunRes items.books.bookslist.icecitybooks.ac_read=阅读书籍 items.books.bookslist.icecitybooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.icecitybooks.anmazing=你解读书中的奥秘,你领悟到了烈焰的力量! items.books.bookslist.deepbloodbooks.name=《深渊魔都纪事录》 items.books.bookslist.deepbloodbooks.desc=本传仅作参考,可能包含大量个人想法。\n\n……魔都来了一位少女,她成功地将魔都再次复兴。……三天后,地牢调查团发来一则关于地牢深处强烈魔力流的报告。\n\n地牢第???层:\n魔力强度:DEAD\n采取措施:无\n危险评估:DEADNOBACK\n……以上评估报告仅供参考。 -items.books.bookslist.deepbloodbooks.author=--作者:_Dr.血月博士_ +items.books.bookslist.deepbloodbooks.author=--作者:Dr.血月博士 items.books.bookslist.deepbloodbooks.ac_read=阅读书籍 items.books.bookslist.deepbloodbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.deepbloodbooks.anmazing=你解读书中的奥秘,你领悟到了索敌的力量! items.books.bookslist.grasskingbooks.name=《绿林圣境守则》 -items.books.bookslist.grasskingbooks.desc=1.无论是天灾还是人祸,请不要感到害怕。我们有着足够的实力保护你们。\n\n2.请居民不要靠近_森色之庭_,那里是_地表势力_最高层的会议室\n\n……5.请带领刚出生的婴儿到_源色之泉_处进行洗礼,以获取魔力。\n\n……7.外来旅者或是移民请自觉忽略一切你所认为的_高傲、自大、冷酷、无情、自私、不平等_,在这里发生的一切都是正常的,不要试图去做出改变,学会融入我们。\n\n8.其他条例请等待_第十三次高层会议_的补充。 -items.books.bookslist.grasskingbooks.author=--作者:_牡丹洛华_ +items.books.bookslist.grasskingbooks.desc=1.无论是天灾还是人祸,请不要感到害怕。我们有着足够的实力保护你们。\n\n2.请居民不要靠近森色之庭,那里是地表势力最高层的会议室\n\n……5.请带领刚出生的婴儿到源色之泉处进行洗礼,以获取魔力。\n\n……7.外来旅者或是移民请自觉忽略一切你所认为的高傲、自大、冷酷、无情、自私、不平等,在这里发生的一切都是正常的,不要试图去做出改变,学会融入我们。\n\n8.其他条例请等待第十三次高层会议的补充。 +items.books.bookslist.grasskingbooks.author=--作者:牡丹洛华 items.books.bookslist.grasskingbooks.ac_read=阅读书籍 items.books.bookslist.grasskingbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.grasskingbooks.anmazing=你解读书中的奥秘,你领悟到了无畏的力量! items.books.bookslist.brokenbooks.name=《奇怪的档案袋》 items.books.bookslist.brokenbooks.desc=上面沾染了水渍与污垢,鲜红的“火灾案”几个大字以及标注着调查人员的表格也似乎是有点褪色了。\n\n幸存者:“火焰肆虐过这个地牢,吞噬了一切能被吞噬的东西……包括人类。这只有可能是魔法,是魔法引起的!”\n\n……我们的调查结果表面确实如此,焦黑的地板,卷轴残页,以及熔化的玻璃药瓶,基本排除了过失起火的可能。\n\n……α队员搜查到一枚熔融的金属袖章,里面似乎残存过火焰魔法。 -items.books.bookslist.brokenbooks.author=--作者:_不详_ +items.books.bookslist.brokenbooks.author=--作者:不详 items.books.bookslist.brokenbooks.ac_read=阅读书籍 items.books.bookslist.brokenbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.brokenbooks.anmazing=你解读书中的奥秘,你领悟到了英雄的力量! items.books.bookslist.magicgirlbooks.name=《镶着金边的魔女手记》 items.books.bookslist.magicgirlbooks.desc=(前面的几页似乎是被撕掉了)……这是大火后的第三天,我像往常一样推开了窗户。\n\n瘴气似的魔力涌入房间,没办法……我无法对抗它……\n\n在我被这股魔力吞噬殆尽之前,在它占据我的身体之前,我得准备好一些能与之抗衡的东西……\n\n仇恨,密谋,计划,灾厄正在降临。(最后这几个字的笔迹似乎变成了另一个人的) -items.books.bookslist.magicgirlbooks.author=--作者:_凛_ +items.books.bookslist.magicgirlbooks.author=--作者:凛 items.books.bookslist.magicgirlbooks.ac_read=阅读书籍 items.books.bookslist.magicgirlbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.magicgirlbooks.anmazing=你解读书中的奥秘,你领悟到了天佑的力量! items.books.bookslist.nokingmobbooks.name=《异变调查》 items.books.bookslist.nokingmobbooks.desc=地表最近总是能感到一股力量正在从地下涌动,我奉命前往地下进行调查。\n\n没想到,这一次前来,我发现了一个一些惊奇的事情。\n\n老鼠能说话,新的未知生物更多,还有一些高智能怪物。似乎一切,就和那场大火毫无关系。\n\n谁在幕后策划着一切?异变的真凶究竟是谁?\n\n我将继续调查,直到找到答案。 -items.books.bookslist.nokingmobbooks.author=--作者:_Demain-Pixel_ +items.books.bookslist.nokingmobbooks.author=--作者:Demain-Pixel items.books.bookslist.nokingmobbooks.ac_read=阅读书籍 items.books.bookslist.nokingmobbooks.blees=你阅读了书籍,一股力量油然而生! items.books.bookslist.nokingmobbooks.anmazing=你解读书中的奥秘,你领悟到了鬼磷的力量! @@ -347,12 +376,12 @@ items.food.alldrink.name=全能治疗饮料 items.food.alldrink.eat_msg=你感觉你又满血复活了。 items.food.alldrink.desc=由三个治疗药水通过回忆的技术造就了这个全能治疗饮料。\n使用者可以有一段时间的治疗,且处于饱腹阶段。 -items.scrolls.scrollofflamecursed.name=极度秘卷 -items.scrolls.scrollofflamecursed.desc=极,代表着严寒。度,代表着炎热。奇异的魔法能量被禁锢在秘卷羊皮纸内,当这股能量被释放时会发出_耀眼的紫色审判光芒_,视野中的所有敌人都会被秘卷蕴藏的魔法力量审判,造成致命的霜火效果,霜火根据玩家的面板伤害提升。 \n\n由于这个秘卷有专属标识,所以无需被鉴定。 +items.scrolls.scrollofflamecursed.name=烈焰噩梦秘卷 +items.scrolls.scrollofflamecursed.desc=烈焰噩梦秘卷可以产生异常危险的霜火,对任何可见敌人造成致命的伤害。\n\n由于这个秘卷有专属标识,所以无需被鉴定。 items.scrolls.scrollofflamecursed.none=这个卷轴产生了一阵耀眼的幻蓝光芒。 items.scrolls.scrollofflamecursed.one=这个卷轴产生了一阵耀眼的幻蓝光芒的同时%s被点燃了! items.scrolls.scrollofflamecursed.many=这个卷轴产生了一阵耀眼的幻蓝光芒的同时怪物们被点燃了! -items.scrolls.scrollofflamecursed.null=极度秘卷 +items.scrolls.scrollofflamecursed.null=烈焰噩梦秘卷 items.potions.exotic.potionofholyfuror.name=神圣祝福合剂 items.potions.exotic.potionofholyfuror.desc=神圣的能量被浓缩为液态,这瓶合剂能够赐予你更长时间的祝福。 @@ -376,8 +405,7 @@ items.wands.wandofgodice.bmage_desc=当_战斗法师_以冰雪悲歌之杖近战 items.quest.goldbao.name=黄金珍宝 items.quest.goldbao.desc=由钻石宝箱王守护的东西,据说是商人的喜爱产品。\n\n无论怎么样,现在珍宝已经在你手中,你已经打败了钻石宝箱王。\n提示:出价资金可能会和实际资金不同,因为商人随时可能变卦。 -items.quest.red.name=死灵精华十字架 -items.quest.red.desc=死灵领主的好东西,如果交给想要的人必然会有好运。 + items.weapon.melee.skyshield.name=筝型盾 items.weapon.melee.skyshield.typical_stats_desc=这件武器通常能格挡0~%d点伤害。通过升级可以使格挡量增长。 @@ -429,7 +457,7 @@ items.bags.kingbag.desc=矮人国王的€定制背包€,好东西,就要 items.weapon.melee.runicblade.name=贤者之剑 -items.weapon.melee.runicblade.stats_desc=这把武器可以在战斗中获得更多的伤害! +items.weapon.melee.runicblade.stats_desc=这把武器可以在升级中获得更多的伤害! items.weapon.melee.runicblade.cooldown=贤者之剑正在重新聚集魔力。在充能过程中其近战伤害将提高。\n贤者之剑将在%s回合后充能完毕。 items.weapon.melee.runicblade.ac_zap=释放 items.weapon.melee.runicblade.fizzles=你的贤者之剑滋滋作响;一定是没有足够的能量。 @@ -472,7 +500,7 @@ items.armor.curses.corrosion.name=腐蚀%s items.armor.curses.corrosion.desc=腐蚀护甲会喷溅出侵蚀性液体,为区域内的所有东西盖上一层黏糊糊的酸性泥浆。 items.armor.curses.displacement.name=定相%s -items.armor.curses.displacement.desc=定相诅咒会在穿戴者受到攻击时试图将其传送到安全地带。不过,过强的威力反倒会导致使用者被随机传送到层内各处。 +items.armor.curses.displacement.desc=定相诅咒会在穿戴者受到攻击时试图将其传送到安全地带。不过,过强的威力反倒会导致使用者被随机传送到层内各处。但是在楼层锁定时候无法触发。 items.armor.curses.metabolism.name=代谢%s items.armor.curses.metabolism.desc=代谢诅咒在穿戴者受伤时能直接将饱腹度转化为生命值,提供额外的治疗,但你会很快陷入饥饿之中。 @@ -663,6 +691,7 @@ items.artifacts.cloakofshadows.ac_bloodbat=召唤伙伴 items.artifacts.driedrose.name=干枯玫瑰 items.artifacts.driedrose.ac_summon=召唤 +items.artifacts.driedrose.sorry=冒险者,我要去陪我的爱人了…… items.artifacts.driedrose.ac_direct=指引 items.artifacts.driedrose.ac_outfit=装备 items.artifacts.driedrose.spawned=你已经召唤出幽灵了。 @@ -942,6 +971,7 @@ items.artifacts.wraithamulet$1.selectkill=选择刺杀目标 items.artifacts.wraithamulet$1.far=刺杀目标太远,无法进行刺杀。 items.artifacts.wraithamulet$1.rooted=你的身体被束缚在这里,无法进行刺杀。 items.artifacts.wraithamulet$1.notthere=那里没有任何目标! +items.artifacts.wraithamulet$1.notthere2=选择的目标是拟态怪,无法在它的睡梦中将它击杀。 items.artifacts.wraithamulet$1.notnpc=NPC不能被处决! items.artifacts.wraithamulet$1.killmobs=该生物成功被暗夜突袭处决! items.artifacts.wraithamulet$1.killboss=该首领成功被暗夜突袭重创! @@ -1080,6 +1110,10 @@ items.food.smallration.eat_msg=吃起来还行。 items.food.smallration.desc=它看起来和普通口粮一样,就是小了点。 items.food.smallration.descx=它看起来和普通口粮不一样,就是大了点。 +items.food.smallration$blackmoon.name=小月饼 +items.food.smallration$blackmoon.desc=一个小小的月饼,可能是火候控制不当,有一面已经烤的焦黑了。\n\n面团上歪歪扭扭的写了几个字,看不太清。\n\n你不太确定里面是什么馅......馅料看起来有点像完全凝固的咖喱。\n\n闻起来有点怪味,不过应该能吃。 +items.food.smallration$blackmoon.eat_msg=出乎你的意料,馅料是烤土豆的味道,挺好吃的。 + items.food.stewedmeat.name=炖肉 items.food.stewedmeat.eat_msg=吃起来还行。 items.food.stewedmeat.desc=烹煮的过程中杀死了肉上面可能携带的任何病菌或是寄生虫。现在应该可以安全的食用它了。 @@ -1488,6 +1522,7 @@ items.scrolls.scrollofremovecurse.strmagic=你的终焉散发出血红的光束 items.scrolls.scrollofteleportation.name=传送卷轴 items.scrolls.scrollofteleportation.tele=眨眼之间你就被传送到本层的另外一个位置。 items.scrolls.scrollofteleportation.no_tele=传送魔法失败了。 +items.scrolls.scrollofteleportation.strong_tele=强大的魔力流阻止了你的传送! items.scrolls.scrollofteleportation.cant_reach=你不能传送到那个位置。 items.scrolls.scrollofteleportation.prompt=选择想要传送的地点 items.scrolls.scrollofteleportation.desc=羊皮纸上的咒语能立刻让阅读者传送到本层的另一处。卷轴会优先选择阅读者还未探索的地方,但无法将人传送到门被锁或被路障堵住入口的密室中。不过,它能帮助发现通向未知区域的隐藏门。 @@ -1957,6 +1992,13 @@ items.weapon.enchantments.unstable.desc=紊乱附魔的武器周身散布着混 items.weapon.enchantments.vampiric.name=血饮%s items.weapon.enchantments.vampiric.desc=这个强大的附魔能在攻击敌人时吸取其生命能量并恢复使用者的生命。当使用者生命较少时效果更强。 +items.weapon.enchantments.haloblazing.name=鬼磷%s +items.weapon.enchantments.haloblazing.desc=这个附魔会使磷火从武器中喷薄而出,能够使用点燃敌人并对正在燃烧的敌人造成中毒的额外伤害。 + +items.weapon.enchantments.crushing.name=爆破%s +items.weapon.enchantments.crushing.desc=这个附魔会让使用者陷入癫狂,能使爆炸的能量从武器中喷薄而出,能够使敌人目标处受到一次范围伤害亦或者给造成敌人短暂的残废效果。 +items.weapon.enchantments.crushing.kill=%s:炸死你!啊哈哈哈…… + ###melee weapons items.weapon.melee.assassinsblade.name=暗杀之刃 diff --git a/core/src/main/assets/messages/levels/levels.properties b/core/src/main/assets/messages/levels/levels.properties index 143031de3..26239fadb 100644 --- a/core/src/main/assets/messages/levels/levels.properties +++ b/core/src/main/assets/messages/levels/levels.properties @@ -6,6 +6,8 @@ levels.features.chasm.jump=你确定要跳入洞口中?从这么高的地方 levels.features.chasm.ondeath=你落地过猛摔死了…… levels.features.chasm.rankings_desc=死于撞击 +levels.level.weapon=不能在迷你Boss战中使用十字架,已自动将你的十字架转移到入口处。 + levels.rooms.standard.magicdimandroom$chestmarker.name=暴风雪莹标记 levels.rooms.standard.magicdimandroom$chestmarker.desc=一个神秘的标记,是谁在这里设计的呢? @@ -155,10 +157,10 @@ levels.newcavesbosslevel.gate_desc=一面高大的金属城门挡住了通往矮 levels.newcavesbosslevel.gate_desc_broken=这扇大门一定是以某种形式与DM-300相连,因为在DM-300损坏时它也随之爆炸。现在这扇门炸得只剩下零星的碎片。 levels.newcavesbosslevel.water_desc=周围奔涌着强大的电流,这里的水可能不太安全... -levels.citybosslevel.throne_name=王座 -levels.citybosslevel.throne_desc=这座醒目的高大王座曾是矮人国王的席位,但现在它已属于一位沉湎于力量的死灵法师。\n\n说不清是不是有什么魔法或是机械装置与王座相连,矮人国王在上面坐着时会拥有额外的能力。 -levels.citybosslevel.summoning_name=唤灵基座 -levels.citybosslevel.summoning_desc=唤灵基座的中央有一个巨大的开口,时不时涌出一些黑暗能量。\n\n矮人国王利用这些基座来聚焦死灵魔法,为其召唤奴仆。召唤物的生成需要一段时间的能量聚集,召唤物的类型取决于聚积于此的魔力。 +levels.newcitybosslevel.throne_name=王座 +levels.newcitybosslevel.throne_desc=这座醒目的高大王座曾是矮人国王的席位,但现在它已属于一位沉湎于力量的死灵法师。\n\n说不清是不是有什么魔法或是机械装置与王座相连,矮人国王在上面坐着时会拥有额外的能力。 +levels.newcitybosslevel.summoning_name=唤灵基座 +levels.newcitybosslevel.summoning_desc=唤灵基座的中央有一个巨大的开口,时不时涌出一些黑暗能量。\n\n矮人国王利用这些基座来聚焦死灵魔法,为其召唤奴仆。召唤物的生成需要一段时间的能量聚集,召唤物的类型取决于聚积于此的魔力。 levels.caveslevel.grass_name=荧光地苔 levels.caveslevel.high_grass_name=荧光菌菇 diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index 513fa68e7..0df98be70 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -165,10 +165,13 @@ badges$badge.clear_water.title=净化大师 badges$badge.clear_water.desc=完成挑战:污泥浊水 badges$badge.ghostdage.title=白幽祝福 -badges$badge.ghostdage.desc=_在幽妹处获得一次+3品质武器或护甲\n\n_(镀层需求:+4品质武器) +badges$badge.ghostdage.desc=_在悲伤幽灵处获得一次+3品质武器或护甲\n\n_(镀层需求:+4品质武器) badges$badge.dageto.title=白幽神谕 -badges$badge.dageto.desc=在幽妹处获得一次_+4_品质武器或护甲\n\n[你已成功镀层[ +badges$badge.dageto.desc=在悲伤幽灵处获得一次_+4_品质武器或护甲\n\n[你已成功镀层[ + +badges$badge.hideen_badagex.title=隐秘探索 +badges$badge.hideen_badagex.desc=发现隐藏徽章界面\n\n_长按徽章按钮_ badges$badge.endied.title=终焉之旅 badges$badge.endied.desc=_(获得彩蛋武器终焉)_,目前版本暂时无法获得 @@ -295,11 +298,21 @@ paswordbadges$badge.exsg.desc=药水癔症只是一个假象,你仍然坚持 paswordbadges$badge.godd_make.title=暗室逢灯 paswordbadges$badge.godd_make.desc=累计完成老杖匠的全部委托任务,现在,是他回报恩人的时候了。\n\n_奖励:0层随机戒指(四大基座上)_ +paswordbadges$badge.zqj_ghost.title=映月离合之殇 +paswordbadges$badge.zqj_ghost.desc=完成悲伤幽灵的中秋时期特别任务。\n\n[你太棒了,我所深爱着的搭档[ + +paswordbadges$badge.night_cat.title=不眠之夜 +paswordbadges$badge.night_cat.desc=在夜间通关一次。\n\n[再玩一局就睡觉……睡觉了,啊?怎么早上七点了?! + +paswordbadges$badge.allchsx.title=末日测验-试炼之心 +paswordbadges$badge.allchsx.desc=你从地牢的末日出走了出来,你今后还会前往何处?\n\n开启13项以上挑战通关,地表三巨头已经邀请你前往更危险的地表。 + + challenges.no_food=缩餐节食 challenges.no_food_desc=食物本就稀缺,但你还需要注意节食!\n\n・使用各类食物与丰饶之角的饱腹效果为原本的三分之一。\n・其他恢复饥饿的机制不受影响。 challenges.no_armor=无甲之身 -challenges.no_armor_desc=要相信自己,因为不能相信护甲了!\n\n・布甲之外所有常规护甲被禁止生成。\n・布甲被升级时增长的防御力大幅降低。\n・灵壤守护者的防御力大幅降低。\n\n_地牢环境已发生改变,请小心应对。(种子物品有生成变动)_ +challenges.no_armor_desc=要相信自己,因为不能相信护甲了!\n\n・布甲之外所有常规护甲被禁止生成。\n・布甲被升级时增长的防御力大幅降低。\n・灵壤守护者的防御力大幅降低。 challenges.no_healing=恐药异症 challenges.no_healing_desc=治疗药水真是种好东西,可惜你对它过敏!\n\n・治疗药水以及使用治疗药水炼制的道具将无法治愈英雄,反而会使英雄中毒。\n・炼金催化剂不会随机到治愈英雄或使英雄中毒的效果。\n・这些道具对其他角色依然发挥正常效果。 challenges.no_herbalism=荒芜之地 @@ -319,8 +332,7 @@ challenges.champion_enemies=精英战场 challenges.champion_enemies_desc=会升级的不止你一个!\n\n・普通敌人刷出时有 1/8 \ 的机率拥有特殊的精英属性。\n・精英敌人刷出时会立即醒来。\n・精英敌人免疫腐化效果。\n\n精英敌人有8种:\n_烈焰(橙色):_ 近战伤害 \ +25% 且带有点燃效果,免疫火焰,死亡时引燃周围。\n_索敌(紫色):_ 近战伤害 +25%,近战范围 +4。\n_敌法(绿色):_ 受到伤害 -25%,拥有魔法免疫。\n_巨型(蓝色):_ 受到伤害 -75%,近战范围 +1,无法进入门与过道。\n_祝福(黄色):_ 精准与躲避 +200%。\n_成长(红色):_ 精准、躲避、攻击伤害与有效生命值 +20%。每过 3 回合会再增长 1%。\n_鬼磷(天蓝色):_ 近战伤害 +15% 且带有磷火效果,免疫火焰与磷火。\n_苦痛(暗紫色):_受到的伤害延缓释放,近战伤害+45% -challenges.stronger_bosses=梦魇领袖-测试版 -challenges.stronger_bosses_desc=这项挑战让挑战 Boss 变得更有挑战性了!\n\n_克里弗斯之果:_\n_-_ 第二阶段:触手和本体可以远程攻击,并造成更加大的威胁\n_-_ 触手和本体在战斗过程中拥有额外护盾加成。\n_天狗:_生命 +25%\n_-_ 第一阶段:陷阱更加致命\n_-_ 第二阶段:技能频率更高\n_DM-300:_生命 +60%\n_-_ 能量塔更坚固。\n_-_ 技能频率更高,威力也更强大\n_-_ 超载时移动速度更高\n_-_ 击败时必掉落荆棘斗篷\n_矮人国王:_生命 +50%\n_-_ 整场战斗内召唤的随从都更强大\n_-_ 第一阶段:技能与召唤频率都更高\n_-_ 第二阶段:每轮额外召唤两个随从\n_-_ 第三阶段:生命值 +100%,召唤频率更高\n_Yog-Dzewa:_\n_-_ 同时召唤两个古神之拳!\n_-_ 激光攻击伤害 +60%\n_-_ 召唤更强大的随从 + actors.char.aquaphobia=你受到了来自水的伤害! challenges.pro=}开发者模式} challenges.pro_desc=供测试和开发使用\n1.可以随意上下楼\n2.可以电子斗蛐蛐\n3.还有更多,欢迎探索\n\n(注意:开发者模式不计入徽章数,也不计入挑战徽章奖励。 @@ -333,23 +345,30 @@ challenges.rlpt = ]支离破碎] challenges.rlpt_desc=地下涌动的神秘力量正在渐渐腐蚀这里,这里不过是而言是另一场噩梦。\n\n从第六层开始,怪物必定有几个不是本大层的怪物,但不会超过两级。一般来说,在监狱遇到矮人层的怪物几率很小。通常遇到矿洞层的怪物。 challenges.sbsg = ]基因突变] -challenges.sbsg_desc=地牢中的神秘魔力让一些生物发生了重大的变化\n-所有生物都会因为突变激素变得各不相同,给探索地牢的脚步带来更大的困难。\n-敌人有6种突变类型,且除爆炸体和酸液体概率为5%后,其余Roll出权重一致:\n\n突变失败体:近战伤害减少35%,移速提高到1.3。\n\n突变爆炸体:移速减少50%,攻击力降低30%,但死亡时拥有爆炸伤害。\n\n突变完全体:移速和攻击力各提高25%,且拥有30%伤害减免。\n\n突变危险体:攻击力提升20%,攻击有10%概率造成流血。死亡时有5%概率立刻向本层发出警报。\n\n突变烟雾体:攻击力减少10%,攻击范围+2,攻击敌人10%概率造成眩晕……\n\n突变酸液体:敌人获得额外远程技能,攻击范围+6,造成自身可造成的伤害20%的额外法术伤害并有概率随机产生一种有害烟雾(酸雾,毒雾,眩雾)\n\n_特别说明:如果开启精英强敌,词条会和精英词条可能共存于一个怪物,届时你将遭遇更大的挑战_ +challenges.sbsg_desc=地牢中的神秘魔力让一些生物发生了重大的变化\n-所有生物都会因为突变激素变得各不相同,给探索地牢的脚步带来更大的困难。\n-敌人有6种突变类型,且除爆炸体和酸液体概率为5%后,其余Roll出权重一致:\n\n突变失败体:近战伤害减少35%,移速提高到1.3。\n\n突变爆炸体:移速减少50%,攻击力降低30%,但死亡时拥有爆炸伤害。\n\n突变完全体:移速和攻击力各提高25%,且拥有30%伤害减免。\n\n突变危险体:攻击力提升20%,攻击有10%概率造成流血。死亡时有5%概率立刻向本层发出警报。\n\n突变烟雾体:攻击力减少10%,攻击范围+2,攻击敌人10%概率造成眩晕……\n\n突变酸液体:敌人获得额外远程技能,攻击范围+3,造成自身可造成的伤害20%的额外法术伤害并有概率随机产生一种有害烟雾(酸雾,毒雾,眩雾,暴风雾)\n\n_特别说明:如果开启精英强敌,词条会和精英词条可能共存于一个怪物,届时你将遭遇更大的挑战_ challenges.exsg = ]药水癔症] -challenges.exsg_desc=药水癔症详细规则:\n力量药水--60%概率力量-1且冰冻10回合\n灵视药剂--60%概率喝后失明5回合\n隐形药剂--60%概率喝后立刻怒吼\n极速药剂--60%概率喝后立刻残废8回合\n==========================\n小型口粮-吃后立刻获得极速4回合\n冷冻生肉片-吃后获得奥术护盾\n全肉大饼-吃后立刻获得8回合极速,且有大概率+1力量(_随着力量的追加,获得力量的概率会渐渐变低_)\n\n高级药水_(合剂/魔药)_不受影响\n不知道何种原因,大部分正面药水你都感觉有毒!\n你的臆想会导致药水有毒,但食物却会很有用!而且地牢里面还会追加自动售货机,会售卖一些更加高级的东西。 +challenges.exsg_desc=药水癔症详细规则:\n力量药水--60%概率力量-1且冰冻10回合\n灵视药剂--60%概率喝后失明5回合\n隐形药剂--60%概率喝后立刻怒吼\n极速药剂--60%概率喝后立刻残废8回合\n==========================\n小型口粮-吃后立刻获得极速4回合\n冷冻生肉片-吃后获得奥术护盾\n全肉大饼-吃后立刻获得8回合极速,且有大概率+1力量(_英雄力量低于12时则必定增加力量;随着力量的追加,获得力量的概率会渐渐变低_)\n\n高级药水_(合剂/魔药)_不受影响\n不知道何种原因,大部分正面药水你都感觉有毒!\n你的臆想会导致药水有毒,但食物却会很有用!而且地牢里面还会追加自动售货机,会售卖一些更加高级的东西。 challenges.icedied = 雪虐风饕(未完成) challenges.icedied_desc=很显然,地牢的雪越下越大了,在这严寒里面,生存的法则将进一步让我们活得更久。\n篝火房间一旦被激活不再无限,变成40回合的寒冷抑制,商人会贩卖更多特殊物品。 +challenges.morelevel=变幻莫测 +challenges.morelevel_desc=地牢在时间的长河中渐渐的诞生了更多地形,这次探索地牢谁知道能遇到什么?\n\nA.新增3种全新地形感知,1种特定地形感知。\n\nB.2场迷你Boss遭遇战,未来会更多。\n\nC.地牢怪物生成更多\n\n_地牢环境已发生改变,请小心应对!!!_\n\n(除Boss层,每层必定触发地形感知,且全部均为大型地形)。 + challenges.dhxd =灯火前路 challenges.dhxd_desc= 灯火指引着前进的道路,提灯引路,灯火前行! \n\n此为三挑以上的特殊机制,但你也可以直接开启它!\n\n1.追加灯火祝福和魔女诅咒机制,灯火会随着深入楼层进行降低\n2.在较低的灯火下死亡会精神崩溃,诞生自己的暗影。\n3.追加提灯和灯油,合理使用这些道具,让自己能在灯火祝福中活下去!如果不幸遭到魔女的诅咒,也不会让你陷入绝境。\n\n灯火不灭,希望仍在,提灯引路,灯火前行! challenges.cs=挑战(占位符) challenges.cs_desc=这并不是挑战,请忽略不计。 -challenges.no_armorx = 这片大地吃布甲之外的护甲从不挑食,侦查到作弊行为,已移除。 - +challenges.no_armorx = 这片大地吃布甲之外的护甲从不挑食,侦查到非布甲的护甲,系统已自动移除。 kill=\n_冰雪魔女:_\n_-_生命+25%\n_-_ 水中召唤的仆从更多\n-击败时必定掉落紫金宝石护符\n_矮人大师:_\n_-_ 致命技能更加频繁\n_-_ 生命值+50%\n-击败时必定掉落自然神圣护符\n_史莱姆王:_\n_-_ 生命值+100%\n_-_ 伤害更高,速度更快\n_-_ 在开局额外召唤豺狼诡术师,巨钳螃蟹,腐臭老鼠,蚀化史莱姆\n_-_ 击败时必定掉落凝胶手套\n_DM720:_\n_-_ 获得全新技能\n_-_ 击败时必定掉落DM150控制终端[尚未完成] +windows.wndchallenges.boss_title=绝命头目-测试版 +windows.wndchallenges.boss_desc=这项挑战让挑战 Boss 变得更有挑战性了!\n开启后你将遭遇更加强大的 Boss,\n以及额外的积分和永久货币奖励(WIP)和更好的战利品!!!\n还等什么,立刻开始你的行动吧!!!\n\n注意:BossRush直接默认绝命头目开启,且部分BR独占头目无此加成。\n\n}第一区域-圣境密林层}\n\n_A.克里弗斯之果(加强效果预览):_\n_-_ 第二阶段:\n_-_ 触手可以远程攻击,但场上出现额外柱子以方便躲避。\n_-_ 不再额外提供净化药水。\n_-_ 第三阶段:\n_-_ 触手和本体在战斗过程中拥有额外护盾加成\n_-_ 在{困难模式{中则会获得额外技能-_丛林质问_\n\n_B.奥克拉赫之花(加强效果预览-WIP):_\n即将到来\n\n[第二区域-冰雪监狱层[\n\n_A.天狗(加强效果预览):_\n_-_ 生命 +25%\n_-_ 第一阶段:\n_-_ 陷阱更加致命\n_-_ 第二阶段:\n_-_ 技能频率更高\n\n_B.拟态之王(加强效果预览-WIP):_\n即将到来\n\n_C.暗黑天狗(加强效果预览-WIP)_\n即将到来\n\n]第三区域-冰雪熔洞层]\n\n_A.DM-300(加强效果预览):_\n_-_ 全局阶段:\n_-_ 生命 +60%\n_-_ 能量塔更坚固。\n_-_ 技能频率更高,威力也更强大\n_-_ 超载时移动速度更高\n_-_ 击败时必掉落随机一枚+2戒指。\n\n_B.DM-720(加强效果预览-WIP):_\n_-_ 全局阶段:\n_-_ 生命 +50%\n_-_ 驾驶员出现时立刻改变地形,并且需要拆除四个能量塔才能攻击血月长老。\n\n_C.冰雪魔女-冬铃(加强效果预览-WIP):_\n即将到来\n\n|第四区域-废都遗址层|\n\n_A.矮人国王(加强效果预览):_\n_-_ 全局阶段\n_-_ 生命 +50%\n_-_ 整场战斗内召唤的随从都更强大\n_-_ 第一阶段:技能与召唤频率都更高\n_-_ 第二阶段:额外召唤霜冻魔像和重甲豺狼,重甲豺狼只有原本的62.5%血量。\n_-_ 第三阶段:生命值 +100%,召唤频率更高\n\n_B.矮人将军(加强效果预览-WIP):_\n_-_ 全局阶段:\n_-_ 生命+80%\n_-_ 第二阶段:整场战斗内召唤的随从都更强大。\n_-_ 第三阶段:大激光伤害x2。\n\n[第五区域-恶魔郊区[\n_A.Yog-Dzewa(加强效果预览):_\n_-_ 同时召唤两个古神之拳!\n_-_ 二阶段额外召唤寒冰与鬼磷拳头\n_-_ 激光攻击伤害 +60%\n_-_ 召唤更强大的随从\n_B.极度恐惧-水晶意志(加强效果预览-WIP):_\n即将到来\n\n*额外区域-EX头目*\n额外区域的Boss们我目前暂无加强想法,或许未来会有。\n\n_总之,这是一个WIP(未完成)_ +windows.wndchallenges.ok=返回挑战页面 + + diff --git a/core/src/main/assets/messages/scenes/scenes.properties b/core/src/main/assets/messages/scenes/scenes.properties index a5d88fdd5..6353e6c7f 100644 --- a/core/src/main/assets/messages/scenes/scenes.properties +++ b/core/src/main/assets/messages/scenes/scenes.properties @@ -12,6 +12,8 @@ scenes.gamescene.examine=调查这里 scenes.gamescene.interact=与之对话 scenes.gamescene.pick_up=拾取此物 +scenes.mobcatlogscene.title=生物档案库 + #挑战模式 @@ -37,7 +39,14 @@ scenes.feedbackscene$1.join_link=加入魔绫开发总群 scenes.changesscene.earlier=破碎更新日志 + + scenes.changesscene.later=魔绫更新动态 +scenes.changesscene.mlpd-0.6.4-5=v0.6.4-5-更新日志 +scenes.changesscene.mlpd-0.6.0-3=v0.6.0-3-更新日志 +scenes.changesscene.mlpd-0.5.x=v0.5.X-更新日志 +scenes.changesscene.mlpd-0.4.x=v0.0-0.4.X-更新日志 + scenes.changesscene.shpd=破碎更新日志 #scenes.aboutscene.= @@ -157,6 +166,12 @@ scenes.gamescene.dark=你依稀听到敌人在黑暗中涌动... scenes.gamescene.large=这一层的规模貌似格外庞大... scenes.gamescene.traps=这一层的地面机关密布,暗藏杀机... + +scenes.gamescene.moretraps=这一层的机关犹如刀山火海,稍不注意便可能被…… +scenes.gamescene.threewells=这一层知识,救赎,逆转的能量正在汇聚…… +scenes.gamescene.died=死亡的气息正在加剧,小心暗处的眼睛,不要与他们直视…… +scenes.gamescene.links=链接生死之间的道路,最终形成一个…… + scenes.gamescene.secrets=诡秘的气氛正暗示这层隐藏着众多秘密。 scenes.gamescene.choose_examine=选择检查目标 scenes.gamescene.multiple_examine=这里引人注意的东西不止一件,你想检查哪个? @@ -180,11 +195,13 @@ scenes.interlevelscene$mode.reset=重置中… scenes.interlevelscene$mode.exboss=你突然眼前一黑\n\n,随后便是守卫低沉的声音:\n\n将此人押送到雪凛峡谷处置。 scenes.interlevelscene$mode.frgirlboss=正在前往雪凛峡谷深处…… scenes.interlevelscene$mode.ancityboss=正在前往远古遗迹深处…… +scenes.interlevelscene$mode.garden=在粉色幽灵的魔法下,\n\n你被传送到了古老花园…… scenes.interlevelscene.install=安装游戏 scenes.interlevelscene.file_not_found=未能找到存档文件。如果重启后问题依旧存在, 那这个存档可能已经损坏。节哀顺变。 scenes.interlevelscene.io_error=未能找到存档文件。如果重启后问题依旧存在, 那这个存档可能已经损坏。节哀顺变。 scenes.introscene.text=自宇宙诞生以来,我们的创世神便创造了圣灵之心并建立了我们最初的家园。\n时间不知道过了多久,由于创世神需要离开家园,于是便创造了三个管理者。\n并嘱咐他们一定要守护好这里。创世神始终放不下他们,于是将圣灵之心力量的一半给予了三个管理者,三个管理者叫了一名工匠帮忙制作。于是,水晶之心,就此诞生……\n然而,好景不长。一名管理者突然下落不明,就在同时,另外两个管理者所管理的国度开始受到了未知的毁灭性的袭击。战火蔓延到了每一个角落,但创世神早已离去……\n无奈之下,其中一名的管理者出来发动了一个禁忌魔法,一瞬间,袭击停止了。但这名管理者也消耗了自己的四分之一的生命。并且,由于袭击过于庞大,战后的鬼魂与怨念仍然是头号危机。危急之下,创世神突然归来,并使用水晶之心将全部污秽净化,并用水晶之心把所有的灵体镇压,随后将它放在三国交界处的废弃地牢深处之中。\n但这一做,创世神违背了天地平衡,故此也没有人再记得她。\n所有关于她的记忆,她的传说,被一并消除。\n3个世纪后……\n当时的三大管理者,如今已成为地表三巨头。\n关于那个地牢,近期有传言称里面的环境越来越不稳定,且还有垂涎于水晶之心的人前往。\n你也是其中的一员,你会找到真相吗?是时候开始你自己的冒险了! + scenes.newsscene.title=游戏动态情报 scenes.newsscene.read_more=查阅更多 scenes.newsscene$newsinfo.english_warn=新闻仅能由开发者以中文撰写。 @@ -221,10 +238,24 @@ scenes.startscene.new=新游戏 scenes.surfacescene.exit=英雄归来 scenes.titlescene.play=开始 + + scenes.titlescene.enter=进入地牢 + +scenes.titlescene.mobcat=生物档案资料库 + + +scenes.titlescene.go=走向地牢之外 + +scenes.titlescene.dark=夜幕之下 危机四伏 + scenes.titlescene.rankings=排行榜 scenes.titlescene.badges=徽章 scenes.titlescene.news=游戏动态情报 + +scenes.titlescene.news2=新闻 +scenes.titlescene.mobcat2=生物档案 + scenes.titlescene.changes=改动 scenes.titlescene.update=更新 scenes.titlescene.install=安装 @@ -285,13 +316,13 @@ scenes.guidescene.title_9=0层加成 scenes.guidescene.page_9=当你完成了一些特殊挑战后,0层的四个基座就会追加更多的补给品。\n\n-请小心,挑战非常困难,但一旦开着挑战胜利了是不是很有成就感了,对吧!\n\n-同时0层随着探索的深入还会出现更多NPC,他们会在你的后续探索中让你获得更多受益。 scenes.guidescene.title_10=寒冷系统 scenes.guidescene.page_10=从监狱开始,暴风雪将会开始在地牢飘絮。当然,命运也在照顾我们。\n\n在监狱会有篝火房间,在篝火房间中能获得温度,克制寒冷的侵蚀。 -scenes.guidescene.title_11=娱乐模式 -scenes.guidescene.page_11=厌倦了常规模式,想游玩更多模式?\n\n娱乐模式欢迎你的到来!点击英雄选择界面右边的_提灯_即可进入。 +scenes.guidescene.title_11=DLC模式 +scenes.guidescene.page_11=厌倦了常规模式,想游玩更多模式?\n\nDLC模式欢迎你的到来!点击英雄选择界面右边的_提灯_即可进入。 -scenes.thanksscene.code=编码致谢:\n-REN(夜临2作者)\n-Alexstrasza(注解作者)\n-SmuJB(诅咒作者)\n-Tianscar(碳素作者)\n-TrashBoxbodylev(经验作者) -scenes.thanksscene.test=\n\n测试致谢:\n-CodenameE\n-熊猫头\n-迷茫\n-小狐狸\n-摘希\n-ZIOM-ObSir\n-坏猫猫\n-不是史神\n-月鸾\n-口水猫 -scenes.thanksscene.music=\n\n音乐致谢:\n-Prohonor\n-泰拉瑞亚 +scenes.thanksscene.code=编码&设计致谢:\n-REN(夜临2作者)\n-Alexstrasza(注解作者)\n-SmuJB(诅咒作者)\n-Tianscar(碳素作者)\n-TrashBoxbodylev(经验作者)\n-阿巴阿巴(MLPD设寄师)\n-AAC(音乐总策划)\n-罐装狐腻(文本优化) +scenes.thanksscene.test=\n\n测试致谢:\nBzmdr(_首席测试员_)\n-CodenameE(_前席纳谏员_)\n-熊猫头(_首席攻略员_)\n-迷茫\n-小狐狸\n-摘希\n-ZIOM-ObSir\n-坏猫猫\n-不是史神\n-月鸾\n-口水猫 +scenes.thanksscene.music=\n\n原创音乐致谢:\n-Prohonor\n-犬羅\n\n第三方音乐借用:\n-泰拉瑞亚\n-泰坦之魂\n-Arknight\n\n(本PDMOD不用于任何商业用途) scenes.thanksscene.art=\n\n美术致谢:\n-被子\n-冷群怪\n-REN\n-Daniel Clan\n-奈亚子-\nTianScar\n-ObSir\n-Nxhy -scenes.thanksscene.ad=\n\n宣传致谢:\n-_那些回忆\n-罗贝里\n-泰勒\n-Ømicrónrg9_\n\n翻译致谢:\n-English:\n_Noodlemire & JDSALing_\n\n-繁体中文:\n-_那些回忆 & 冷群_\n\n-日本语:\n-_FromBeyond_ +scenes.thanksscene.ad=\n\n宣传致谢:\n-_那些回忆\n-QinYue\n-罗贝里\n-泰勒\n-Ømicrónrg9_\n\n翻译致谢:\n-English:\n_Noodlemire & JDSALing_\n\n-繁体中文:\n-_那些回忆 & 冷群_\n\n-日本语:\n-_FromBeyond_ scenes.thanksscene.join=加入魔绫总群 scenes.thanksscene.link=https://jq.qq.com/?_wv=1027&k=wzMjU0f7 \ No newline at end of file diff --git a/core/src/main/assets/messages/ui/ui.properties b/core/src/main/assets/messages/ui/ui.properties index 567465dd8..cff2c1578 100644 --- a/core/src/main/assets/messages/ui/ui.properties +++ b/core/src/main/assets/messages/ui/ui.properties @@ -558,4 +558,12 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x84=1.修复酸液体和爆炸体权 ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x85=1.修复酸液体和爆炸体权重错误的问题\n2.修复一些少量错误 +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x86=1:开发者模式下召唤的恶魔血巢可以移动和攻击攻击无动画且时间长,移动也无动画且移动后贴图和实际位置会不同(已处理,处理方式:移除)\n2:修复开发者模式下召唤烟雾体实际上召唤的是酸液体\n3:开启缩餐节食下幽灵的小月饼会消失(ling以知晓)(已处理,处理方式:食物即刻起正常生成)\n4:碧灰双刃的伤害固定,极化,安息,强化符石,额外力量均无法影响\n5:种子鞋的腐梅效果使用后会出现一个腐梅种子\n6:弱肉强食成就获取后每有怪物死亡就会在右下角播报(ling以知晓)(潘多拉已修复该问题)\n7:焰浪法杖加一只有2点充能(ling以知晓)(已处理,处理方式,换成upgrade函数)\n8:拟态王宝藏没获取第一个后续宝藏会消失(ling以知晓)(潘多拉已修复该问题,Ling已进行改进)\n9:水晶宝箱怪会飞(潘多拉已修复该问题)\n10:部分boss墙壁会消失,推测是因为吊桥楼层原因(已尝试修复,需要玩家验证)\n11:br可以通过升降器去到28层以后的楼层\n12:共生法杖可以通过奥术聚酯升级(ling以知晓)\n13:催眠符石有俩个效果\n14:快捷合成表部分图标错误(已处理)\n15:修复部分楼层转换错误。 + +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x87=1:修复中秋节活动时间的错误时长\n2.修复上个版本的诸多错误 + +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x88=1.修复死亡楼层可以使用锁链传送出去的问题\n2.暗金宝石护符进行了一定的平衡\n3.修复精英策略中错误的DM300原型机生成\n4.修复裂缝遇到任何实体变成地块的问题\n5.削弱绿野精灵的数值\n6.克里弗斯之果改进,特别净化药水在战斗结束后自动删除 + +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x89=1.修复了棱光法杖光源冲突的问题,在灯火状态下棱光法杖可以在视野低于直接给灯火能量充能5点,该效果有200回合冷却。\n2.修复了号角可以被盗贼充能\n3.修复了上个版本由FireBase提到的诸多问题\n4.修复了浊焰魔女的一些问题 + //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 87bd3fbff..af45953a9 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -56,6 +56,7 @@ windows.wndstory.start=灯火冒险正式开始!你获得了一次免费的增 windows.wndstory.letxz=灯火冒险欢迎您,已赠送你免费的增益Roll! windows.wndstory.letsplay=深度调查模式已经开启,在该模式下挑战徽章不可获得,祝你游戏愉快! +windows.wndstory.warning=你正在进行的是超过6个挑战,属于高挑模式。请小心行动。同时你的初始灯火将有所扣减。 windows.wndhero$statstab.lanterfire=灯火 @@ -105,12 +106,17 @@ windows.wndgame.dialog_title=好的装备名字能让你在游戏中更有亲切 windows.wndgame.dialog_rename=重命名 windows.wndgame.dialog_revert=恢复默认 -windows.wndinfomob.dsinfo = 闪避概率: -windows.wndinfomob.maxinfo = 掉落限制LV: -windows.wndinfomob.getexp = 上次伤害: -windows.wndinfomob.getspeed = 移速属性: -windows.wndinfomob.itm = 常规掉落: -windows.wndinfomob.shield= 护甲属性: +windows.wndinfomob.boss=头目 +windows.wndinfomob.miniboss=小头目 +windows.wndinfomob.hunter=狩猎 +windows.wndinfomob.abyss=深渊 +windows.wndinfomob.undied=亡灵 +windows.wndinfomob.demon=恶魔 +windows.wndinfomob.ling=元素 +windows.wndinfomob.hollow=万圣 +windows.wndinfomob.normal=常规 +windows.wndinfomob.canroll=可掉落 +windows.wndinfomob.noroll=不掉落 windows.wndnyzshop.nayazi=奈亚子 windows.wndnyzshop.nayaziwelcome=你好,冒险家。欢迎来到我的商店。和其他商店不同的是,我这里是一个智能终端的结合体!\n\n需要什么请进行选择,但是,智能终端通常会出现问题!一旦终端出现问题将无法再次购买。\n\n书籍一本起价720金币,炸弹一套起价270金币,欢迎你的挑选!\n\n有一些时候因为机器的缺陷性质可能实际费用会比预想的高! @@ -204,7 +210,7 @@ windows.wndgameinprogress.gamegold=游戏金币: windows.wndgameinprogress.gamenayzi=奈亚大亨: windows.wndgameinprogress.gamenayzis=\n一局游戏内购买7次终端的物品,即可永久让奈亚入驻0层。 windows.wndgameinprogress.gamemimic=拟态猎杀: -windows.wndgameinprogress.gameinof=注:类型不同的种子所生成的地牢物品规则将有所不同。\n_B类_为开启_独挡一面_挑战后的种子。\n_C类_:支离破碎&基因突变\n_D类_:BossRush\n\n(种子判定优先级:D>B>C>A) +windows.wndgameinprogress.gameinof=注:类型不同的种子所生成的地牢物品规则将有所不同。A类就是没有开启_变幻莫测_的种子\n\n_B类_为开启_变幻莫测_挑战后的种子。\n\n特别类:BossRush\n\n(种子判定优先级:BossRush>B>A) windows.wndgameinprogress.title=%1$d级%2$s windows.wndgameinprogress.challenges=挑战 @@ -283,6 +289,9 @@ windows.wndkeybindings.quickslot_3=快捷栏3 windows.wndkeybindings.quickslot_4=快捷栏4 windows.wndkeybindings.quickslot_5=快捷栏5 windows.wndkeybindings.quickslot_6=快捷栏6 +windows.wndkeybindings.quickslot_7=快捷栏7 +windows.wndkeybindings.quickslot_8=快捷栏8 +windows.wndkeybindings.quickslot_9=快捷栏9 windows.wndkeybindings.bag_1=容器1 windows.wndkeybindings.bag_2=容器2 windows.wndkeybindings.bag_3=容器3 @@ -354,8 +363,11 @@ windows.wndsadghost.rat=谢谢你,那个可怕的老鼠被杀,我也终于 windows.wndsadghost.gnoll=谢谢你,那个诡计多端的豺狼被杀,我也终于可以安息了……不知道究竟是什么样畸形的魔法使它如此诡诈… windows.wndsadghost.crab=谢谢你,那只巨蟹被杀,我也终于可以安息了……不知道究竟是什么样畸形的魔法能让它活得那么长…… windows.wndsadghost.give_item=挑一个你喜欢的拿走吧,我再也用不着它们了...希望它们能帮助你继续走下去...\n\n还有...我在这地牢里弄丢了一件心爱之物...倘若你能...找到那...玫瑰... +windows.wndsadghost.ask=谢谢你,冒险者。\n\n我的爱人曾和我说过她很害怕那个怪物......所以,尽管那只怪物的死活对我来说已经毫无意义,我仍然愿意请求你击败它。\n\n我的爱人?唉,是的,我生前已经和她签订好婚约了,可惜时运不济,我本以为这只是一个轻松的任务,没想到却遭到了偷袭......我很后悔,可后悔又能有什么用呢。击败了她所惧怕的怪物,也许能算是对她的一点补偿吧。\n\n现在应该已经是中秋节了,我又想起了和她一起吃月饼赏月的日子......对了,我烤制了一些月饼,选好要的东西后也给你一个吧。\n\n地牢难以找到合适的厨具和食材,希望你不要嫌弃。 + windows.wndsadghost.confirm=确定 windows.wndsadghost.cancel=取消 +windows.wndsadghost.look=关闭预览 windows.wndsadghost.farewell=一路顺风,冒险者! windows.wndsettings$displaytab.title=显示设置 @@ -389,7 +401,7 @@ windows.wndsettings$uitab.flip_indicators=翻转指示器 windows.wndsettings$uitab.quickslot_swapper=使用V1快捷栏 windows.wndsettings$uitab.swapper_desc=仅手机端布局可在V1,V2快捷栏进行切换,\n而PC端布局只能使用V2快捷栏。{\n_注意:仅V2快捷栏支持三类布局,使用V1会无效。_ windows.wndsettings$uitab.system_font=系统字体 -windows.wndsettings$uitab.key_bindings=键位设置 +windows.wndsettings$uitab.key_bindings=PC版键位设置 windows.wndsettings$datatab.title=网络相关设置 windows.wndsettings$datatab.news=自动检查新闻 windows.wndsettings$datatab.updates=自动检查更新 @@ -500,7 +512,7 @@ windows.wndgameinprogress.dlc=调查 windows.wnddlc.title=深度调查 conducts.null=什么都不选择 -conducts.bossrush=首领对决 +conducts.bossrush=BossRush conducts.bossrush_desc=被你击败过多次的首领们熟识了英雄的技能,并掌握了一定的对策。它们盘踞在地牢中,等待复仇的时机。\n-你不知道这次又会有怎样的危机需要应对。\n-但你感觉到这次的冒险绝对与其他时期有所不同。\n\n-_深度调查模式仅可选择一种模式游玩。且无法计入多挑徽章中。_ conducts.moneyletgo=黄金时代 diff --git a/core/src/main/assets/music/Tengu.ogg b/core/src/main/assets/music/Tengu.ogg new file mode 100644 index 000000000..9f89001df Binary files /dev/null and b/core/src/main/assets/music/Tengu.ogg differ diff --git a/core/src/main/assets/music/night.ogg b/core/src/main/assets/music/night.ogg new file mode 100644 index 000000000..548b7c7ef Binary files /dev/null and b/core/src/main/assets/music/night.ogg differ diff --git a/core/src/main/assets/music/theme_sky.ogg b/core/src/main/assets/music/theme_sky.ogg new file mode 100644 index 000000000..deb4c0af9 Binary files /dev/null and b/core/src/main/assets/music/theme_sky.ogg differ diff --git a/core/src/main/assets/sprites/amulet.png b/core/src/main/assets/sprites/amulet.png index 8eee01798..226db3278 100644 Binary files a/core/src/main/assets/sprites/amulet.png and b/core/src/main/assets/sprites/amulet.png differ diff --git a/core/src/main/assets/sprites/bluewraith.png b/core/src/main/assets/sprites/bluewraith.png new file mode 100644 index 000000000..6d0a1b699 Binary files /dev/null and b/core/src/main/assets/sprites/bluewraith.png differ diff --git a/core/src/main/assets/sprites/crab.png b/core/src/main/assets/sprites/crab.png index dcd54be5f..498518be6 100644 Binary files a/core/src/main/assets/sprites/crab.png and b/core/src/main/assets/sprites/crab.png differ diff --git a/core/src/main/assets/sprites/flowers_slime.png b/core/src/main/assets/sprites/flowers_slime.png new file mode 100644 index 000000000..1dcfe850f Binary files /dev/null and b/core/src/main/assets/sprites/flowers_slime.png differ diff --git a/core/src/main/assets/sprites/ghost.png b/core/src/main/assets/sprites/ghost.png index 7729864e9..cfa07ba44 100644 Binary files a/core/src/main/assets/sprites/ghost.png and b/core/src/main/assets/sprites/ghost.png differ diff --git a/core/src/main/assets/sprites/hollow/Cerberus.png b/core/src/main/assets/sprites/hollow/Cerberus.png new file mode 100644 index 000000000..7bf1a7ddc Binary files /dev/null and b/core/src/main/assets/sprites/hollow/Cerberus.png differ diff --git a/core/src/main/assets/sprites/hollow/apprentice_witch.png b/core/src/main/assets/sprites/hollow/apprentice_witch.png new file mode 100644 index 000000000..f28325b50 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/apprentice_witch.png differ diff --git a/core/src/main/assets/sprites/hollow/butcher.png b/core/src/main/assets/sprites/hollow/butcher.png new file mode 100644 index 000000000..8e6eb9fd0 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/butcher.png differ diff --git a/core/src/main/assets/sprites/hollow/crumb.png b/core/src/main/assets/sprites/hollow/crumb.png new file mode 100644 index 000000000..1dbd92c2e Binary files /dev/null and b/core/src/main/assets/sprites/hollow/crumb.png differ diff --git a/core/src/main/assets/sprites/hollow/frankenstein.png b/core/src/main/assets/sprites/hollow/frankenstein.png new file mode 100644 index 000000000..3e13872a5 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/frankenstein.png differ diff --git a/core/src/main/assets/sprites/hollow/ghost_halloween.png b/core/src/main/assets/sprites/hollow/ghost_halloween.png new file mode 100644 index 000000000..0f8734bb6 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/ghost_halloween.png differ diff --git a/core/src/main/assets/sprites/hollow/gingerbread.png b/core/src/main/assets/sprites/hollow/gingerbread.png new file mode 100644 index 000000000..fa3314bc5 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/gingerbread.png differ diff --git a/core/src/main/assets/sprites/hollow/mimicry.png b/core/src/main/assets/sprites/hollow/mimicry.png new file mode 100644 index 000000000..94e415aa4 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/mimicry.png differ diff --git a/core/src/main/assets/sprites/hollow/morpheus.png b/core/src/main/assets/sprites/hollow/morpheus.png new file mode 100644 index 000000000..e05dbffd0 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/morpheus.png differ diff --git a/core/src/main/assets/sprites/hollow/typhon.png b/core/src/main/assets/sprites/hollow/typhon.png new file mode 100644 index 000000000..cffb1a635 Binary files /dev/null and b/core/src/main/assets/sprites/hollow/typhon.png differ diff --git a/core/src/main/assets/sprites/huntress.png b/core/src/main/assets/sprites/huntress.png index 889c8084d..ae9a8499e 100644 Binary files a/core/src/main/assets/sprites/huntress.png and b/core/src/main/assets/sprites/huntress.png differ diff --git a/core/src/main/assets/sprites/items/items.png b/core/src/main/assets/sprites/items/items.png index e07ba8d7f..45a1d8363 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/assets/sprites/items/lanter.png b/core/src/main/assets/sprites/items/lanter.png new file mode 100644 index 000000000..a8ebf24c6 Binary files /dev/null and b/core/src/main/assets/sprites/items/lanter.png differ diff --git a/core/src/main/assets/sprites/katydid.png b/core/src/main/assets/sprites/katydid.png new file mode 100644 index 000000000..0c285ffce Binary files /dev/null and b/core/src/main/assets/sprites/katydid.png differ diff --git a/core/src/main/assets/sprites/mage.png b/core/src/main/assets/sprites/mage.png index 8ec1c3430..86b48fa79 100644 Binary files a/core/src/main/assets/sprites/mage.png and b/core/src/main/assets/sprites/mage.png differ diff --git a/core/src/main/assets/sprites/mimic.png b/core/src/main/assets/sprites/mimic.png index 01df40a0a..f7eb6af33 100644 Binary files a/core/src/main/assets/sprites/mimic.png and b/core/src/main/assets/sprites/mimic.png differ diff --git a/core/src/main/assets/sprites/pinkghost.png b/core/src/main/assets/sprites/pinkghost.png new file mode 100644 index 000000000..349dbad64 Binary files /dev/null and b/core/src/main/assets/sprites/pinkghost.png differ diff --git a/core/src/main/assets/sprites/piranha.png b/core/src/main/assets/sprites/piranha.png index ee7fe105f..b70c81541 100644 Binary files a/core/src/main/assets/sprites/piranha.png and b/core/src/main/assets/sprites/piranha.png differ diff --git a/core/src/main/assets/sprites/rogue.png b/core/src/main/assets/sprites/rogue.png index 242fbc011..79efb34e7 100644 Binary files a/core/src/main/assets/sprites/rogue.png and b/core/src/main/assets/sprites/rogue.png differ diff --git a/core/src/main/assets/sprites/warrior.png b/core/src/main/assets/sprites/warrior.png index 57d54f64c..48e095b61 100644 Binary files a/core/src/main/assets/sprites/warrior.png and b/core/src/main/assets/sprites/warrior.png differ diff --git a/core/src/main/assets/sprites/yog_fists.png b/core/src/main/assets/sprites/yog_fists.png index 676e87621..12e3a8c91 100644 Binary files a/core/src/main/assets/sprites/yog_fists.png and b/core/src/main/assets/sprites/yog_fists.png differ diff --git a/core/src/main/assets/tra.png b/core/src/main/assets/tra.png index ecda4759f..a8de0f1c4 100644 Binary files a/core/src/main/assets/tra.png and b/core/src/main/assets/tra.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 e9dd05571..04e517265 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -30,11 +30,14 @@ public class Assets { public static final String BGM_0 = "music/Level0.ogg"; public static final String SNOWCYON = "music/SnowCyon.ogg"; + public static final String NIGHT = "music/night.ogg"; + public static final String SKBJY = "music/Boss-Saka.ogg"; public static final String TOWN = "music/town.ogg"; public static final String BGM_BOSSA = "music/Boss1.ogg"; public static final String BGM_BOSSB = "music/Boss2.ogg"; + public static final String BGM_BOSSB2 = "music/Tengu.ogg"; public static final String BGM_BOSSC = "music/Boss3.ogg"; public static final String BGM_BOSSC3 = "music/Ice.ogg"; public static final String BGM_BOSSD = "music/Boss4.ogg"; @@ -43,6 +46,7 @@ public class Assets { public static final String BGM_BOSSE3 = "music/Yogdead.ogg"; public static final String BGM_FRBOSS = "music/SnowLing.ogg"; public static final String RUN = "music/Run.ogg"; + public static final String SHOP = "music/shop.ogg"; public static final String NYZSHOP = "music/nyzshop2.ogg"; public static class Effects { @@ -55,6 +59,7 @@ public class Assets { public static class Environment { public static final String TERRAIN_FEATURES = "environment/terrain_features.png"; + public static final String TILES_GARDEN = "environment/tiles_garden.png"; public static final String LAVACAVE_OP = "environment/custom_tiles/lavecave_behind.png"; public static final String LAVACAVE_PO = "environment/custom_tiles/lavecave_above.png"; @@ -66,6 +71,9 @@ public class Assets { public static final String TILES_PRISON = "environment/tiles_prison.png"; public static final String TILES_COLDCHEST = "environment/tiles_coldchest.png"; public static final String TILES_FIRE = "environment/tiles_fire.png"; + public static final String TILES_TENGUS = "environment/tiles_tengu.png"; + public static final String TILES_HOLLOW = "environment/tiles_halloween.png"; + public static final String TILES_CAVES = "environment/tiles_caves.png"; public static final String TILES_CITY = "environment/tiles_city.png"; public static final String TILES_ANCIENT = "environment/tiles_ancient.png"; @@ -78,6 +86,7 @@ public class Assets { public static final String WATER_ANCIENT = "environment/water5.png"; + public static final String WATER_HOLLOW = "environment/water7.png"; public static final String WEAK_FLOOR = "environment/custom_tiles/weak_floor.png"; public static final String SEWER_BOSS = "environment/custom_tiles/sewer_boss.png"; @@ -93,7 +102,7 @@ public class Assets { public static final String TILES_DIED = "environment/tiles_died.png"; public static final String TILES_GOLD = "environment/tiles_gold.png"; - public static final String WATER_COLD= "environment/water2.png"; + public static final String WATER_COLD= "environment/water-1.png"; public static final String PRISON_EXIT_OLD = "environment/custom_tiles/prison_exit_old.png"; public static final String PRISON_EXIT_NEW = "environment/custom_tiles/prison_exit_new.png"; public static final String P_BOSS = "environment/custom_tiles/p_boss.png"; @@ -111,12 +120,20 @@ public class Assets { public static final String QliPhoth_Title = "interfaces/bosslogo/qliphoth-title.png"; public static final String QliPhoth_Clear = "interfaces/bosslogo/qliphoth-clear.png"; + public static final String DMOR_Title = "interfaces/bosslogo/dm300or-title.png"; + public static final String DMOR_Clear = "interfaces/bosslogo/dm300or-clear.png"; + public static final String SakaBJY_Title = "interfaces/bosslogo/sakabjy-title.png"; public static final String SakaBJY_Clear = "interfaces/bosslogo/sakabjy-clear.png"; + public static final String Tengu_Title = "interfaces/bosslogo/tengu-title.png"; + public static final String Tengu_Clear = "interfaces/bosslogo/tengu-clear.png"; + public static final String ARCS_BG = "interfaces/arcs1.png"; public static final String ARCS_FG = "interfaces/arcs2.png"; + public static final String ARCS_FGN = "interfaces/arcs2_night.png"; + public static final String LANTERLING = "interfaces/LanterLing.png"; public static final String BANNERS = "interfaces/banners.png"; @@ -134,6 +151,8 @@ public class Assets { public static final String CHROME = "interfaces/chrome.png"; public static final String CHROME_DARK = "interfaces/chrome_normal.png"; public static final String ICONS = "interfaces/icons.png"; + + public static final String ICONS_NORMAL = "interfaces/icons_normal.png"; public static final String STATUS = "interfaces/status_pane.png"; public static final String TOOLBARDRAK = "interfaces/toolbar_normal.png"; public static final String STATUS_DARK = "interfaces/status_pane_normal.png"; @@ -182,7 +201,7 @@ public class Assets { public static final String GO = "music/Open.ogg"; public static final String SHOP = "music/shop.ogg"; public static final String THEME_1 = "music/theme.ogg"; - public static final String THEME_2 = "music/theme.ogg"; + public static final String THEME_2 = "music/theme_sky.ogg"; public static final String SEWERS_1 = "music/Level1.ogg"; public static final String SEWERS_2 = "music/Level1.ogg"; @@ -314,6 +333,16 @@ public class Assets { //NPCS public static final String KEEPERKING = "sprites/npc/ShopKing.png"; + //HOLLOW + public static final String APWHEEL = "sprites/hollow/apprentice_witch.png"; + public static final String CSBR = "sprites/hollow/Cerberus.png"; + public static final String TYPHON = "sprites/hollow/typhon.png"; + public static final String MPHON = "sprites/hollow/morpheus.png"; + + public static final String ZOMBIE = "sprites/hollow/frankenstein.png"; + + public static final String MIMICRY = "sprites/hollow/mimicry.png"; + public static final String KEEPERKINGBOT = "sprites/npc/autoshop.png"; //BOSS @@ -350,6 +379,9 @@ public class Assets { public static final String TPDP = "sprites/boss/TPDoor.png"; public static final String ITEMS = "sprites/items/items.png"; + + public static final String ILTRS = "sprites/items/lanter.png"; + public static final String WFS = "sprites/items/wf.png"; public static final String ITEM_ICONS = "sprites/item_icons.png"; @@ -377,6 +409,10 @@ public class Assets { public static final String BBAT = "sprites/bloodbat.png"; public static final String RAT = "sprites/rat.png"; + + public static final String FLOWER_SLIME = "sprites/flowers_slime.png"; + + public static final String GREEN = "sprites/greenslting.png"; public static final String CLEAR = "sprites/clearelemt.png"; public static final String BRUTE = "sprites/brute.png"; public static final String SPINNER = "sprites/spinner.png"; @@ -385,6 +421,9 @@ public class Assets { public static final String DM300 = "sprites/dm300.png"; public static final String DM720 = "sprites/dm720.png"; public static final String WRAITH = "sprites/wraith.png"; + + public static final String REDWRAITH = "sprites/bluewraith.png"; + public static final String UNDEAD = "sprites/undead.png"; public static final String KING = "sprites/king.png"; public static final String PIRANHA = "sprites/piranha.png"; @@ -417,6 +456,7 @@ public class Assets { public static final String YOG = "sprites/yog.png"; public static final String LARVA = "sprites/larva.png"; public static final String GHOST = "sprites/ghost.png"; + public static final String PINKGHOST = "sprites/pinkghost.png"; public static final String MAKER = "sprites/wandmaker.png"; public static final String NYZD = "Npcs/nyz.png"; public static final String TROLL = "sprites/blacksmith.png"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/BGMPlayer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/BGMPlayer.java index ab9066026..754e093a5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/BGMPlayer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/BGMPlayer.java @@ -148,12 +148,14 @@ public class BGMPlayer { } } else { - if (Dungeon.bossLevel() && t == 5) { + if (Dungeon.bossLevel() && t == 5 || t == 4) { playBGM(Assets.BGM_BOSSA, true); - } else if (Dungeon.bossLevel() && t == 10) { + } else if (Dungeon.bossLevel() && t == 10 && Statistics.mimicking) { playBGM(Assets.BGM_BOSSB, true); - } else if (Dungeon.bossLevel() && t == 15 && Statistics.spawnersIce > 0) { - playBGM(Assets.BGM_BOSSC3, true); + } else if (Dungeon.bossLevel() && t == 10) { + playBGM(Assets.BGM_BOSSB2, true); + } else if (t == 14) { + playBGM(Assets.BGM_BOSSC, true); } else if (Dungeon.bossLevel() && t == 15) { if((Statistics.boss_enhance & 0x4) != 0) playBGM(Assets.BGM_BOSSC3, true); else playBGM(Assets.BGM_BOSSC, true); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java index 109b2c02a..14fd877c8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Badges.java @@ -123,6 +123,8 @@ public class Badges { READ_BOOK_TWO ( 56 ), + HIDEEN_BADAGEX( 57 ), + //gold PIRANHAS ( 64 ), //these names are a bit outdated, but it doesn't really matter. @@ -394,7 +396,7 @@ public class Badges { badge = Badge.HIGH_SCORE_4; local.add( badge ); } - if (score >= SSSP_SCORE * chalMultiplier * (amuletObtained ? 0.7 : 5)) { + if (score >= SSSP_SCORE * chalMultiplier * (amuletObtained ? 1 : 5)) { badge = Badge.HIGH_SCORE_5; local.add( badge ); } @@ -941,6 +943,8 @@ public class Badges { public static void validateVictory() { + Statistics.winGame = true; + Badge badge = Badge.VICTORY; displayBadge( badge ); @@ -1019,6 +1023,17 @@ public class Badges { displayBadge( Badge.HAPPY_END ); } + public static void silentValidateHDEX() { + if (!local.contains( Badge.HIDEEN_BADAGEX)){ + local.add( Badge.HIDEEN_BADAGEX); + } + } + + public static void HDEX() { + displayBadge( Badge.HIDEEN_BADAGEX); + } + + public static void KILLSAPPLE() { displayBadge( Badge.KILL_APPLE); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java index c2f574fdd..ea2ec9c2a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Challenges.java @@ -28,7 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.custom.CustomArmor; -import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -49,11 +48,15 @@ public class Challenges { public static final int STRONGER_BOSSES = 4096; public static final int DHXD = 8192; public static final int ICEDIED = 16384; + + public static final int PRO = 32768; - public static final int CS = 65536; + public static final int MOREROOM = 65536; - public static final int MAX_VALUE = 131072; + public static final int CS = 131072; + + public static final int MAX_VALUE = 131072*2; public static final String[] NAME_IDS = { "no_food", "no_armor", @@ -71,22 +74,23 @@ public class Challenges { "dhxd", "icedied", "pro", - "cs", + "morelevel", "cs", }; public static final int[] MASKS = { NO_FOOD, NO_ARMOR, NO_HEALING, NO_HERBALISM, SWARM_INTELLIGENCE, DARKNESS, NO_SCROLLS - , AQUAPHOBIA, CHAMPION_ENEMIES,RLPT,SBSG,EXSG,STRONGER_BOSSES,DHXD,ICEDIED,PRO,CS,CS, + , AQUAPHOBIA, CHAMPION_ENEMIES,RLPT,SBSG,EXSG,STRONGER_BOSSES,DHXD,ICEDIED,PRO,MOREROOM,CS, }; public String name; public static boolean isItemBlocked(Item item) { - if (Dungeon.isChallenged(NO_FOOD)) { - if (item instanceof SmallRation) { - return true; - } - } + //取消 +// if (Dungeon.isChallenged(NO_FOOD)) { +// if (item instanceof Food && !(item instanceof SmallRation || item instanceof MeatPie)) { +// return true; +// } +// } if(InterlevelScene.mode == InterlevelScene.Mode.RESET){ if (item instanceof Ankh) { @@ -119,10 +123,12 @@ public class Challenges { } - public static int activeChallenges(){ + public static int activeChallenges() { int chCount = 0; - for (int ch : Challenges.MASKS){ - if ((Dungeon.challenges & ch) != 0 && ch <= STRONGER_BOSSES) chCount++; + for (int ch : Challenges.MASKS) { + if ((Dungeon.challenges & ch) != 0 && ch <= MOREROOM && ch != PRO && ch != DHXD) { + chCount++; + } } return chCount; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java index 6ce976ee2..e6265649d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java @@ -5,7 +5,6 @@ import com.watabou.utils.Bundlable; import com.watabou.utils.Bundle; import java.util.ArrayList; -import java.util.Arrays; public class Conducts { public enum Conduct { @@ -33,8 +32,6 @@ public class Conducts { conducts = new ArrayList<>(); } - public ConductStorage(Conduct... conducts) {this.conducts = new ArrayList<>(Arrays.asList(conducts));} - public ConductStorage(ConductStorage storage) {this.conducts = new ArrayList<>(storage.conducts);} @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index d75639632..325638fb3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -60,7 +60,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.levels.AncientMysteryCityBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.AncientMysteryCityLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.CityLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.DeadEndLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.GardenLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.LinkLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; @@ -69,6 +71,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene; import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.shatteredpixel.shatteredpixeldungeon.utils.DungeonSeed; @@ -92,6 +95,8 @@ public class Dungeon { public static int nyzbuy; public static int boss; + public static boolean whiteDaymode; + public static boolean interfloorTeleportAllowed(){ if (Dungeon.level.locked || (Dungeon.hero != null && Dungeon.hero.belongings.getItem(Amulet.class) != null)){ return false; @@ -121,6 +126,42 @@ public class Dungeon { return level; } + public static Level GardenLevel(){ + + + Dungeon.level = null; + Actor.clear(); + + depth = 50; + + if (depth > Statistics.realdeepestFloor) { + Statistics.realdeepestFloor = depth;} + + Level level; + level = new GardenLevel(); + + level.create(); + + Statistics.qualifiedForNoKilling = !bossLevel(); + + return level; + } + + public static Level BackLevel(){ + Actor.clear(); + + depth = 17; + + Dungeon.level = new CityLevel(); + + if (depth > Statistics.realdeepestFloor) { + Statistics.realdeepestFloor = depth;} + + Statistics.qualifiedForNoKilling = !bossLevel(); + + return level; + } + //远古副本 public static Level AncityWaterLevel(){ @@ -318,6 +359,13 @@ public class Dungeon { //难度模式 difficultys = new Difficulty.HardStorage(SPDSettings.difficulty()); + TitleScene.Reusable = false; + + + TitleScene.NightDay = false; + + + mobsToChampion = -1; mobsToStateLing = -1; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java index f91961757..cc81a98f0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java @@ -49,10 +49,18 @@ public class PaswordBadges { public static void BIGX() { displayBadge( PaswordBadges.Badge.BIG_X ); } + public static void EXSG() { displayBadge( PaswordBadges.Badge.EXSG ); } + public static void NIGHT_CAT() { + displayBadge( PaswordBadges.Badge.NIGHT_CAT ); + } + + public static void ZQJ_FLOWER() { + displayBadge( Badge.ZQJ_GHOST ); + } public enum Badge { @@ -70,7 +78,11 @@ public class PaswordBadges { GODD_MAKE(12), BIG_X(13), - EXSG(14); + EXSG(14), + NIGHT_CAT(16), + + ZQJ_GHOST(17); + public boolean meta; @@ -198,7 +210,7 @@ public class PaswordBadges { } public static void displayBadge( Badge badge ) { - + PaswordBadges.loadGlobal(); if (badge == null) { return; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java index 7d9979a00..2a1701195 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDAction.java @@ -55,8 +55,6 @@ public class SPDAction extends GameAction { public static final GameAction SE = new SPDAction("se"); public static final GameAction WAIT = new SPDAction("wait"); - public static final GameAction SLPD = new SPDAction("slpd"); - public static final GameAction INVENTORY = new SPDAction("inventory"); public static final GameAction QUICKSLOT_1 = new SPDAction("quickslot_1"); public static final GameAction QUICKSLOT_2 = new SPDAction("quickslot_2"); @@ -64,6 +62,9 @@ public class SPDAction extends GameAction { public static final GameAction QUICKSLOT_4 = new SPDAction("quickslot_4"); public static final GameAction QUICKSLOT_5 = new SPDAction("quickslot_5"); public static final GameAction QUICKSLOT_6 = new SPDAction("quickslot_6"); + public static final GameAction QUICKSLOT_7 = new SPDAction("quickslot_7"); + public static final GameAction QUICKSLOT_8 = new SPDAction("quickslot_8"); + public static final GameAction QUICKSLOT_9 = new SPDAction("quickslot_9"); public static final GameAction BAG_1 = new SPDAction("bag_1"); public static final GameAction BAG_2 = new SPDAction("bag_2"); @@ -103,7 +104,7 @@ public class SPDAction extends GameAction { defaultBindings.put( Input.Keys.D, SPDAction.E ); defaultBindings.put( Input.Keys.SPACE, SPDAction.WAIT ); - defaultBindings.put( Input.Keys.K, SPDAction.SLPD ); +// defaultBindings.put( Input.Keys.K, SPDAction.SLPD ); defaultBindings.put( Input.Keys.UP, SPDAction.N ); defaultBindings.put( Input.Keys.LEFT, SPDAction.W ); @@ -135,6 +136,9 @@ public class SPDAction extends GameAction { defaultBindings.put( Input.Keys.BUTTON_A, SPDAction.QUICKSLOT_4 ); defaultBindings.put( Input.Keys.NUM_5, SPDAction.QUICKSLOT_5 ); defaultBindings.put( Input.Keys.NUM_6, SPDAction.QUICKSLOT_6 ); + defaultBindings.put( Input.Keys.NUM_7, SPDAction.QUICKSLOT_7 ); + defaultBindings.put( Input.Keys.NUM_8, SPDAction.QUICKSLOT_8 ); + defaultBindings.put( Input.Keys.NUM_9, SPDAction.QUICKSLOT_9 ); defaultBindings.put( Input.Keys.F1, SPDAction.BAG_1 ); defaultBindings.put( Input.Keys.F2, SPDAction.BAG_2 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java index 6fb5e999b..6ba761f8f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ShatteredPixelDungeon.java @@ -89,8 +89,8 @@ public class ShatteredPixelDungeon extends Game { com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFear.class, "com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAffection" ); com.watabou.utils.Bundle.addAlias( - com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepSleep.class, - "com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepenedSleep" ); + com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepenedSleep.class, + "com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepSleep" ); //v0.9.3 com.watabou.utils.Bundle.addAlias( diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java index 026410846..94cf7a214 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Statistics.java @@ -32,6 +32,12 @@ public class Statistics { //吃保底 public static int bossWeapons; + //中秋节幽灵特别行动 + public static boolean findMoon = false; + + //妻管严 + public static boolean deadGo = false; + public static boolean happyMode = false; //萨卡班甲鱼二阶段 @@ -111,6 +117,9 @@ public class Statistics { //珍宝 public static int dimandchestmazeCollected; + //宝物生成限制,避免有byd的十字架重复刷取 + public static int fuckGeneratorAlone; + public static int dageCollected; //首次对决 @@ -124,6 +133,10 @@ public class Statistics { public static float turnsPassed = 0f; public static boolean TryUsedAnmy= false; + public static boolean winGame = false; + + public static boolean HiddenOK = false; + public static void reset() { boss_enhance = 0; ChaicBlood = 0; @@ -132,6 +145,9 @@ public class Statistics { happyMode = false; + findMoon = false; + deadGo = false; + //萨卡班甲鱼二阶段 sakaBackStage = 0; @@ -141,6 +157,7 @@ public class Statistics { foodEaten = 0; goldchestmazeCollected = 0; dimandchestmazeCollected =0; + fuckGeneratorAlone = 0; itemsCrafted = 0; piranhasKilled = 0; ankhsUsed = 0; @@ -282,12 +299,31 @@ public class Statistics { private static final String BDTX = "bdtx"; + private static final String LOVE = "love"; + + private static final String LOVX = "lovx"; + + private static final String FUCKALONE = "fuckplayer"; + + private static final String WINGAME = "wingame"; + + private static final String HIDEEN = "hideen"; + public static void storeInBundle( Bundle bundle ) { + bundle.put(HIDEEN,HiddenOK); + + bundle.put(WINGAME,winGame); + bundle.put(BDTX,bossWeapons); + bundle.put(LOVE,findMoon); + bundle.put(LOVX,deadGo); + + bundle.put(FUCKALONE,fuckGeneratorAlone); + //分数 bundle.put( PROG_SCORE, progressScore ); bundle.put( ITEM_VAL, heldItemValue ); @@ -376,17 +412,25 @@ public class Statistics { public static void restoreFromBundle( Bundle bundle ) { + winGame = bundle.getBoolean(WINGAME); + + HiddenOK = bundle.getBoolean(HIDEEN); + //嗜血荆棘等级处理 ChaicBlood = bundle.getInt( CHACEBLOOD ); bossWeapons = bundle.getInt(BDTX); + fuckGeneratorAlone = bundle.getInt(FUCKALONE); + HealingIsDied = bundle.getInt( HEALDIED ); readBooks = bundle.getInt( READBOOKS ); sakaBackStage = bundle.getInt( SAKATWO ); + findMoon = bundle.getBoolean(LOVE); + deadGo = bundle.getBoolean(LOVX); //分数 progressScore = bundle.getInt( PROG_SCORE ); heldItemValue = bundle.getInt( ITEM_VAL ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 70bccf605..b68af80ce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -91,7 +91,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential; import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCleansing; -import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; @@ -141,7 +140,7 @@ public abstract class Char extends Actor { public int HT; public int HP; - protected float baseSpeed = 1; + public float baseSpeed = 1; protected PathFinder.Path path; public int paralysed = 0; @@ -606,12 +605,6 @@ public abstract class Char extends Actor { public float speed() { float speed = baseSpeed; - - - //提升20%移速 - MIME.GOLD_THREE getSpeed = Dungeon.hero.belongings.getItem(MIME.GOLD_THREE.class); - if (getSpeed!=null) speed *= 1.2f; - //创世神之怒 if ( buff( AnkhInvulnerability.GodDied.class ) != null ) speed *= 2f; @@ -1058,7 +1051,10 @@ public abstract class Char extends Actor { ScrollOfPsionicBlast.class)),new HashSet()), LARGE, IMMOVABLE, - NPC; + NPC, + HUNTER, + MIMIC, + HOLLOW; private HashSet resistances; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BeamTowerAdbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BeamTowerAdbility.java index e6a30b6e6..ee3166c6b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BeamTowerAdbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/BeamTowerAdbility.java @@ -1,5 +1,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -25,8 +27,9 @@ public class BeamTowerAdbility extends Buff { if (ch.alignment != Char.Alignment.ENEMY) { ch.damage(Random.IntRange(6, 10), CrystalDiedTower.class); Statistics.bossScores[3] -= 300; + //hero.sprite.showStatus(CharSprite.NEGATIVE, "300"); Buff.affect(ch, Cripple.class, 2f); - if (ch == Dungeon.hero && !ch.isAlive()) { + if (ch == hero && !ch.isAlive()) { Dungeon.fail(getClass()); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java index d4d3a59f3..090a95579 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java @@ -137,7 +137,7 @@ public abstract class ChampionEnemy extends Buff { } } - if (Dungeon.mobsToStateLing <= 0 && Dungeon.isChallenged(Challenges.SBSG)) { + if (Dungeon.mobsToStateLing <= 0 && Dungeon.isChallenged(Challenges.SBSG) && !m.properties.contains(Char.Property.NOBIG)) { Buff.affect(m, buffCls); m.state = m.WANDERING; } @@ -194,7 +194,7 @@ public abstract class ChampionEnemy extends Buff { //attack range of 2 /** 实现效果,此外还要关联CharSprite.java和Mob.java以实现远程效果*/ if(Random.Float()<0.1f) { - switch (Random.NormalIntRange(0,5)){ + switch (Random.NormalIntRange(0,6)){ //默认为毒雾 case 1:default: GameScene.add(Blob.seed(enemy.pos, 45, ToxicGas.class)); @@ -215,7 +215,7 @@ public abstract class ChampionEnemy extends Buff { target.sprite.zaplink( enemy.pos ); int dmg = Random.NormalIntRange( target.damageRoll()/5+3, target.damageRoll()/5+7 ); enemy.damage( dmg, new DarkBolt() ); - return target.fieldOfView[enemy.pos] && Dungeon.level.distance(target.pos, enemy.pos) <= 6; + return target.fieldOfView[enemy.pos] && Dungeon.level.distance(target.pos, enemy.pos) <= 3; } 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 index c3d0324b3..c32b395b3 100644 --- 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 @@ -3,7 +3,6 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuf 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; @@ -11,7 +10,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; -public class BlessAnmy extends Buff { +public class BlessAnmy extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoRead.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoRead.java index b796f9a2e..b309ec716 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoRead.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoRead.java @@ -2,7 +2,6 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuf import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -10,7 +9,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; -public class BlessGoRead extends Buff { +public class BlessGoRead extends ClearLanterBuff { { type = buffType.POSITIVE; @@ -30,10 +29,9 @@ public class BlessGoRead extends Buff { } if(hero.lanterfire > 60) { - float healDelay = 10f - 10*0.5f; - healDelay /= 0.1f; //effectively 1HP at lvl 0-5, 2HP lvl 6-8, 3HP lvl 9, and 5HP lvl 10. - target.HP = Math.min( target.HT, target.HP + (int)Math.ceil(5/healDelay)); + target.HP = Math.min( target.HT, target.HP + 2); + spend(3f); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoodSTR.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoodSTR.java index 225f28e5d..7125ee85d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoodSTR.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessGoodSTR.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class BlessGoodSTR extends Buff { +public class BlessGoodSTR extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessImmune.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessImmune.java index 9e2c5ca54..07b33a3ab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessImmune.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessImmune.java @@ -9,7 +9,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; -public class BlessImmune extends Buff { +public class BlessImmune extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessLing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessLing.java new file mode 100644 index 000000000..89be8011d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessLing.java @@ -0,0 +1,96 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +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; + +public class BlessLing extends ClearLanterBuff { + + { + type = Buff.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; + } + + 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(0x00ff00); + } + + @Override + public int icon() { + return BuffIndicator.NONE; + } + + +} + + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMixShiled.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMixShiled.java index 8faf18186..37f5d922e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMixShiled.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMixShiled.java @@ -12,7 +12,7 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; -public class BlessMixShiled extends Buff { +public class BlessMixShiled extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMobDied.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMobDied.java index 5e8cc8e21..2dec028fb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMobDied.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessMobDied.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class BlessMobDied extends Buff { +public class BlessMobDied extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessNoMoney.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessNoMoney.java index 564329de2..8eca59a36 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessNoMoney.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessNoMoney.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class BlessNoMoney extends Buff { +public class BlessNoMoney extends ClearLanterBuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessRedWhite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessRedWhite.java new file mode 100644 index 000000000..583e26dff --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/BlessRedWhite.java @@ -0,0 +1,101 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; + +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.watabou.noosa.Image; +import com.watabou.utils.Bundle; + +public class BlessRedWhite extends ClearLanterBuff { + + { + type = buffType.POSITIVE; + immunities.addAll(AntiMagic.RESISTS); + } + + public static int level = 0; + private int interval = 1; + + @Override + public boolean act() { + if (target.isAlive()) { + + if (level <= 0) { + detach(); + } + + + //effectively 1HP at lvl 0-5, 2HP lvl 6-8, 3HP lvl 9, and 5HP lvl 10. + target.HP = Math.min( target.HT, target.HP + 1); + spend(5f); + + } + + 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"); + } + + 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(0xFF1493); + } + + @Override + public int icon() { + return BuffIndicator.NONE; + } + + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/ClearLanterBuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/ClearLanterBuff.java new file mode 100644 index 000000000..298b617a1 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ClearBleesdGoodBuff/ClearLanterBuff.java @@ -0,0 +1,6 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; + +abstract public class ClearLanterBuff extends Buff { +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java index 353e73f4b..ad136ef7c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Healing.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; import com.shatteredpixel.shatteredpixeldungeon.Difficulty; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.DevItem.CrystalLing; import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; @@ -89,6 +90,12 @@ public class Healing extends Buff { percentHealPerTick = percentPerTick*2; flatHealPerTick = flatPerTick*2; } + CrystalLing crystalLing = Dungeon.hero.belongings.getItem(CrystalLing.class); + if(crystalLing != null) { + healingLeft = amount+(amount/3); + percentHealPerTick = percentPerTick*1.2f; + flatHealPerTick = flatPerTick+(flatPerTick/5); + } } public void increaseHeal( int amount ){ 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 0dc98b5eb..8578a9b35 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 @@ -53,7 +53,7 @@ public class IceHpBuff extends Buff { } if (hero.icehp < 25 && Dungeon.depth<10) { hero.damageIcehp(1); - spend(32f-(float) Dungeon.depth/5); + spend(50f-(float) Dungeon.depth/5); } else { spend(STEP); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlDebuff.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlDebuff.java new file mode 100644 index 000000000..26b4c0f3d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlDebuff.java @@ -0,0 +1,7 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; + +abstract public class MagicGirlDebuff extends Buff { + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayCursed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayCursed.java index 1d4e8727a..67f13ae21 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayCursed.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayCursed.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class MagicGirlSayCursed extends Buff { +public class MagicGirlSayCursed extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayKill.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayKill.java index 8a192213e..2601aef08 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayKill.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayKill.java @@ -1,12 +1,11 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.utils.Bundle; -public class MagicGirlSayKill extends Buff { +public class MagicGirlSayKill extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayMoneyMore.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayMoneyMore.java index ce4205673..1f08eebd2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayMoneyMore.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayMoneyMore.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class MagicGirlSayMoneyMore extends Buff { +public class MagicGirlSayMoneyMore extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayNoSTR.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayNoSTR.java index 574e52bad..bd694644a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayNoSTR.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSayNoSTR.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class MagicGirlSayNoSTR extends Buff { +public class MagicGirlSayNoSTR extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySlowy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySlowy.java index f1a738225..679ecea3e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySlowy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySlowy.java @@ -11,7 +11,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.watabou.noosa.Image; import com.watabou.utils.Bundle; -public class MagicGirlSaySlowy extends Buff { +public class MagicGirlSaySlowy extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySoftDied.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySoftDied.java index 10e556e1b..96d6aa03b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySoftDied.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/MagicGirlDebuff/MagicGirlSaySoftDied.java @@ -1,13 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; 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; -public class MagicGirlSaySoftDied extends Buff { +public class MagicGirlSaySoftDied extends MagicGirlDebuff { { type = buffType.POSITIVE; 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 index 034bb5090..51ddc2547 100644 --- 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 @@ -13,7 +13,7 @@ import com.watabou.noosa.Image; import com.watabou.utils.Bundle; import com.watabou.utils.Random; -public class MagicGirlSayTimeLast extends Buff { +public class MagicGirlSayTimeLast extends MagicGirlDebuff { { type = buffType.POSITIVE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Nyctophobia.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Nyctophobia.java index bdffe8315..728009d38 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Nyctophobia.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Nyctophobia.java @@ -7,6 +7,7 @@ import static com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene.cure; import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.ClearLanterBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayKill; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayMoneyMore; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayNoSTR; @@ -33,9 +34,14 @@ public class Nyctophobia extends Buff implements Hero.Doom { @Override public boolean act() { - if(hero.lanterfire == 90){ - goodLanterFire(); - spend(20f); + if(hero.lanterfire >= 90){ + //灯火大于90给予一个buff 然后不叠加 + for (Buff b : hero.buffs(ClearLanterBuff.class)){ + if(b == null){ + goodLanterFire(); + } + spend(200f); + } } if (hero.lanterfire < 51 && hero.lanterfire>31) { @@ -58,9 +64,9 @@ public class Nyctophobia extends Buff implements Hero.Doom { Buff.affect(hero, MagicGirlSayNoSTR.class).set( (100), 1 ); break; } - spend(50f); + spend(90f); } else if(hero.lanterfire < 0){ - hero.damage( (Dungeon.depth/5)*(Math.abs(hero.lanterfire)/2)+10, this ); + hero.damage( (int)((Dungeon.depth/5)*(Math.abs(hero.lanterfire)/2)+10), this ); spend(24f); GLog.w( Messages.get(this, "desc6") ); } @@ -80,7 +86,7 @@ public class Nyctophobia extends Buff implements Hero.Doom { } if (hero.lanterfire >= 0 ) { hero.damageLantern(1+Challenges.activeChallenges()/5); - spend(20f-(float) Dungeon.depth/5); + spend(20f-(float) Dungeon.depth/5+Challenges.activeChallenges()); } else { spend(STEP); } @@ -125,7 +131,7 @@ public class Nyctophobia extends Buff implements Hero.Doom { @Override public void onDeath() { - GLog.n("无尽的黑暗涌入了你的意识,你最终被黑暗拖入了深渊..."); + GLog.n(Messages.get(this, "ondeath")); } @Override 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 98626732f..2e023acdd 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 @@ -63,9 +63,11 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessGoRead; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessGoodSTR; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessImmune; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessLing; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessMixShiled; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessMobDied; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessNoMoney; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessRedWhite; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Combo; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corrosion; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; @@ -148,9 +150,13 @@ import com.shatteredpixel.shatteredpixeldungeon.items.lightblack.OilLantern; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDivineInspiration; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.DevItem.CrystalLing; import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.Red; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.RedWhiteRose; import com.shatteredpixel.shatteredpixeldungeon.items.quest.SakaFishSketon; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEvasion; @@ -271,7 +277,7 @@ public class Hero extends Char { public int exp = 0; //TODO 灯火前行 - public int lanterfire; + public float lanterfire; public int icehp; @@ -299,14 +305,17 @@ public class Hero extends Char { public void updateHT( boolean boostHP ){ int curHT = HT; - + HT = 20 + 5*(lvl-1) + HTBoost; + float multiplier = RingOfMight.HTMultiplier(this); HT = Math.round(multiplier * HT); if (buff(ElixirOfMight.HTBoost.class) != null){ HT += buff(ElixirOfMight.HTBoost.class).boost(); } + + if (boostHP){ HP += Math.max(HT - curHT, 0); @@ -335,6 +344,10 @@ public class Hero extends Char { strBonus += 2; } + if(Dungeon.hero.buff(BlessRedWhite.class) != null) { + strBonus += 2; + } + return STR + strBonus; } @@ -716,6 +729,16 @@ public class Hero extends Char { float speed = super.speed(); speed *= RingOfHaste.speedMultiplier(this); + + //提升20%移速 + MIME.GOLD_THREE getSpeed = Dungeon.hero.belongings.getItem(MIME.GOLD_THREE.class); + if (getSpeed!=null) { + speed *= 1.2f; + } + + if(Dungeon.hero.buff(BlessRedWhite.class) != null) { + speed *= 1.1f; + } if (belongings.armor() != null) { speed = belongings.armor().speedFactor(this, speed); @@ -937,6 +960,35 @@ public class Hero extends Char { } private boolean actMove( HeroAction.Move action ) { + + PotionOfPurity.PotionOfPurityLing potionOfPurityLing = Dungeon.hero.belongings.getItem(PotionOfPurity.PotionOfPurityLing.class); + if(potionOfPurityLing != null && !Dungeon.level.locked){ + potionOfPurityLing.detachAll( hero.belongings.backpack ); + } + + RedWhiteRose redWhiteRose = Dungeon.hero.belongings.getItem(RedWhiteRose.class); + if(redWhiteRose != null){ + Buff.affect(hero, BlessRedWhite.class).set( (100), 1 ); + } else { + Buff.detach(hero, BlessRedWhite.class); + } + + DriedRose rose = Dungeon.hero.belongings.getItem(DriedRose.class); + Red red = hero.belongings.getItem(Red.class); + if(red != null && Statistics.deadGo ){ + red.detachAll(hero.belongings.backpack); + } + if(rose != null && Statistics.deadGo){ + rose.detachAll(hero.belongings.backpack); + } + + CrystalLing crystalLing = Dungeon.hero.belongings.getItem(CrystalLing.class); + if(crystalLing != null){ + Buff.affect(hero, BlessLing.class).set( (100), 1 ); + } else { + Buff.detach(hero, BlessLing.class); + } + MIME.GOLD_FIVE getHeal = Dungeon.hero.belongings.getItem(MIME.GOLD_FIVE.class); if(getHeal != null && HT/4 > HP){ this.HP = HT; @@ -959,8 +1011,8 @@ public class Hero extends Char { exp = Random.NormalIntRange(10,20); } - ///测试坐标用 -// GLog.w(String.valueOf(hero.pos)); +// ///测试坐标用 +// GLog.w(String.valueOf(holiday)); //携带该物品时,玩家血量低于一半后自动隐身一段回合。 //actMove实现 @@ -984,9 +1036,13 @@ public class Hero extends Char { } + if(chCount>=6 && !lanterfireactive && !Dungeon.isChallenged(PRO)){ + GLog.n(Messages.get(WndStory.class, "warning")); + } + if(chCount >= 3 && !lanterfireactive && !Dungeon.isChallenged(PRO) || Dungeon.isChallenged(DHXD) && !lanterfireactive){ - //TODO 灯火前行 - lanterfire = 100; + //灯火前行 3.2 + lanterfire = 100 - (chCount>=6 ? chCount*3 : 0); new OilLantern().quantity(1).identify().collect(); lanterfireactive = true; @@ -1543,6 +1599,11 @@ public class Hero extends Char { dmg = (int)Math.ceil(dmg * RingOfTenacity.damageMultiplier( this )); + CrystalLing crystalLing = Dungeon.hero.belongings.getItem(CrystalLing.class); + if(crystalLing != null){ + dmg = (int)Math.ceil(dmg * RingOfTenacity.damageMultiplier( this )); + } + //TODO improve this when I have proper damage source logic if (belongings.armor() != null && belongings.armor().hasGlyph(AntiMagic.class, this) && AntiMagic.RESISTS.contains(src.getClass())){ @@ -2614,7 +2675,7 @@ public class Hero extends Char { hero.sprite.showStatus(0x808080, String.valueOf(value)); } - public void healLantern(int value){ + public void healLantern(float value){ lanterfire = Math.min(lanterfire+value,100); hero.sprite.showStatus(0x00ff00, String.valueOf(value)); } 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 2df69e2fa..72451f853 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 @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; import com.shatteredpixel.shatteredpixeldungeon.QuickSlot; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionHero; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessLing; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RandomBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.huntress.NaturesPower; @@ -46,6 +47,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.He import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Shockwave; import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.LevelTeleporter; import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.MobPlacer; +import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.SpawnArmor; +import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.SpawnWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.Amulet; import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -56,16 +59,17 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LamellarArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.custom.AncityArmor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.WraithAmulet; import com.shatteredpixel.shatteredpixeldungeon.items.bags.BookBag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.HerbBag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.KingBag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; -import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.DimandBook; import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.TestBooks; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie; +import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; @@ -75,38 +79,40 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.WaterSoul; import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfLightStromCloud; import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake; -import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.DevItem.CrystalLing; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; -import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMysticalEnergy; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMetamorphosis; import com.shatteredpixel.shatteredpixeldungeon.items.spells.AquaBlast; import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLightning; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfPrismaticLight; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth; 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.Gloves; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.IceFishSword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LockSword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RedBloodMoon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WashCrime; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.legend.DiedCrossBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingKnife; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingStone; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.HaloDart; +import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.plants.AikeLaier; -import com.shatteredpixel.shatteredpixeldungeon.plants.Firebloom; +import com.shatteredpixel.shatteredpixeldungeon.plants.Fadeleaf; import com.shatteredpixel.shatteredpixeldungeon.plants.SkyBlueFireBloom; import java.util.List; @@ -132,6 +138,11 @@ public enum HeroClass { Badges.BOSSTHREE(); } + if(RegularLevel.birthday == RegularLevel.DevBirthday.DEV_BIRTHDAY){ + new CrystalLing().quantity(1).identify().collect(); + Buff.affect(hero, BlessLing.class).set( (100), 1 ); + } + if (Dungeon.isChallenged(Challenges.AQUAPHOBIA)) { new WaterSoul().quantity(4).identify().collect(); } @@ -152,16 +163,17 @@ public enum HeroClass { new Amulet().quantity(1).identify().collect(); } - if (Dungeon.isChallenged(Challenges.PRO)){ new LevelTeleporter().quantity(1).identify().collect(); new LockSword().quantity(1).identify().collect(); - new IceFishSword().quantity(1).identify().collect(); + new MIME.GOLD_THREE().quantity(1).identify().collect(); + new ScrollOfMetamorphosis().quantity(111).identify().collect(); + new DriedRose().quantity(1).identify().collect(); new PotionOfInvisibility().quantity(45).identify().collect(); new AncityArmor().quantity(1).identify().collect(); new TengusMask().quantity(1).identify().collect(); - new RingOfWealth().quantity(1).identify().collect(); - new DiedCrossBow().quantity(1).identify().collect(); + new SpawnWeapon().quantity(1).identify().collect(); + new SpawnArmor().quantity(1).identify().collect(); Buff.affect(hero, ChampionHero.AntiMagic.class, 50000f); new WraithAmulet().quantity(1).identify().collect(); new BloodthirstyThorn().quantity(1).identify().collect(); @@ -178,7 +190,7 @@ public enum HeroClass { new PotionOfMindVision().quantity(50).identify().collect(); new PotionOfLiquidFlame().quantity(50).identify().collect(); - new DimandBook().quantity(50).identify().collect(); + new SmallRation.BlackMoon().quantity(50).identify().collect(); new PotionOfExperience().quantity(100).identify().collect(); new ScrollOfMagicMapping().quantity(100).identify().collect(); new ScrollOfUpgrade().quantity(100).identify().collect(); @@ -187,11 +199,13 @@ public enum HeroClass { new SkyBlueFireBloom.Seed().quantity(51).identify().collect(); new AikeLaier.Seed().quantity(51).identify().collect(); - new Firebloom.Seed().quantity(15).identify().collect(); + new Fadeleaf.Seed().quantity(15).identify().collect(); + + new WandOfPrismaticLight().quantity(1).identify().collect(); new WandOfRegrowth().quantity(1).identify().collect(); new WandOfFrost().quantity(1).identify().collect(); new MagicalInfusion().quantity(1).identify().collect(); - new ScrollOfMysticalEnergy().quantity(1).identify().collect(); + new ScrollOfTeleportation().quantity(1).identify().collect(); new AquaBlast().quantity(1).identify().collect(); new TestBooks().quantity(1).identify().collect(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 58086cedc..431c86aac 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -154,6 +154,16 @@ public enum Talent { public String toString() { return Messages.get(this, "name"); } public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); } }; + public static class LanterCooldown extends FlavourBuff{ + public int icon() { return BuffIndicator.NONE; } + public void tintIcon(Image icon) { icon.hardlight(0.15f, 0.2f, 0.5f); } + public float iconFadePercent() { return Math.max(0, visualcooldown() / 50); } + public String toString() { return Messages.get(this, "name"); } + public String desc() { return Messages.get(this, "desc", dispTurns(visualcooldown())); } + }; + + + public static class LethalMomentumTracker extends FlavourBuff{}; public static class StrikingWaveTracker extends FlavourBuff{}; public static class WandPreservationCounter extends CounterBuff{{revivePersists = true;}}; @@ -607,9 +617,11 @@ public enum Talent { public static void initArmorTalents( Hero hero ){ initArmorTalents( hero.armorAbility, hero.talents); } - - public static void initArmorTalents(ArmorAbility abil, ArrayList> talents ){ - if (abil == null) return; + public static ArrayList> initArmorTalents(ArmorAbility abil){ + return initArmorTalents(abil, new ArrayList()); + } + public static ArrayList> initArmorTalents(ArmorAbility abil, ArrayList> talents ){ + if (abil == null) return talents; while (talents.size() < MAX_TALENT_TIERS){ talents.add(new LinkedHashMap<>()); @@ -618,6 +630,7 @@ public enum Talent { for (Talent t : abil.talents()){ talents.get(3).put(t, 0); } + return talents; } private static final String TALENT_TIER = "talents_tier_"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java index 993edca9d..fe6c2c6e4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Bestiary.java @@ -25,6 +25,9 @@ import static com.shatteredpixel.shatteredpixeldungeon.Challenges.RLPT; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow.ApprenticeWitch; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow.Frankenstein; +import com.watabou.utils.DeviceCompat; import com.watabou.utils.Random; import java.util.ArrayList; @@ -45,18 +48,25 @@ public class Bestiary { if (Dungeon.isChallenged(RLPT) && !Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)){ switch (i) { case 1: - //3x rat, 1x snake - return new ArrayList<>(Arrays.asList( - Rat.class, Rat.class, - Rat.class)); + //开发者测试怪组 + if(DeviceCompat.isDebug() && DeviceCompat.isDesktop()){ + return new ArrayList<>(Arrays.asList( + Frankenstein.class, ApprenticeWitch.class, + FlowerSlime.class)); + } else { + return new ArrayList<>(Arrays.asList( + FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class)); + } + case 2: - return new ArrayList<>(Arrays.asList(Rat.class, - Rat.class, Rat.class, Gnoll.class, Gnoll.class, + return new ArrayList<>(Arrays.asList(FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, Gnoll.class, Gnoll.class, Gnoll.class, Gnoll.class, Albino.class)); case 3: - return new ArrayList<>(Arrays.asList(Rat.class, - Rat.class, Salamander.class, - Salamander.class, Rat.class, Rat.class, + return new ArrayList<>(Arrays.asList(FlowerSlime.class, + FlowerSlime.class, Salamander.class, + Salamander.class, FlowerSlime.class, FlowerSlime.class, ClearElemental.class,Crab.class,Swarm.class)); case 4: return new ArrayList<>(Arrays.asList(Salamander.class, @@ -153,11 +163,11 @@ public class Bestiary { Golem.class)); } default: - return new ArrayList<>(Arrays.asList(Rat.class, Rat.class, - Rat.class, - Rat.class, Rat.class, Rat.class, - Rat.class, Rat.class, Rat.class, - Rat.class)); + return new ArrayList<>(Arrays.asList(FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class)); } } switch (i) { @@ -165,23 +175,22 @@ public class Bestiary { case 1: //3x rat, 1x snake return new ArrayList<>(Arrays.asList( - Rat.class, Rat.class, - Rat.class)); + Rat.class, Rat.class)); case 2: - return new ArrayList<>(Arrays.asList(Rat.class, - Rat.class, Rat.class, Gnoll.class, Gnoll.class, + return new ArrayList<>(Arrays.asList(FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, Gnoll.class, Gnoll.class, Gnoll.class, Gnoll.class)); case 3: - return new ArrayList<>(Arrays.asList(Rat.class, - Rat.class, Salamander.class, - Salamander.class, Rat.class, Rat.class, + return new ArrayList<>(Arrays.asList(FlowerSlime.class, + FlowerSlime.class, Salamander.class, + Salamander.class, FlowerSlime.class, FlowerSlime.class, ClearElemental.class,Crab.class,Swarm.class)); case 4: return new ArrayList<>(Arrays.asList(Salamander.class, ClearElemental.class, Slime_Red.class, Slime_Orange.class, Swarm.class,Crab.class)); case 5: - return new ArrayList<>(Arrays.asList(Rat.class, Rat.class,Slime.class,Slime.class,Swarm.class,Crab.class)); + return new ArrayList<>(Arrays.asList(FlowerSlime.class, FlowerSlime.class,Slime.class,Slime.class,Swarm.class,Crab.class)); case 6: return new ArrayList<>(Arrays.asList(Skeleton.class, BlackHost.class,Guard.class, DM100.class, DM100.class, DM100.class)); @@ -203,7 +212,8 @@ public class Bestiary { Brute.class, Brute.class, Necromancer.class,Necromancer.class)); case 11: - return new ArrayList<>(Arrays.asList(Bat.class, DM100.class,DM100.class,ColdMagicRat.class,ColdMagicRat.class)); + return new ArrayList<>(Arrays.asList(Bat.class, DM100.class,DM100.class,ColdMagicRat.class, + ColdMagicRat.class)); case 12: //1x bat, 1x brute, 2x shaman, 2x spinner, 2x DM-300 return new ArrayList<>(Arrays.asList( @@ -271,7 +281,7 @@ public class Bestiary { return Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ? new ArrayList<>(Arrays.asList( Eye.class,ShieldHuntsman.class,RedMurderer.class,MolotovHuntsman.class)) : new ArrayList<>(Arrays.asList( - Eye.class,ShieldHuntsman.class)); + Eye.class,ShieldHuntsman.class)); case 23: //1x: succubus, 2x evil eye, 3x scorpio return Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ? new ArrayList<>(Arrays.asList( @@ -287,11 +297,11 @@ public class Bestiary { Eye.class, Scorpio.class, Succubus.class,Fire_Scorpio.class,Ice_Scorpio.class,ShieldHuntsman.class)); default: - return new ArrayList<>(Arrays.asList(Rat.class, Rat.class, - Rat.class, - Rat.class, Rat.class, Rat.class, - Rat.class, Rat.class, Rat.class, - Rat.class)); + return new ArrayList<>(Arrays.asList(FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class, FlowerSlime.class, FlowerSlime.class, + FlowerSlime.class)); } } @@ -329,7 +339,7 @@ public class Bestiary { for (int i = 0; i < rotation.size(); i++){ if (Random.Int( 50 ) == 0) { Class cl = rotation.get(i); - if (cl == Rat.class) { + if (cl == FlowerSlime.class) { cl = Albino.class; } else if (cl == Guard.class) { cl = SRPDHBLR.class; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackMimic.java new file mode 100644 index 000000000..243d9cebd --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackMimic.java @@ -0,0 +1,68 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; + +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.effects.CellEmitter; +import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.audio.Sample; + +public class BlackMimic extends Mimic { + + { + spriteClass = MimicSprite.Golden.class; + baseSpeed *= 3f; + } + + @Override + public String name() { + if (alignment == Char.Alignment.NEUTRAL){ + return Messages.get(Heap.class, "locked_chest"); + } else { + return super.name(); + } + } + + @Override + public String description() { + if (alignment == Char.Alignment.NEUTRAL){ + return Messages.get(Heap.class, "locked_chest_desc") + "\n\n" + Messages.get(this, "hidden_hint"); + } else { + return super.description(); + } + } + + public void stopHiding(){ + state = HUNTING; + if (Actor.chars().contains(this) && Dungeon.level.heroFOV[pos]) { + enemy = Dungeon.hero; + target = Dungeon.hero.pos; + enemySeen = true; + GLog.w(Messages.get(this, "reveal") ); + CellEmitter.get(pos).burst(Speck.factory(Speck.STAR), 10); + Sample.INSTANCE.play(Assets.Sounds.MIMIC, 1, 0.85f); + } + } + + @Override + public void setLevel(int level) { + super.setLevel(Math.round(level*3.33f)); + } + + @Override + public void generatePrize() { + super.generatePrize(); + //all existing prize items are guaranteed uncursed, and have a 50% chance to be +1 if they were +0 + for (Item i : items){ + i.cursed = false; + i.cursedKnown = true; + } + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlueWraith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlueWraith.java new file mode 100644 index 000000000..79b240c95 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlueWraith.java @@ -0,0 +1,66 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2014 Oleg Dolya + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; + + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; +import com.shatteredpixel.shatteredpixeldungeon.sprites.BlueWraithSprite; +import com.watabou.utils.Random; + +public class BlueWraith extends Wraith { + + { + spriteClass = BlueWraithSprite.class; + + HP = HT = 60; + defenseSkill = 24; + baseSpeed = 2.5f; + + EXP = 11; + } + + @Override + public int attackProc(Char enemy, int damage) { + if (Random.Int(10) == 0) { + Buff.affect(enemy, Vertigo.class, Vertigo.DURATION); + Buff.affect(enemy, Terror.class, Terror.DURATION).object = enemy.id(); + } + + return damage; + } + + @Override + public void adjustStats(int level) { + defenseSkill = 24; + enemySeen = true; + } + + @Override + public int damageRoll() { + return Random.NormalIntRange(20, 30); + } + + @Override + public int attackSkill(Char target) { + return 46; + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BruteBot.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BruteBot.java index 1ec64ea31..9fff68573 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BruteBot.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BruteBot.java @@ -47,7 +47,7 @@ public class BruteBot extends Mob implements Callback,Hero.Doom { loot = Generator.Category.WEAPON; lootChance = 0.25f; - + properties.add(Property.NOBIG); properties.add(Property.MINIBOSS); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ColdGurad.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ColdGurad.java index 1d21572ea..09cac1ff1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ColdGurad.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/ColdGurad.java @@ -145,7 +145,7 @@ public class ColdGurad extends Mob implements Callback { @Override public int drRoll() { - return Random.NormalIntRange(0, 5); + return Random.NormalIntRange(0, 2); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/CrystalMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/CrystalMimic.java index 69c277b01..2fea1cc61 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/CrystalMimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/CrystalMimic.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Levitation; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; @@ -54,7 +55,6 @@ public class CrystalMimic extends Mimic { { spriteClass = MimicSprite.Crystal.class; - flying = true; FLEEING = new Fleeing(); } @@ -107,6 +107,7 @@ public class CrystalMimic extends Mimic { public void stopHiding(){ state = FLEEING; + Buff.affect(this, Levitation.class, Levitation.DURATION/2f); //haste for 2 turns if attacking if (alignment == Alignment.NEUTRAL){ Buff.affect(this, Haste.class, 2f); @@ -174,7 +175,7 @@ public class CrystalMimic extends Mimic { } @Override - protected void generatePrize() { + public void generatePrize() { //Crystal mimic already contains a prize item. Just guarantee it isn't cursed. for (Item i : items){ i.cursed = false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandKing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandKing.java index 194752612..ed2194c51 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandKing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandKing.java @@ -725,7 +725,7 @@ public class DimandKing extends Boss { @Override public void detach() { super.detach(); - for (Mob m : Dungeon.level.mobs){ + for (Mob m : Dungeon.level.mobs.toArray(new Mob[0])){ if (m instanceof DimandKing){ m.damage(24, this); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandMimic.java index df9a32f3d..6bd0d41cf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandMimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DimandMimic.java @@ -159,7 +159,7 @@ public class DimandMimic extends Mimic { } @Override - protected void generatePrize() { + public void generatePrize() { super.generatePrize(); //all existing prize items are guaranteed uncursed, and have a 50% chance to be +1 if they were +0 for (Item i : items){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DwarfKing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DwarfKing.java index 377ae1c20..fe0bcee75 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DwarfKing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/DwarfKing.java @@ -40,8 +40,9 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Pushing; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.RainbowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; -import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown; @@ -230,6 +231,8 @@ public class DwarfKing extends Mob { } else { summonSubject(3, DKGolem.class); summonSubject(3, DKGolem.class); + summonSubject(3, DKBrute.class); + summonSubject(3, DKBrute.class); summonsMade += 2; spend(TICK); } @@ -292,8 +295,10 @@ public class DwarfKing extends Mob { //every 3rd summon is always a monk or warlock, otherwise ghoul //except every 9th summon, which is a golem! if (summonsMade % 3 == 2) { - if (summonsMade % 9 == 8){ + if (summonsMade % 9 == 8) { return summonSubject(delay, DKGolem.class); + } else if (summonsMade % 10 == 8){ + return summonSubject(delay, DKBrute.class); } else { return summonSubject(delay, Random.Int(2) == 0 ? DKMonk.class : DKWarlock.class); } @@ -324,7 +329,7 @@ public class DwarfKing extends Mob { private HashSet getSubjects(){ HashSet subjects = new HashSet<>(); for (Mob m : Dungeon.level.mobs){ - if (m.alignment == alignment && (m instanceof Ghoul || m instanceof Monk || m instanceof Warlock || m instanceof Golem)){ + if (m.alignment == alignment && (m instanceof Ghoul || m instanceof Monk || m instanceof Warlock || m instanceof IceGolem||m instanceof BruteBot)){ subjects.add(m); } } @@ -572,12 +577,19 @@ public class DwarfKing extends Mob { } } - public static class DKGolem extends Golem { + public static class DKGolem extends IceGolem { { state = HUNTING; } } + public static class DKBrute extends BruteBot { + { + HP = HT = 75; + state = HUNTING; + } + } + public static class Summoning extends Buff { private int delay; @@ -595,9 +607,11 @@ public class DwarfKing extends Mob { delay--; if (delay <= 0){ - if (summon == DKGolem.class){ - particles.burst(SparkParticle.FACTORY, 10); + particles.burst(SnowParticle.FACTORY, 10); + Sample.INSTANCE.play(Assets.Sounds.CHARGEUP); + } else if (summon == DKBrute.class){ + particles.burst(RainbowParticle.BURST, 10); Sample.INSTANCE.play(Assets.Sounds.CHARGEUP); } else if (summon == DKWarlock.class){ particles.burst(ShadowParticle.CURSE, 10); @@ -660,8 +674,10 @@ public class DwarfKing extends Mob { if (on && particles == null) { particles = CellEmitter.get(pos); - if (summon == DKGolem.class){ - particles.pour(SparkParticle.STATIC, 0.05f); + if (summon == DKBrute.class) { + particles.pour(RainbowParticle.BURST, 0.55f); + } else if (summon == DKGolem.class){ + particles.pour(SnowParticle.FACTORY, 0.05f); } else if (summon == DKWarlock.class){ particles.pour(ShadowParticle.UP, 0.1f); } else if (summon == DKMonk.class){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlameB01.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlameB01.java index 8976b51c4..79d21b534 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlameB01.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlameB01.java @@ -103,7 +103,7 @@ public class FlameB01 extends Mob { sprite.attack( enemy.pos ); spend( TIME_TO_BURN ); shoot(this, enemy.pos); - gasTankPressure -= Random.Int(1, 10); + gasTankPressure -= 60; } return !visible; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlowerSlime.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlowerSlime.java new file mode 100644 index 000000000..0d60afc14 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FlowerSlime.java @@ -0,0 +1,37 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FlowerSlimeSprites; +import com.watabou.utils.Random; + +public class FlowerSlime extends Mob { + + { + spriteClass = FlowerSlimeSprites.class; + + loot = Generator.Category.SEED; + lootChance = 0.05f; + + HP = HT = 12; + defenseSkill = 2; + maxLvl = 5; + } + + @Override + public int damageRoll() { + return Random.NormalIntRange( 2, 5 ); + } + + @Override + public int attackSkill( Char target ) { + return 8; + } + + @Override + public int drRoll() { + return Random.NormalIntRange(0, 2); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java index 14d3752b3..f4dc17d0a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GoldenMimic.java @@ -82,7 +82,7 @@ public class GoldenMimic extends Mimic { } @Override - protected void generatePrize() { + public void generatePrize() { super.generatePrize(); //all existing prize items are guaranteed uncursed, and have a 50% chance to be +1 if they were +0 for (Item i : items){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java index 3c3ff1f8c..abeccd48f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Golem.java @@ -20,7 +20,6 @@ */ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; - import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -30,20 +29,20 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.GolemSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.BArray; import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; - public class Golem extends Mob { - + { spriteClass = GolemSprite.class; - + HP = HT = 120; defenseSkill = 15; - + EXP = 12; maxLvl = 22; @@ -61,15 +60,15 @@ public class Golem extends Mob { public int damageRoll() { return Random.NormalIntRange( 25, 30 ); } - + @Override public int attackSkill( Char target ) { return 28; } - + @Override public int drRoll() { - return Random.NormalIntRange(0, 12); + return super.drRoll() + Random.NormalIntRange(0, 12); } @Override @@ -89,7 +88,7 @@ public class Golem extends Mob { Dungeon.LimitedDrops.GOLEM_EQUIP.count++; //uses probability tables for demon halls if (loot == Generator.Category.WEAPON){ - return Generator.randomWeapon(5); + return Generator.randomWeapon(5, true); } else { return Generator.randomArmor(5); } @@ -149,8 +148,8 @@ public class Golem extends Mob { int bestPos = enemy.pos; for (int i : PathFinder.NEIGHBOURS8){ if (Dungeon.level.passable[pos + i] - && Actor.findChar(pos+i) == null - && Dungeon.level.trueDistance(pos+i, enemy.pos) > Dungeon.level.trueDistance(bestPos, enemy.pos)){ + && Actor.findChar(pos+i) == null + && Dungeon.level.trueDistance(pos+i, enemy.pos) > Dungeon.level.trueDistance(bestPos, enemy.pos)){ bestPos = pos+i; } } @@ -164,6 +163,7 @@ public class Golem extends Mob { if (enemy instanceof Hero){ ((Hero) enemy).interrupt(); Dungeon.observe(); + GameScene.updateFog(); } } @@ -247,4 +247,4 @@ public class Golem extends Mob { } } -} +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java index cee83793c..aab9b0d3a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Goo.java @@ -50,9 +50,7 @@ public class Goo extends Mob { { if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { - HP = HT = 180; - } else { - HP = HT = Dungeon.isChallenged(Challenges.STRONGER_BOSSES) ? 120 : 100; + HP = HT = 120; } EXP = 10; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreenSlting.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreenSlting.java new file mode 100644 index 000000000..35e32785d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/GreenSlting.java @@ -0,0 +1,32 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.sprites.GreenSltingSprite; +import com.watabou.utils.Random; + +public class GreenSlting extends Mob { + + { + spriteClass = GreenSltingSprite.class; + flying = true; + HP = HT = 15; + defenseSkill = 2; + maxLvl = 7; + } + + @Override + public int damageRoll() { + return Random.NormalIntRange( 8, 12 ); + } + + @Override + public int attackSkill( Char target ) { + return 8; + } + + @Override + public int drRoll() { + return Random.NormalIntRange(2, 4); + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MagicGirlDead.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MagicGirlDead.java index 9d603a9fe..ad1971cea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MagicGirlDead.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MagicGirlDead.java @@ -365,8 +365,20 @@ public class MagicGirlDead extends Boss { super.damage(damage, src); int postHP = HP; if(preHP>healthThreshold[phase] && postHP<=healthThreshold[phase]){ - HP = healthThreshold[phase]; - goOnPhase(); + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + HP = healthThreshold[phase]; + goOnPhase(); + return true; + } + }); } if(phase>4) BossHealthBar.bleed(true); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java index 9479f0704..8a45c0d6b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mimic.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow.HollowMimic; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; @@ -57,9 +58,10 @@ public class Mimic extends Mob { spriteClass = MimicSprite.class; properties.add(Property.DEMONIC); + properties.add(Property.MIMIC); EXP = 0; - + //mimics are neutral when hidden alignment = Alignment.NEUTRAL; state = PASSIVE; @@ -103,7 +105,9 @@ public class Mimic extends Mob { @Override public String name() { - if (alignment == Alignment.NEUTRAL){ + if (alignment == Alignment.NEUTRAL && properties.contains(Property.HOLLOW)){ + return Messages.get(HollowMimic.class, "minames"); + } else if(alignment == Alignment.NEUTRAL) { return Messages.get(Heap.class, "chest"); } else { return super.name(); @@ -112,7 +116,9 @@ public class Mimic extends Mob { @Override public String description() { - if (alignment == Alignment.NEUTRAL){ + if (alignment == Alignment.NEUTRAL && properties.contains(Property.HOLLOW)) { + return Messages.get(HollowMimic.class, "midescs"); + } else if (alignment == Alignment.NEUTRAL){ return Messages.get(Heap.class, "chest_desc") + "\n\n" + Messages.get(this, "hidden_hint"); } else { return super.description(); @@ -289,7 +295,7 @@ public class Mimic extends Mob { return m; } - protected void generatePrize(){ + public void generatePrize(){ Item reward = null; do { switch (Random.Int(5)) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java index 4b4c37173..6b51f7772 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Mob.java @@ -27,6 +27,7 @@ import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyCond import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.HARD; import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.NORMAL; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; +import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer; @@ -636,7 +637,8 @@ public abstract class Mob extends Char { @Override public int attackProc(Char enemy, int damage) { - if(Dungeon.isChallenged(DHXD)){ + //除了直接点击 布尔判定也应该生效 + if(Dungeon.isChallenged(DHXD)||lanterfireactive){ damageAttackProcLanterMob(); } @@ -660,25 +662,27 @@ public abstract class Mob extends Char { // boolean GhostQuestMob = this instanceof GreatCrab ||this instanceof GnollTrickster || this instanceof FetidRat; - //15%的老鼠 (-1) <85 - if (isHero && this instanceof Rat && one && hero.lanterfire < 85) ((Hero) enemy).damageLantern(1); - //25%的监狱守卫 (-1) <85 - if (isHero && this instanceof Guard && two && hero.lanterfire < 85) ((Hero) enemy).damageLantern(1); - //15%的豺狼萨满 (-2) <70 - if (isHero && this instanceof Shaman && one && hero.lanterfire < 70) ((Hero) enemy).damageLantern(2); - //50%的幽灵任务怪 (-5) <95 NZND - if (isHero && GhostQuestMob && four && hero.lanterfire < 95) ((Hero) enemy).damageLantern(5); + //15%的老鼠 (-1) <95 + if (isHero && this instanceof Rat && one && hero.lanterfire < 95) ((Hero) enemy).damageLantern(1); + //25%的监狱守卫 (-1) <90 + if (isHero && this instanceof Guard && two && hero.lanterfire < 90) ((Hero) enemy).damageLantern(1); + //15%的豺狼萨满 (-2) <80 + if (isHero && this instanceof Shaman && one && hero.lanterfire < 80) ((Hero) enemy).damageLantern(2); + //50%的幽灵任务怪 (-4) 均要扣减 + if (isHero && GhostQuestMob && four) ((Hero) enemy).damageLantern(4); //怨灵 75%的概率-6灯火 且必定死亡 if (isHero && this instanceof Wraith && three ){ ((Hero) enemy).damageLantern(6); this.die(true); } //新生火元素 25%的概率-6灯火 <80 - if (isHero && this instanceof Elemental.NewbornFireElemental && two && hero.lanterfire < 80 ) ((Hero) enemy).damageLantern(2); + if (isHero && this instanceof Elemental.NewbornFireElemental && two && hero.lanterfire < 80 ) ((Hero) enemy).damageLantern(6); //矿洞蜘蛛 15%的概率-3灯火 <70 if (isHero && this instanceof Wraith && one && hero.lanterfire < 70 ) ((Hero) enemy).damageLantern(3); //矮人术士 85%的概率-5灯火 <70 - if (isHero && this instanceof Warlock && five && hero.lanterfire < 50 ) ((Hero) enemy).damageLantern(5); + if (isHero && this instanceof Warlock && five && hero.lanterfire < 70 ) ((Hero) enemy).damageLantern(5); + //黑色怨灵 85%的概率-5灯火 <90 + if (isHero && this instanceof BlackHost && five && hero.lanterfire < 90 ) ((Hero) enemy).damageLantern(5); } @@ -870,7 +874,7 @@ public abstract class Mob extends Char { PaswordBadges.loadGlobal(); List passwordbadges = PaswordBadges.filtered( true ); if (global.contains( Badges.Badge.KILL_APPLE ) && global.contains( Badges.Badge.KILL_DM720 ) && - global.contains( Badges.Badge.KILL_MG) && passwordbadges.contains(PaswordBadges.Badge.FIREGIRL) && passwordbadges.contains(PaswordBadges.Badge.DRAWF_HEAD) && passwordbadges.contains(PaswordBadges.Badge.SAKA_DIED)) { + global.contains( Badges.Badge.KILL_MG) && passwordbadges.contains(PaswordBadges.Badge.FIREGIRL) && passwordbadges.contains(PaswordBadges.Badge.DRAWF_HEAD) && passwordbadges.contains(PaswordBadges.Badge.SAKA_DIED) && !passwordbadges.contains(PaswordBadges.Badge.SPICEALBOSS)) { PaswordBadges.Badge badge = PaswordBadges.Badge.SPICEALBOSS; PaswordBadges.displayBadge( badge ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/OldDM300.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/OldDM300.java index 8ef71c9d2..1b754cc68 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/OldDM300.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/OldDM300.java @@ -21,11 +21,17 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis; @@ -33,36 +39,43 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; +import com.shatteredpixel.shatteredpixeldungeon.levels.CavesLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; -import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300Sprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.DM275Sprite; 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.PathFinder; import com.watabou.utils.Random; -public class OldDM300 extends Mob { +public class OldDM300 extends FlameB01 { { - spriteClass = DM300Sprite.class; - - HP = HT = 240; + spriteClass = DM275Sprite.class; + state = PASSIVE; + HP = HT = 270; EXP = 30; defenseSkill = 18; - maxLvl=-9999; - baseSpeed = 4.3f; + maxLvl=30; + baseSpeed = 0.85f; - properties.add(Property.BOSS); + properties.add(Property.LARGE); + properties.add(Property.MINIBOSS); properties.add(Property.INORGANIC); + properties.add(Property.FIERY); } - + @Override public int damageRoll() { - return Random.NormalIntRange( 20, 25 ); + return Random.NormalIntRange( 10, 20 ); } @Override @@ -74,11 +87,57 @@ public class OldDM300 extends Mob { public int drRoll() { return Random.NormalIntRange(0, 10); } - + public static boolean seenBefore = false; + + + @Override + public void add(Buff buff) { + super.add(buff); + LockedFloor lock = Dungeon.hero.buff(LockedFloor.class); + + if(lock == null && !seenBefore && Dungeon.level.heroFOV[pos]){ + if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))) { + AlarmTrap alarmTrap = new AlarmTrap(); + alarmTrap.pos = pos; + alarmTrap.activate(); + CavesLevel level = (CavesLevel) Dungeon.level; + level.seal(); + level.updateChasmTerrain(); + ScrollOfTeleportation.appear(hero, pos+8); + } + } + + if (state == PASSIVE && buff.type == Buff.buffType.NEGATIVE && Dungeon.level.heroFOV[pos]){ + state = HUNTING; + } + } + @Override public boolean act() { - - //GameScene.add( Blob.seed( pos, 30, ToxicGas.class ) ); + LockedFloor lock = Dungeon.hero.buff(LockedFloor.class); + + if (lock == null && Dungeon.level.heroFOV[pos]){ + CavesLevel level = (CavesLevel) Dungeon.level; + level.seal(); + level.updateChasmTerrain(); + if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))) { + AlarmTrap alarmTrap = new AlarmTrap(); + alarmTrap.pos = pos; + alarmTrap.activate(); + ScrollOfTeleportation.appear(hero, pos+8); + } + } + + int evaporatedTiles = Random.chances(new float[]{0, 1, 2}); + + for (int i = 0; i < evaporatedTiles; i++) { + int cell = pos + PathFinder.NEIGHBOURS8[Random.Int(8)]; + if (Dungeon.level.map[cell] == Terrain.WATER){ + Level.set( cell, Terrain.EMPTY); + GameScene.updateMap( cell ); + CellEmitter.get( cell ).burst( Speck.factory( Speck.STEAM ), 10 ); + } + } return super.act(); } @@ -89,11 +148,12 @@ public class OldDM300 extends Mob { if (Dungeon.level.map[step] == Terrain.WATER && HP < HT) { - HP += Random.Int( 1, HT - HP ); + HP += Random.Int( 1, (HT - HP)/3 ); sprite.emitter().burst( ElmoParticle.FACTORY, 5 ); if (Dungeon.level.heroFOV[step] && Dungeon.hero.isAlive()) { - GLog.n( Messages.get(this, "repair") ); + sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "repair")); + gasTankPressure += 20; } } @@ -125,9 +185,68 @@ public class OldDM300 extends Mob { } } + @Override + public void notice() { + super.notice(); + if (!BossHealthBar.isAssigned()) { + BossHealthBar.assignBoss(this); + yell(Messages.get(this, "notice")); + GameScene.bossReady(); + } + } + + @Override + public void die( Object cause ) { + super.die( cause ); + playBGM(Assets.BGM_3, true); + CavesLevel level = (CavesLevel) Dungeon.level; + Buff.detach( hero, LockedFloor.class ); + level.updateChasmTerrain(); + //60% chance of 2 shards, 30% chance of 3, 10% chance for 4. Average of 2.5 + int shards = Random.chances(new float[]{0, 0, 6, 3, 1}); + for (int i = 0; i < shards; i++){ + int ofs; + do { + ofs = PathFinder.NEIGHBOURS8[Random.Int(8)]; + } while (!Dungeon.level.passable[pos + ofs]); + Dungeon.level.drop( Generator.randomUsingDefaults(Generator.Category.MIS_T3), pos + ofs ).sprite.drop( pos ); + Dungeon.level.drop( Generator.randomUsingDefaults(Generator.Category.POTION), pos + ofs ).sprite.drop( pos ); + Dungeon.level.drop( Generator.randomUsingDefaults(Generator.Category.FOOD), pos + ofs ).sprite.drop( pos ); + Dungeon.level.drop( Generator.randomUsingDefaults(Generator.Category.SEED), pos + ofs ).sprite.drop( pos ); + Dungeon.level.drop( Generator.randomUsingDefaults(Generator.Category.WAND), pos).sprite.drop( pos ); + + } + GameScene.bossSlain(); + for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])){ + if (mob instanceof DM201 ) { + mob.die( cause ); + } + } + yell( Messages.get(this, "defeated") ); + } + @Override public void damage(int dmg, Object src) { super.damage(dmg, src); + if (state == PASSIVE) { + state = HUNTING; + notice(); + ScrollOfTeleportation.appear(hero, pos+8); + CavesLevel level = (CavesLevel) Dungeon.level; + level.seal(); + level.updateChasmTerrain(); + } + + if(HP<50){ + for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])){ + if (mob instanceof DM201 ) { + mob.die(true); + Buff.affect(this, Barrier.class).setShield(140); + } + } + } + + LockedFloor lock = Dungeon.hero.buff(LockedFloor.class); if (lock != null && !isImmune(src.getClass())) lock.addTime(dmg*1.5f); } @@ -140,7 +259,10 @@ public class OldDM300 extends Mob { @Override public void restoreFromBundle(Bundle bundle) { super.restoreFromBundle(bundle); - BossHealthBar.assignBoss(this); + if (state == HUNTING){ + BossHealthBar.assignBoss(this); + } + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedLunar.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedLunar.java index 6c9e845af..874d0632f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedLunar.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedLunar.java @@ -113,14 +113,10 @@ public class RedLunar extends Mob { ratCount++; } } - if (ratCount < 3 && delay <= 0) { - return true; - } else { - return false; - } + return ratCount < 3 && delay <= 0; } - private int combo = 0; + private final int combo = 0; @Override public boolean attack( Char enemy ) { @@ -135,7 +131,7 @@ public class RedLunar extends Mob { else return false; } - private boolean chainsUsed = false; + private final boolean chainsUsed = false; private boolean chain(int target){ if (chainsUsed || enemy.properties().contains(Property.IMMOVABLE)) return false; @@ -200,8 +196,8 @@ public class RedLunar extends Mob { public int attackProc(Char var1, int var2) { var2 = super.attackProc(var1, var2 / 2); if (Random.Int(2) == 0) { - ((Bleeding)Buff.affect(var1, Bleeding.class)).set((float)(var2 * 1)); - ((Poison)Buff.affect(var1, Poison.class)).set((float)(var2 * 1)); + Buff.affect(var1, Bleeding.class).set((float)(var2)); + Buff.affect(var1, Poison.class).set((float)(var2)); } return var2; } @@ -212,7 +208,7 @@ public class RedLunar extends Mob { defenseSkill = attackSkill( null ) * 5; enemySeen = true; } - private int summonCooldown = 10; + private final int summonCooldown = 10; private static final float SPAWN_DELAY = 2f; public static RedLunar spawnAt(int pos ) { if (!Dungeon.level.solid[pos] && Actor.findChar( pos ) == null) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedSwarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedSwarm.java index f52eff244..9a721b723 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedSwarm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/RedSwarm.java @@ -49,6 +49,9 @@ public class RedSwarm extends Mob implements Callback { defenseSkill = 4; EXP = 15; + + flying = true; + maxLvl = 18; loot = Generator.Category.POTION; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Orange.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Orange.java index 6f5d02847..416410ef6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Orange.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Orange.java @@ -38,7 +38,7 @@ public class Slime_Orange extends Slime { lootChance = 0.25f; //by default, see rollToDropLoot() loot = PotionOfLiquidFlame.class; properties.add(Property.ACIDIC); - maxLvl = 12; + maxLvl = 4; EXP=3; } private int combo = 0; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Red.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Red.java index 2b778eb2e..a68dabd0c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Red.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Slime_Red.java @@ -32,7 +32,7 @@ public class Slime_Red extends Slime { { spriteClass = RedSprites.class; - maxLvl = 16; + maxLvl = 4; lootChance = 0.15f; loot = PotionOfHealing.class; properties.add(Property.ACIDIC); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java index 490613afe..59b03f489 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Swarm.java @@ -116,7 +116,7 @@ public class Swarm extends Mob { public int attackSkill( Char target ) { return 10; } - + private Swarm split() { Swarm clone = new Swarm(); clone.generation = generation + 1; @@ -130,9 +130,15 @@ public class Swarm extends Mob { for (Buff b : buffs(ChampionEnemy.class)){ Buff.affect( clone, b.getClass()); } + return clone; } + @Override + public void die( Object cause ) { + super.die(cause); + } + @Override public float lootChance() { lootChance = 1f/(6 * (generation+1) ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java index ff2671747..2ce749a30 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Tengu.java @@ -21,10 +21,13 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.depth; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Challenges; 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.Char; @@ -36,7 +39,10 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RoseShiled; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; @@ -47,6 +53,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.HalomethaneFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; @@ -55,6 +62,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.LloydsBeacon; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.PrisonBossLevel; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; @@ -204,6 +212,7 @@ public class Tengu extends Mob { if (Dungeon.hero.subClass == HeroSubClass.NONE) { Dungeon.level.drop( new TengusMask(), pos ).sprite.drop(); } + Dungeon.level.drop( new CrystalKey(depth), pos-1 ).sprite.drop(); Statistics.bossScores[1] += 2000; GameScene.bossSlain(); super.die( cause ); @@ -217,9 +226,46 @@ public class Tengu extends Mob { yell( Messages.get(this, "defeated") ); } - + + //7回合的开场动画 + private int timeLeft = 12; + float incTime = 0; @Override protected boolean canAttack( Char enemy ) { + /**Tengu Ready Animation + 天狗动画,切换地块变得河里 + */ + if (timeLeft >= 0 && incTime >= 0){ + timeLeft -= 1; + incTime = 0; + + if(timeLeft == 11){ + //给予玩家玫瑰结界+冰冻,保证有7回合无敌且无法行动的时间 + Buff.affect(enemy, Frost.class, timeLeft); + Buff.affect(enemy, RoseShiled.class, timeLeft); + //给予天狗鬼磷燃烧buff,使它攻击玩家的同时也会布置陷阱。可以提前告知玩家天狗的一阶段行动策略 + Buff.affect(this, HalomethaneBurning.class ).reignite( this, timeLeft*1000 ); + GLog.n(Messages.get(Tengu.class, "cut_you")); + } + + if(timeLeft == 9){ + enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Tengu.class, "rose")); + } + + if(timeLeft == 7){ + this.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Tengu.class, "cut_you2",enemy.name())); + } + + //到达0后,天狗去除磷火buff,并且血量回满 + if(timeLeft == 0){ + //TODO 乐,所以还是用到了resetScene() + ShatteredPixelDungeon.resetScene(); + HP = HT; + Buff.detach(this, HalomethaneBurning.class ); + GLog.n(Messages.get(Tengu.class, "ready",enemy.name())); + } + } + return new Ballistica( pos, enemy.pos, Ballistica.PROJECTILE).collisionPos == enemy.pos; } @@ -342,6 +388,10 @@ public class Tengu extends Mob { private static final String ABILITIES_USED = "abilities_used"; private static final String ARENA_JUMPS = "arena_jumps"; private static final String ABILITY_COOLDOWN = "ability_cooldown"; + + private static final String ANMONTION_TIME = "an_time"; + + private static final String INCE_TIME = "ince_time"; @Override public void storeInBundle(Bundle bundle) { @@ -350,6 +400,10 @@ public class Tengu extends Mob { bundle.put( ABILITIES_USED, abilitiesUsed ); bundle.put( ARENA_JUMPS, arenaJumps ); bundle.put( ABILITY_COOLDOWN, abilityCooldown ); + + bundle.put(ANMONTION_TIME,timeLeft); + + bundle.put(INCE_TIME,incTime); } @Override @@ -361,6 +415,9 @@ public class Tengu extends Mob { abilitiesUsed = bundle.getInt( ABILITIES_USED ); arenaJumps = bundle.getInt( ARENA_JUMPS ); abilityCooldown = bundle.getInt( ABILITY_COOLDOWN ); + + timeLeft =bundle.getInt( ANMONTION_TIME); + incTime =bundle.getInt( INCE_TIME); BossHealthBar.assignBoss(this); if (HP <= HT/2) BossHealthBar.bleed(true); @@ -370,11 +427,14 @@ public class Tengu extends Mob { private boolean yelledCoward = false; //tengu is always hunting + + + private class Hunting extends Mob.Hunting{ - + @Override public boolean act(boolean enemyInFOV, boolean justAlerted) { - + enemySeen = enemyInFOV; if (enemyInFOV && !isCharmedBy( enemy ) && canAttack( enemy )) { @@ -403,8 +463,9 @@ public class Tengu extends Mob { } spend( TICK ); + return true; - + } } } @@ -605,7 +666,7 @@ public class Tengu extends Mob { if (PathFinder.distance[cell] < Integer.MAX_VALUE) { Char ch = Actor.findChar(cell); if (ch != null && !(ch instanceof Tengu)) { - int dmg = Random.NormalIntRange(5 + Dungeon.depth, 10 + Dungeon.depth * 2); + int dmg = Random.NormalIntRange(5 + depth, 10 + depth * 2); dmg -= ch.drRoll(); if (dmg > 0) { @@ -842,7 +903,12 @@ public class Tengu extends Mob { Char ch = Actor.findChar( cell ); if (ch != null && !ch.isImmune(Fire.class) && !(ch instanceof Tengu)) { - Buff.affect( ch, Burning.class ).reignite( ch ); + if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ + Buff.affect( ch, HalomethaneBurning.class ).reignite( ch ); + } else { + Buff.affect( ch, Burning.class ).reignite( ch ); + } + } if (Dungeon.level.flamable[cell]){ @@ -857,7 +923,12 @@ public class Tengu extends Mob { } burned = true; - CellEmitter.get(cell).start(FlameParticle.FACTORY, 0.03f, 10); + if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ + CellEmitter.get(cell).start(HalomethaneFlameParticle.FACTORY, 0.03f, 10); + } else { + CellEmitter.get(cell).start(FlameParticle.FACTORY, 0.03f, 10); + } + } } } @@ -1027,7 +1098,7 @@ public class Tengu extends Mob { Char ch = Actor.findChar(cell); if (ch != null && !(ch instanceof Tengu)){ - ch.damage(2 + Dungeon.depth, new Electricity()); + ch.damage(2 + depth, new Electricity()); if (ch == Dungeon.hero){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java index f9a9a2f9e..5b9f8e178 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogDzewa.java @@ -42,6 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.YogSprite; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Camera; import com.watabou.noosa.Game; import com.watabou.noosa.audio.Music; import com.watabou.utils.Bundle; @@ -386,6 +387,16 @@ public class YogDzewa extends Mob { if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ addFist((YogFist)Reflection.newInstance(challengeSummons.remove(0))); + if(phase == 3){ + YogFist.FreezingFist freezingFist = new YogFist.FreezingFist(); + freezingFist.pos = pos-3; + GameScene.add(freezingFist); + Camera.main.shake(1,3f); + GameScene.flash(0x808080,true); + YogFist.HaloFist haloFist = new YogFist.HaloFist(); + haloFist.pos = pos+3; + GameScene.add(haloFist); + } } CellEmitter.get(Dungeon.level.exit-1).burst(ShadowParticle.UP, 25); @@ -435,6 +446,9 @@ public class YogDzewa extends Mob { GameScene.add(fist, 4); Actor.addDelayed( new Pushing( fist, Dungeon.level.exit, fist.pos ), -1 ); Dungeon.level.occupyCell(fist); + + + } public void updateVisibility( Level level ){ @@ -489,6 +503,10 @@ public class YogDzewa extends Mob { Badges.GOODRLPT(); } + if(!Dungeon.whiteDaymode){ + PaswordBadges.NIGHT_CAT(); + } + if(Dungeon.isChallenged(AQUAPHOBIA)){ Badges.CLEARWATER(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java index 4289153f5..b4288a445 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogFist.java @@ -26,19 +26,28 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Freezing; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.HalomethaneFire; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; 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.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; +import com.shatteredpixel.shatteredpixeldungeon.effects.Beam; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.effects.TargetedCell; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Viscosity; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; @@ -49,11 +58,17 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.FistSprite; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Game; import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; +import java.util.ArrayList; +import java.util.HashSet; + public abstract class YogFist extends Mob { { @@ -67,7 +82,11 @@ public abstract class YogFist extends Mob { maxLvl = -2; state = HUNTING; - + properties.add(Property.ICY); + properties.add(Property.FIERY); + immunities.add(FrostBurning.class); + immunities.add(HalomethaneBurning.class); + immunities.add(Terror.class); properties.add(Property.BOSS); properties.add(Property.DEMONIC); } @@ -380,7 +399,7 @@ public abstract class YogFist extends Mob { b.announced = false; b.set(dmg*.6f); b.attachTo(this); - sprite.showStatus(CharSprite.WARNING, b.toString() + " " + (int)b.level()); + sprite.showStatus(CharSprite.WARNING, b + " " + (int)b.level()); } else{ super.damage(dmg, src); } @@ -583,4 +602,287 @@ public abstract class YogFist extends Mob { } + public static class FreezingFist extends YogFist { + + { + spriteClass = FistSprite.Ice.class; + HP = HT = 550; + properties.add(Property.ICY); + + properties.add(Property.FIERY); + immunities.add(FrostBurning.class); + immunities.add(HalomethaneBurning.class); + immunities.add(Terror.class); + + + canRangedInMelee = false; + } + + @Override + public boolean act() { + GameScene.add(Blob.seed(pos, 20, Freezing.class)); + return super.act(); + } + + + @Override + protected void incrementRangedCooldown() { + //ranged attack has no cooldown + } + + //used so resistances can differentiate between melee and magical attacks + public static class LightBeam{} + + @Override + protected void zap() { + spend( 3f ); + + if (hit( this, enemy, true )) { + + enemy.damage( Random.NormalIntRange(10, 20), new LightBeam() ); + Buff.prolong( enemy, Chill.class, Chill.DURATION/2f ); + + if (!enemy.isAlive() && enemy == Dungeon.hero) { + Dungeon.fail( getClass() ); + GLog.n( Messages.get(Char.class, "kill", name()) ); + } + + } else { + + enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() ); + } + + } + + @Override + public void damage(int dmg, Object src) { + super.damage(dmg, src); + LockedFloor buff = Dungeon.hero.buff(LockedFloor.class); + if (buff != null) { + buff.addTime(dmg * 0.5f); + } + } + + } + + public static class HaloFist extends YogFist { + + { + HP = HT = 550; + spriteClass = FistSprite.HaloFist.class; + properties.add(Property.FIERY); + immunities.add(FrostBurning.class); + immunities.add(HalomethaneBurning.class); + immunities.add(Terror.class); + } + + private int phase = 1; + + private int summonsMade = 0; + private static final int MIN_ABILITY_CD = 7; + private int lastHeroPos; + private static final int MAX_ABILITY_CD = 12; + private float summonCooldown = 0; + private float abilityCooldown = 3; + + private static float[] chanceMap = {0f, 100f, 100f, 100f, 100f, 100f, 100f}; + private int wave=0; + + private int lastAbility = 0; + + private static final String PHASE = "phase"; + private static final String SUMMONS_MADE = "summons_made"; + + private static final String SUMMON_CD = "summon_cd"; + private static final String ABILITY_CD = "ability_cd"; + private static final String LAST_ABILITY = "last_ability"; + + private static final String TARGETED_CELLS = "targeted_cells"; + private ArrayList targetedCells = new ArrayList<>(); + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put( PHASE, phase ); + bundle.put( SUMMONS_MADE, summonsMade ); + bundle.put( SUMMON_CD, summonCooldown ); + bundle.put( ABILITY_CD, abilityCooldown ); + bundle.put( LAST_ABILITY, lastAbility ); + bundle.put("wavePhase2", wave); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + phase = bundle.getInt( PHASE ); + summonsMade = bundle.getInt( SUMMONS_MADE ); + summonCooldown = bundle.getFloat( SUMMON_CD ); + abilityCooldown = bundle.getFloat( ABILITY_CD ); + lastAbility = bundle.getInt( LAST_ABILITY ); + wave = bundle.getInt("wavePhase2"); + + if (phase == 2) properties.add(Property.IMMOVABLE); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + + @Override + public void die( Object cause ) { + GLog.n(Messages.get(YogFist.class,"HaloFist")); + for (Mob boss : Dungeon.level.mobs.toArray(new Mob[0])) { + if (boss instanceof FreezingFist) { + boss.properties.remove(Property.FIERY); + boss.remove(FrostBurning.class); + boss.remove(HalomethaneBurning.class); + } + } + super.die( cause ); + } + public static class DarkBolt{} + public void doDiedLasers(){ + boolean terrainAffected = false; + HashSet affected = new HashSet<>(); + //delay fire on a rooted hero + if(enemy != null) { + if (!enemy.rooted) { + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, lastHeroPos, Ballistica.WONT_STOP); + //shoot beams + sprite.parent.add(new Beam.DeathRay(DungeonTilemap.raisedTileCenterToWorld(i), + DungeonTilemap.raisedTileCenterToWorld(b.collisionPos))); + for (int p : b.path) { + Char ch = Actor.findChar(p); + if (ch != null && (ch.alignment != alignment || ch instanceof Bee)) { + affected.add(ch); + } + if (Dungeon.level.flamable[p]) { + Dungeon.level.destroy(p); + GameScene.updateMap(p); + terrainAffected = true; + } + } + } + if (terrainAffected) { + Dungeon.observe(); + } + for (Char ch : affected) { + ch.damage(Random.NormalIntRange(28, 42),new DarkBolt()); + + if (Dungeon.level.heroFOV[pos]) { + ch.sprite.flash(); + CellEmitter.center(pos).burst(Speck.factory(Speck.COIN), Random.IntRange(6,12)); + } + if (!ch.isAlive() && ch == Dungeon.hero) { + Dungeon.fail(getClass()); + GLog.n(Messages.get(Char.class, "kill", name())); + } + } + targetedCells.clear(); + } + } + if(enemy != null) { + if (abilityCooldown <= 0 && HP < HT * 0.8f) { + lastHeroPos = enemy.pos; + + int beams = (int) (4 + (HP * 1.0f / HT) * 2); + for (int i = 0; i < beams; i++) { + int randompos = Random.Int(Dungeon.level.width()) + Dungeon.level.width() * 2; + targetedCells.add(randompos); + } + + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, enemy.pos, Ballistica.WONT_STOP); + + for (int p : b.path) { + Game.scene().addToFront(new TargetedCell(p, Window.GDX_COLOR)); + } + } + + spend(TICK * 1.5f); + Dungeon.hero.interrupt(); + abilityCooldown += Random.NormalFloat(MIN_ABILITY_CD - 2 * (1 - (HP * 1f / HT)), + MAX_ABILITY_CD - 5 * (1 - (HP * 1f / HT))); + } else { + spend(TICK); + } + } + if (abilityCooldown > 0) abilityCooldown-= 5; + } + + @Override + public boolean act() { + GameScene.add(Blob.seed(pos, 20, HalomethaneFire.class)); + doDiedLasers(); + boolean result = super.act(); + + if (Dungeon.level.map[pos] == Terrain.WATER){ + Level.set( pos, Terrain.EMPTY); + GameScene.updateMap( pos ); + CellEmitter.get( pos ).burst( Speck.factory( Speck.STEAM ), 10 ); + } + + //1.67 evaporated tiles on average + int evaporatedTiles = Random.chances(new float[]{0, 1, 2}); + + for (int i = 0; i < evaporatedTiles; i++) { + int cell = pos + PathFinder.NEIGHBOURS8[Random.Int(8)]; + if (Dungeon.level.map[cell] == Terrain.WATER){ + Level.set( cell, Terrain.EMPTY); + GameScene.updateMap( cell ); + CellEmitter.get( cell ).burst( Speck.factory( Speck.STEAM ), 10 ); + } + } + + for (int i : PathFinder.NEIGHBOURS9) { + int vol = HalomethaneFire.volumeAt(pos+i, HalomethaneFire.class); + if (vol < 4 && !Dungeon.level.water[pos + i] && !Dungeon.level.solid[pos + i]){ + GameScene.add( Blob.seed( pos + i, 4 - vol, HalomethaneFire.class ) ); + } + } + + return result; + } + + @Override + protected void zap() { + spend( 1f ); + + if (Dungeon.level.map[enemy.pos] == Terrain.WATER){ + Level.set( enemy.pos, Terrain.EMPTY); + GameScene.updateMap( enemy.pos ); + CellEmitter.get( enemy.pos ).burst( Speck.factory( Speck.STEAM ), 10 ); + } else { + Buff.affect( enemy, HalomethaneBurning.class ).reignite( enemy ); + } + + for (int i : PathFinder.NEIGHBOURS9){ + if (!Dungeon.level.water[enemy.pos+i] && !Dungeon.level.solid[enemy.pos+i]){ + int vol = HalomethaneFire.volumeAt(enemy.pos+i, HalomethaneFire.class); + if (vol < 4){ + GameScene.add( Blob.seed( enemy.pos + i, 4 - vol, HalomethaneFire.class ) ); + } + } + } + + } + + { + immunities.add(Frost.class); + } + + } + + + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogReal.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogReal.java index df8fccf52..125a0c77d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogReal.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/YogReal.java @@ -4,6 +4,7 @@ import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Boss; @@ -147,7 +148,7 @@ public class YogReal extends Boss { } } - if (spawnPos != -1) { + if (spawnPos != -1 && summon != null) { summon.pos = spawnPos; GameScene.add( summon ); Actor.addDelayed( new Pushing( summon, pos, summon.pos ), -1 ); @@ -177,7 +178,7 @@ public class YogReal extends Boss { } } - if (spawnPos != -1) { + if (spawnPos != -1 && summon != null) { summon.pos = spawnPos; GameScene.add( summon ); CellEmitter.get(spawnPos).start(ElmoParticle.FACTORY, 0.05f, 20); @@ -265,10 +266,12 @@ public class YogReal extends Boss { for(int i=0;i 0) rangedCooldown--; @@ -143,12 +146,12 @@ public abstract class YogRealFirst extends Mob { @Override public int damageRoll() { - return (Random.NormalIntRange( 20, 39 ) + (isNearYog()?12:0)) ; + return (Random.NormalIntRange( 24, 40 ) + (isNearYog()?50:0)) ; } @Override public int drRoll() { - return Random.NormalIntRange(0, 15); + return Random.NormalIntRange(6, 16); } @Override @@ -178,6 +181,11 @@ public abstract class YogRealFirst extends Mob { properties.add(Property.FIERY); } + @Override + protected void incrementRangedCooldown() { + rangedCooldown += Random.NormalFloat(2, 3); + } + @Override public boolean act() { @@ -216,12 +224,23 @@ public abstract class YogRealFirst extends Mob { } + @Override + public int attackProc(Char enemy, int damage) { + return super.attackProc(enemy, damage); + } } public static class SoiledFist extends YogRealFirst { { spriteClass = YogRealFistSprite.Soiled.class; + + immunities.add(Burning.class); + } + + @Override + protected void incrementRangedCooldown() { + rangedCooldown += Random.NormalFloat(6, 10); } @Override @@ -304,11 +323,6 @@ public abstract class YogRealFirst extends Mob { && !isNearYog(); } - { - resistances.add(Burning.class); - } - - } public static class RottingFist extends YogRealFirst { @@ -319,6 +333,11 @@ public abstract class YogRealFirst extends Mob { properties.add(Property.ACIDIC); } + @Override + protected void incrementRangedCooldown() { + rangedCooldown += Random.NormalFloat(5, 7); + } + @Override protected boolean act() { //ensures toxic gas acts at the appropriate time when added @@ -384,9 +403,14 @@ public abstract class YogRealFirst extends Mob { properties.add(Property.INORGANIC); } + @Override + protected void incrementRangedCooldown() { + rangedCooldown += Random.NormalFloat(5, 7); + } + @Override public int damageRoll() { - return super.damageRoll()+Random.NormalIntRange(5, 10); + return super.damageRoll()+Random.NormalIntRange(10, 20); } @Override @@ -457,10 +481,11 @@ public abstract class YogRealFirst extends Mob { int i; do { i = Random.Int(Dungeon.level.length()); - } while (Dungeon.level.heroFOV[i] + } while (Dungeon.level.distance(Dungeon.hero.pos, i) < 6 || Dungeon.level.solid[i] || Actor.findChar(i) != null - || PathFinder.getStep(i, Dungeon.level.exit, Dungeon.level.passable) == -1); + || !canTeleport(i) + ); ScrollOfTeleportation.appear(this, i); state = WANDERING; GameScene.flash(0xFFFFFF); @@ -527,10 +552,11 @@ public abstract class YogRealFirst extends Mob { int i; do { i = Random.Int(Dungeon.level.length()); - } while (Dungeon.level.heroFOV[i] + } while (Dungeon.level.distance(Dungeon.hero.pos, i) < 6 || Dungeon.level.solid[i] || Actor.findChar(i) != null - || PathFinder.getStep(i, Dungeon.level.exit, Dungeon.level.passable) == -1); + || !canTeleport(i) + ); ScrollOfTeleportation.appear(this, i); state = WANDERING; GameScene.flash(0, false); @@ -567,19 +593,19 @@ public abstract class YogRealFirst extends Mob { TextureFilm frames = new TextureFilm( texture, 24, 17 ); - idle = new MovieClip.Animation( 2, true ); + idle = new Animation( 2, true ); idle.frames( frames, c+0, c+0, c+1 ); - run = new MovieClip.Animation( 3, true ); + run = new Animation( 3, true ); run.frames( frames, c+0, c+1 ); - attack = new MovieClip.Animation( Math.round(1 / SLAM_TIME), false ); + attack = new Animation( Math.round(1 / SLAM_TIME), false ); attack.frames( frames, c+0 ); - zap = new MovieClip.Animation( 8, false ); + zap = new Animation( 8, false ); zap.frames( frames, c+0, c+5, c+6 ); - die = new MovieClip.Animation( 10, false ); + die = new Animation( 10, false ); die.frames( frames, c+0, c+2, c+3, c+4 ); play( idle ); @@ -619,13 +645,6 @@ public abstract class YogRealFirst extends Mob { } } - @Override - public void attack( int cell ) { - super.attack( cell ); - - jump(ch.pos, ch.pos, null, 9, SLAM_TIME ); - } - public void zap( int cell ) { turnTo( ch.pos , cell ); @@ -645,7 +664,7 @@ public abstract class YogRealFirst extends Mob { } @Override - public void onComplete( MovieClip.Animation anim ) { + public void onComplete( Animation anim ) { super.onComplete( anim ); if (anim == attack) { Camera.main.shake( 4, 0.2f ); @@ -813,5 +832,4 @@ public abstract class YogRealFirst extends Mob { } } -} - +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/Cerberus.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/Cerberus.java new file mode 100644 index 000000000..4f80e5fe3 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/Cerberus.java @@ -0,0 +1,110 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Boss; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; +import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CerberusSprite; +import com.watabou.utils.Bundle; +import com.watabou.utils.Random; + +public class Cerberus extends Boss { + + { + initProperty(); + initBaseStatus(20, 40, 30, 8, 800, 14, 9); + initStatus(100); + spriteClass = CerberusSprite.class; + } + + //技能条 + public float skillLevel; + + //攻击次数 + public int attackKills; + + //阶段转换 + public int phase; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put("phaseCR", phase); + bundle.put("skillLevelCR", skillLevel); + bundle.put("attackKillsCR",attackKills); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + phase = bundle.getInt("phaseCR"); + skillLevel = bundle.getFloat("skillLevelCR"); + attackKills = bundle.getInt("attackKillsCR"); + } + +//ACT暂时注释 +// @Override +// public boolean act(){ +// return super.act(); +// } + + @Override + protected boolean doAttack( Char enemy ) { + switch (phase){ + default: + case 0: + NightmareRoot(); + break; +// case 1: +// SoulReCharges(enemy); +// break; +// case 2: +// HellDogBack(enemy); +// break; +// case 3: +// CrystalActive(enemy); +// break; +// case 4: +// TrueOrFalse(enemy); +// break; +// case 5: +// DiedGlyphs(enemy); +// break; +// case 6: +// NoWorldMaster(enemy); +// break; + } + return super.doAttack( enemy ); + } + + @Override + public int attackProc( Char enemy, int damage ) { + damage = super.attackProc( enemy, damage ); + if(attackKills>=3){ + ((CerberusSprite)sprite).Skills(pos); + } + + return damage; + } + + //技能1:噩梦缠绕 + private void NightmareRoot(){ + attackKills++; + if(attackKills>=3){ + SpellSprite.show(this, SpellSprite.CHARGE); + } + } + + private void NightmareRootAtive(Char enmey){ + enmey.damage(Random.NormalIntRange((int)(baseMin*1.15), (int)(baseMax*1.15)),damageRoll()); + Buff.prolong( enemy, Roots.class, 3f ); + spend(attackDelay()*3f); + clearReset(); + } + + private void clearReset(){ + attackKills = 0; + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java index 90b82508b..c7117c741 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java @@ -1,5 +1,6 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.STRONGER_BOSSES; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.bossWeapons; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.crivusfruitslevel2; @@ -11,7 +12,6 @@ import static com.shatteredpixel.shatteredpixeldungeon.levels.Level.set; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; -import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; @@ -29,34 +29,49 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.effects.Beam; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; +import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.effects.TargetedCell; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.food.CrivusFruitsFood; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey; import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LifeTreeSword; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.Camera; +import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; +import java.util.ArrayList; import java.util.HashSet; //克里弗斯之果 本体 public class CrivusFruits extends Mob { //the actual affected cells private HashSet affectedCells; + private static final int MIN_ABILITY_CD = 7; + private int lastHeroPos; + private static final int MAX_ABILITY_CD = 12; + private ArrayList targetedCells = new ArrayList<>(); //the cells to trace fire shots to, for visual effects. private HashSet visualCells; //基本属性 @@ -74,6 +89,74 @@ public class CrivusFruits extends Mob { properties.add(Property.BOSS); } + private int phase = 1; + + private int summonsMade = 0; + + private float summonCooldown = 0; + private float abilityCooldown = 3; + private static final int MIN_COOLDOWN = 7; + private static final int MAX_COOLDOWN = 11; + + private static float[] chanceMap = {0f, 100f, 100f, 100f, 100f, 100f, 100f}; + private int wave=0; + + private int lastAbility = 0; + private static final int NONE = 0; + private static final int LINK = 1; + private static final int TELE = 2; + private static final int ENRAGE = 3; + private static final int DEATHRATTLE = 4; + private static final int SACRIFICE = 5; + private static final int SUMMON = 6; + + private static final String PHASE = "phase"; + private static final String SUMMONS_MADE = "summons_made"; + + private static final String SUMMON_CD = "summon_cd"; + private static final String ABILITY_CD = "ability_cd"; + private static final String LAST_ABILITY = "last_ability"; + + private static final String TARGETED_CELLS = "targeted_cells"; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put( PHASE, phase ); + bundle.put( SUMMONS_MADE, summonsMade ); + bundle.put( SUMMON_CD, summonCooldown ); + bundle.put( ABILITY_CD, abilityCooldown ); + bundle.put( LAST_ABILITY, lastAbility ); + bundle.put("wavePhase2", wave); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + phase = bundle.getInt( PHASE ); + summonsMade = bundle.getInt( SUMMONS_MADE ); + summonCooldown = bundle.getFloat( SUMMON_CD ); + abilityCooldown = bundle.getFloat( ABILITY_CD ); + lastAbility = bundle.getInt( LAST_ABILITY ); + wave = bundle.getInt("wavePhase2"); + + if (phase == 2) properties.add(Property.IMMOVABLE); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + //无敌也要扣减! public static class DiedDamager extends Buff { @@ -90,9 +173,9 @@ public class CrivusFruits extends Mob { public void detach() { super.detach(); //遍历楼层生物,寻找CrivusFruits执行扣血,在触手死亡时强制扣除本体CrivusFruits - for (Mob m : Dungeon.level.mobs){ + for (Mob m : Dungeon.level.mobs.toArray(new Mob[0])){ if (m instanceof CrivusFruits){ - m.damage((int)7.5, this); + m.damage(7, this); } } } @@ -143,9 +226,18 @@ public class CrivusFruits extends Mob { //毒雾扩散 if(!crivusfruitslevel2){ - GameScene.add(Blob.seed(pos, HP<65 ? 50 : 30, DiedBlobs.class)); + if(Dungeon.isChallenged(STRONGER_BOSSES)){ + GameScene.add(Blob.seed(pos, HP<65 ? 90 : 70, DiedBlobs.class)); + } else { + GameScene.add(Blob.seed(pos, HP<65 ? 50 : 30, DiedBlobs.class)); + } } else { - GameScene.add(Blob.seed(pos, HP<36 ? 150 : 50, DiedBlobs.class)); + if(Dungeon.isChallenged(STRONGER_BOSSES)){ + GameScene.add(Blob.seed(pos, HP<36 ? 280 : 100, DiedBlobs.class)); + } else { + GameScene.add(Blob.seed(pos, HP<36 ? 150 : 50, DiedBlobs.class)); + } + //doYogLasers(); } @@ -161,12 +253,13 @@ public class CrivusFruits extends Mob { GLog.n(Messages.get(this,"anargy")); crivusfruitslevel2 = true; GameScene.flash(0x808c8c8c); + //doYogLasers(); for (int i : ForestBossLasherTWOPos) { CrivusFruitsLasher csp = new CrivusFruitsLasher(); csp.pos = i; GameScene.add(csp); - if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ - Buff.affect(csp, Barrier.class).setShield((int) (2.4f * csp.HT + 10)); + if(Dungeon.isChallenged(STRONGER_BOSSES)){ + Buff.affect(csp, Barrier.class).setShield((int) (2.4f * csp.HT + 80)); } } Sample.INSTANCE.play( Assets.Sounds.CHALLENGE ); @@ -195,7 +288,7 @@ public class CrivusFruits extends Mob { alignment = Alignment.ENEMY; GameScene.flash(0x80009c9c); HP=HT=35; - if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ + if(Dungeon.isChallenged(STRONGER_BOSSES)){ Buff.affect(this, Barrier.class).setShield((int) (3f * this.HT + 10)); } GLog.n(Messages.get(this,"died!!!")); @@ -261,6 +354,12 @@ public class CrivusFruits extends Mob { @Override public void die(Object cause) { super.die(cause); + + PotionOfPurity.PotionOfPurityLing potionOfPurityLing = Dungeon.hero.belongings.getItem(PotionOfPurity.PotionOfPurityLing.class); + if(potionOfPurityLing != null){ + potionOfPurityLing.detachAll( hero.belongings.backpack ); + } + Dungeon.level.unseal(); GameScene.bossSlain(); GLog.n(Messages.get(this,"dead")); @@ -322,4 +421,74 @@ public class CrivusFruits extends Mob { immunities.add( Vertigo.class ); } + public void doForestLasers(){ + boolean terrainAffected = false; + HashSet affected = new HashSet<>(); + //delay fire on a rooted hero + if(enemy != null) { + if (!enemy.rooted) { + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, lastHeroPos, Ballistica.WONT_STOP); + //shoot beams + sprite.parent.add(new Beam.DeathRayS(DungeonTilemap.raisedTileCenterToWorld(i), + DungeonTilemap.raisedTileCenterToWorld(b.collisionPos))); + for (int p : b.path) { + Char ch = Actor.findChar(p); + if (ch != null && (ch.alignment != alignment || ch instanceof Bee)) { + affected.add(ch); + } + if (Dungeon.level.flamable[p]) { + Dungeon.level.destroy(p); + GameScene.updateMap(p); + terrainAffected = true; + } + } + } + if (terrainAffected) { + Dungeon.observe(); + } + for (Char ch : affected) { + ch.damage(Random.NormalIntRange(8, 12),this); + + if (Dungeon.level.heroFOV[pos]) { + ch.sprite.flash(); + CellEmitter.center(pos).burst(Speck.factory(Speck.COIN), Random.IntRange(2, 3)); + } + if (!ch.isAlive() && ch == Dungeon.hero) { + Dungeon.fail(getClass()); + GLog.n(Messages.get(Char.class, "kill", name())); + } + } + targetedCells.clear(); + } + } + if(enemy != null) { + if (abilityCooldown <= 0 && HP < HT * 0.8f) { + lastHeroPos = enemy.pos; + + int beams = (int) (4 + (HP * 1.0f / HT) * 4); + for (int i = 0; i < beams; i++) { + int randompos = Random.Int(Dungeon.level.width()) + Dungeon.level.width() * 2; + targetedCells.add(randompos); + } + + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, enemy.pos, Ballistica.WONT_STOP); + + for (int p : b.path) { + Game.scene().addToFront(new TargetedCell(p, Window.DeepPK_COLOR)); + } + } + + spend(TICK * 1.5f); + Dungeon.hero.interrupt(); + abilityCooldown += Random.NormalFloat(MIN_ABILITY_CD - 2 * (1 - (HP * 1f / HT)), + MAX_ABILITY_CD - 5 * (1 - (HP * 1f / HT))); + } else { + spend(TICK); + } + } + if (abilityCooldown > 0) abilityCooldown-= 5; + } + } \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DMZERO.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DMZERO.java index 4744a2390..e348ac3b0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DMZERO.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DMZERO.java @@ -382,7 +382,7 @@ public class DMZERO extends Mob GameScene.add(((Mob) (obj))); Actor.addDelayed(new Pushing(((Char) (obj)), pos, ((NullDiedTO) (obj)).pos), -1F); Statistics.bossScores[4] += 3000; - PaswordBadges.BOSSRUSH(); + yell( Messages.get(this, "defeated") ); } 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 bf883964e..efdae6284 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 @@ -80,6 +80,7 @@ public class DiamondKnight extends Boss { } private int pumpedUp = 0; + public int phase; private int healInc = 1; @@ -218,44 +219,88 @@ public class DiamondKnight extends Boss { Dungeon.level.seal(); } + int hpBracket = HT / 6; + + dmg = Math.min(hpBracket, dmg); + super.damage(dmg, src); LockedFloor lock = hero.buff(LockedFloor.class); if (lock != null) lock.addTime(dmg*2); ColdChestBossLevel.State level = ((ColdChestBossLevel)Dungeon.level).pro(); - //血量低于360后追加phase并加载楼层的进度方法,加载迷宫 + //血量低于360后追加phase并加载楼层的进度方法,加载迷宫 if (level == ColdChestBossLevel.State.START && this.HP <= 360 && phase == 0) { - GLog.n(Messages.get(DiamondKnight.class,"now_go")); - GameScene.flash(0x808080); - ((ColdChestBossLevel)Dungeon.level).progress(); - phase++; + HP = 360; + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + ((ColdChestBossLevel)Dungeon.level).progress(); + phase++; + GLog.n(Messages.get(DiamondKnight.class,"now_go")); + GameScene.flash(0x808080); + return true; + } + }); } else if (level == ColdChestBossLevel.State.VSBOSS_START && this.HP <= 240 && phase == 2) { + HP = 240; ((ColdChestBossLevel)Dungeon.level).progress(); phase++; //血量低于200后变成玩家的样子,伤害和防御数值与玩家一致 } else if (level == ColdChestBossLevel.State.VSLINK_START && this.HP <= 200 && phase == 3) { - GLog.n(Messages.get(DiamondKnight.class,"iswar_go")); - GameScene.flash(0x808080); - ((ColdChestBossLevel)Dungeon.level).progress(); - spriteClass=DimandKingSprite.PrismaticSprite.class; - //强制刷新屏幕 - ShatteredPixelDungeon.resetScene(); - GameScene.flash(0x888888); - phase++; - //血量低于100后变回来,基础伤害二连击 + HP = 200; + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + ((ColdChestBossLevel)Dungeon.level).progress(); + phase++; + GLog.n(Messages.get(DiamondKnight.class,"iswar_go")); + GameScene.flash(0x808080); + ((ColdChestBossLevel)Dungeon.level).progress(); + spriteClass=DimandKingSprite.PrismaticSprite.class; + ShatteredPixelDungeon.resetScene(); + GameScene.flash(0x888888); + return true; + } + }); + //最终决斗 } else if (level == ColdChestBossLevel.State.VSYOU_START && this.HP <= 100 && phase == 4) { - GLog.n(Messages.get(DiamondKnight.class,"ok_go")); - GameScene.flash(0x808080); - spriteClass=DimandKingSprite.class; - //强制刷新屏幕 - ShatteredPixelDungeon.resetScene(); - GameScene.flash(0x888888); - ((ColdChestBossLevel)Dungeon.level).progress(); - phase++; + HP = 100; + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + ((ColdChestBossLevel)Dungeon.level).progress(); + GLog.n(Messages.get(DiamondKnight.class,"ok_go")); + GameScene.flash(0x808080); + spriteClass=DimandKingSprite.class; + ShatteredPixelDungeon.resetScene(); + GameScene.flash(0x888888); + ((ColdChestBossLevel)Dungeon.level).progress(); + phase++; + return true; + } + }); } } - //当boos血量低于360时,加载第二场景 + @Override public void die( Object cause ) { @@ -278,8 +323,6 @@ public class DiamondKnight extends Boss { Badges.KILL_SMK(); - - if(Statistics.dimandchestmazeCollected>=3){ PaswordBadges.validateOMP(); Statistics.bossScores[1] += 1000; @@ -337,11 +380,11 @@ public class DiamondKnight extends Boss { bundle.put( HEALINC, healInc ); bundle.put(COMBO, combo); - if(phase == 5) { - spriteClass=DimandKingSprite.PrismaticSprite.class; - } else { - spriteClass=DimandKingSprite.class; - } +// if(phase == 5) { +// spriteClass=DimandKingSprite.PrismaticSprite.class; +// } else { +// spriteClass=DimandKingSprite.class; +// } } @@ -356,7 +399,7 @@ public class DiamondKnight extends Boss { //if check is for pre-0.9.3 saves healInc = bundle.getInt(HEALINC); - if(phase == 5) { + if(phase == 5 || phase == 6) { spriteClass=DimandKingSprite.PrismaticSprite.class; } else { spriteClass=DimandKingSprite.class; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DwarfMaster.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DwarfMaster.java index 27b4c2583..45cc54aea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DwarfMaster.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/DwarfMaster.java @@ -603,6 +603,10 @@ public class DwarfMaster extends Boss { @Override public void damage(int dmg, Object src) { + if(HP > 400 && dmg > 300){ + dmg = 300; + } + if (HP > 299 && HP <= 500 && dmg >= 9){ dmg = 15+ (int)(Math.sqrt(8*(dmg - 4) + 1) - 1)/2; } else { @@ -630,18 +634,30 @@ public class DwarfMaster extends Boss { if (phase == 1) { - int dmgTaken = preHP - HP; abilityCooldown -= dmgTaken/8f; summonCooldown -= dmgTaken/8f; if (HP <= 400) { - HP = 400; - sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "invulnerable")); + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + HP = 400; + sprite.showStatus(CharSprite.POSITIVE, Messages.get(Char.class, "invulnerable")); + properties.add(Property.IMMOVABLE); + phase = 2; + summonsMade = 0; + sprite.idle(); + + return true; + } + }); ScrollOfTeleportation.appear(this, DwarfMasterBossLevel.throne); - properties.add(Property.IMMOVABLE); - phase = 2; - summonsMade = 0; - sprite.idle(); Buff.affect(this, DwarfMaster.DKBarrior.class).setShield(12*25); for (DwarfMaster.Summoning s : buffs(DwarfMaster.Summoning.class)) { s.detach(); @@ -697,71 +713,82 @@ public class DwarfMaster extends Boss { @Override protected boolean act() { if (phase == 1) { + Actor.add(new Actor() { - if (summonCooldown <= 0 && summonSubject(3)){ - summonsMade++; - summonCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN)-1f; - } else if (summonCooldown > 0){ - summonCooldown-=1f/speed(); - } - - if (paralysed > 0){ - spend(TICK); - return true; - } - - if (abilityCooldown <= 0){ - int alive = aliveSummons(); - //NEVER use skills if no mobs alive. - if(alive == 0) { - lastAbility = NONE; - //summon faster when no ability is available. - summonCooldown -= 2f; - } - else { - do { - rollForAbility(); - } while ((lastAbility == ENRAGE || lastAbility == SACRIFICE) && alive < 2); - } - if(buff(SacrificeSubjectListener.class)!= null){ - lastAbility = NONE; - //cd faster while prepare to sacrifice - abilityCooldown --; + { + actPriority = VFX_PRIO; } - if (lastAbility == LINK && lifeLinkSubject()){ - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); + @Override + protected boolean act() { + Actor.remove(this); + if (summonCooldown <= 0 && summonSubject(3)){ + summonsMade++; + summonCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN)-1f; + } else if (summonCooldown > 0){ + summonCooldown-=1f/speed(); + } + + if (paralysed > 0){ + spend(TICK); + return true; + } + + if (abilityCooldown <= 0){ + int alive = aliveSummons(); + //NEVER use skills if no mobs alive. + if(alive == 0) { + lastAbility = NONE; + //summon faster when no ability is available. + summonCooldown -= 2f; + } + else { + do { + rollForAbility(); + } while ((lastAbility == ENRAGE || lastAbility == SACRIFICE) && alive < 2); + } + if(buff(SacrificeSubjectListener.class)!= null){ + lastAbility = NONE; + //cd faster while prepare to sacrifice + abilityCooldown --; + } + + if (lastAbility == LINK && lifeLinkSubject()){ + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + } else if (lastAbility == TELE && teleportSubject()) { + lastAbility = TELE; + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + }else if(lastAbility == ENRAGE){ + enrageSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + }else if(lastAbility == DEATHRATTLE){ + deathRattleSubject(); + lastAbility = DEATHRATTLE; + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + }else if(lastAbility == SACRIFICE){ + sacrificeSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + }else if(lastAbility == SUMMON){ + extraSummonSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + } + + } else { + abilityCooldown--; + } + return true; - } else if (lastAbility == TELE && teleportSubject()) { - lastAbility = TELE; - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - return true; - }else if(lastAbility == ENRAGE){ - enrageSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - return true; - }else if(lastAbility == DEATHRATTLE){ - deathRattleSubject(); - lastAbility = DEATHRATTLE; - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - }else if(lastAbility == SACRIFICE){ - sacrificeSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - }else if(lastAbility == SUMMON){ - extraSummonSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); } - - } else { - abilityCooldown--; - } - + }); } else if (phase == 2){ actPhaseTwoSummon(); return true; @@ -783,49 +810,6 @@ public class DwarfMaster extends Boss { return targetAbilityUses; } - public boolean useAbility(){ - boolean abilityUsed = false; - int abilityToUse = -1; - - while (!abilityUsed){ - - if (abilitiesUsed == 0){ - abilityToUse = BOMB_ABILITY; - } else if (abilitiesUsed == 1){ - abilityToUse = SHOCKER_ABILITY; - } else { - abilityToUse = Random.Int(3); - } - - //If we roll the same ability as last time, 9/10 chance to reroll - if (abilityToUse != lastAbility || Random.Int(10) == 0){ - switch (abilityToUse){ - case BOMB_ABILITY : default: - abilityUsed = throwBomb(this, enemy); - //if Tengu cannot use his bomb ability first, use fire instead. - if (abilitiesUsed == 0 && !abilityUsed){ - abilityToUse = FIRE_ABILITY; - abilityUsed = throwFire(this, enemy); - } - break; - } - } - - } - - - //spend only 1 turn if seriously behind on ability uses - if (targetAbilityUses() - abilitiesUsed >= 4){ - spend(TICK); - } else { - spend(2 * TICK); - } - - lastAbility = abilityToUse; - abilitiesUsed++; - return lastAbility == FIRE_ABILITY; - } - public static boolean throwFire(final Char thrower, final Char target){ Ballistica aim = new Ballistica(thrower.pos, target.pos, Ballistica.WONT_STOP); @@ -1301,12 +1285,24 @@ public class DwarfMaster extends Boss { private void actPhaseTwoSummon(){ if(wave == 0){ - yell(Messages.get(this, "wave_1")); - new GnollShiled().spawnAround(pos); - summonSubject(2, DwarfMaster.DKGhoul.class); - summonSubject(3, DwarfMaster.DKGhoul.class); - ++wave; - spend(TICK*9); + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + yell(Messages.get(DwarfMaster.class, "wave_1")); + new GnollShiled().spawnAround(pos); + summonSubject(2, DwarfMaster.DKGhoul.class); + summonSubject(3, DwarfMaster.DKGhoul.class); + ++wave; + spend(TICK*9); + return true; + } + }); }else if(wave == 1){ summonSubject(1, DwarfMaster.DKGhoul.class); summonSubject(5, DwarfMaster.DKMonk.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/FireMagicDied.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/FireMagicDied.java index d32750d86..625d658f6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/FireMagicDied.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/FireMagicDied.java @@ -321,89 +321,138 @@ public class FireMagicDied extends Mob implements Callback { public boolean act() { int healInc = 1; if (phase == 1 && HP <= 350) { + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + if (Dungeon.level.water[pos] && HP < HT) { + HP += healInc; + + if (Dungeon.level.heroFOV[pos]) { + sprite.emitter().burst(Speck.factory(Speck.HEALING), healInc); + } + if (HP * 2 > HT) { + BossHealthBar.bleed(false); + ((FireMagicGirlSprite) sprite).spray(false); + HP = Math.min(HP, HT); + } + } + return true; + } + }); //actScanning(); - if (Dungeon.level.water[pos] && HP < HT) { - HP += healInc; - if (Dungeon.level.heroFOV[pos]) { - sprite.emitter().burst(Speck.factory(Speck.HEALING), healInc); - } - if (HP * 2 > HT) { - BossHealthBar.bleed(false); - ((FireMagicGirlSprite) sprite).spray(false); - HP = Math.min(HP, HT); - } - } }else if (phase == 2 && HP <= 300) { + Actor.add(new Actor() { - if (summonCooldown <= 0 && summonSubject(3)){ - summonsMade++; - summonCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN)-1f; - } else if (summonCooldown > 0){ - summonCooldown-=1f/speed(); - } - - if (paralysed > 0){ - spend(TICK); - return true; - } - - if (abilityCooldown <= 0){ - int alive = aliveSummons(); - //NEVER use skills if no mobs alive. - if(alive == 0) { - lastAbility = NONE; - //summon faster when no ability is available. - summonCooldown -= 2f; - } - else { - do { - rollForAbility(); - } while ((lastAbility == ENRAGE || lastAbility == SACRIFICE) && alive < 2); - } - if(buff(DwarfMaster.SacrificeSubjectListener.class)!= null){ - lastAbility = NONE; - //cd faster while prepare to sacrifice - abilityCooldown --; + { + actPriority = VFX_PRIO; } - if (lastAbility == LINK && lifeLinkSubject()){ - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); + @Override + protected boolean act() { + Actor.remove(this); + if (summonCooldown <= 0 && summonSubject(3)){ + summonsMade++; + summonCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN)-1f; + } else if (summonCooldown > 0){ + summonCooldown-=1f/speed(); + } + + if (paralysed > 0){ + spend(TICK); + return true; + } + + if (abilityCooldown <= 0){ + int alive = aliveSummons(); + //NEVER use skills if no mobs alive. + if(alive == 0) { + lastAbility = NONE; + //summon faster when no ability is available. + summonCooldown -= 2f; + } + else { + do { + rollForAbility(); + } while ((lastAbility == ENRAGE || lastAbility == SACRIFICE) && alive < 2); + } + if(buff(DwarfMaster.SacrificeSubjectListener.class)!= null){ + lastAbility = NONE; + //cd faster while prepare to sacrifice + abilityCooldown --; + } + + if (lastAbility == LINK && lifeLinkSubject()){ + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + } else if (lastAbility == TELE && teleportSubject()) { + lastAbility = TELE; + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + }else if(lastAbility == ENRAGE){ + enrageSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + return true; + }else if(lastAbility == DEATHRATTLE){ + deathRattleSubject(); + lastAbility = DEATHRATTLE; + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + }else if(lastAbility == SACRIFICE){ + sacrificeSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + }else if(lastAbility == SUMMON){ + extraSummonSubject(); + abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); + spend(TICK); + } + + } else { + abilityCooldown--; + } return true; - } else if (lastAbility == TELE && teleportSubject()) { - lastAbility = TELE; - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - return true; - }else if(lastAbility == ENRAGE){ - enrageSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - return true; - }else if(lastAbility == DEATHRATTLE){ - deathRattleSubject(); - lastAbility = DEATHRATTLE; - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - }else if(lastAbility == SACRIFICE){ - sacrificeSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); - }else if(lastAbility == SUMMON){ - extraSummonSubject(); - abilityCooldown += Random.NormalIntRange(MIN_COOLDOWN, MAX_COOLDOWN); - spend(TICK); } - - } else { - abilityCooldown--; - } + }); } else if (phase == 3){ - if (summonSubject(2)) summonsMade++; + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + if (summonSubject(2)) summonsMade++; + return true; + } + }); + } else if (phase == 4 && buffs(FireMagicDied.Summoning.class).size() < 4){ - actPhaseTwoSummon(); + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + actPhaseTwoSummon(); + return true; + } + }); return true; } //actScanning(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java index 159c91f6a..3a22193ba 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java @@ -15,6 +15,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewDM720; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; @@ -48,7 +49,8 @@ import com.watabou.utils.GameMath; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; -/**萨卡班甲鱼 Boss 难度:3.5级 */ +/**萨卡班甲鱼 Boss 难度:4级 + * 隐藏Boss 萨卡班甲鱼*/ public class SakaFishBoss extends Boss { private int leapPos = -1; private float leapCooldown = 0; @@ -60,7 +62,7 @@ public class SakaFishBoss extends Boss { public boolean beamCharged; - /**隐藏Boss 萨卡班甲鱼*/ + /***/ { spriteClass = SakaFishBossSprites.class; initBaseStatus(19, 25, 6, 0, 480, 5, 12); @@ -74,6 +76,7 @@ public class SakaFishBoss extends Boss { HT=480; immunities.add(FrostBurning.class); immunities.add(HalomethaneBurning.class); + immunities.add(Terror.class); properties.add(Property.ICY); properties.add(Property.ELECTRIC); properties.add(Property.FIERY); @@ -114,10 +117,23 @@ public class SakaFishBoss extends Boss { //phase 1 of the fight is over if (HP <= HT/2 && level==AncientMysteryCityBossLevel.State.TWO_BOSS){ - HP = (HT/2); - yell(Messages.get(this, "interesting")); - ((AncientMysteryCityBossLevel)Dungeon.level).progress(); - BossHealthBar.bleed(true); + Actor.add(new Actor() { + + { + actPriority = VFX_PRIO; + } + + @Override + protected boolean act() { + Actor.remove(this); + HP = (HT/2); + yell(Messages.get(SakaFishBoss.class, "interesting")); + ((AncientMysteryCityBossLevel)Dungeon.level).progress(); + BossHealthBar.bleed(true); + return true; + } + }); + } } @@ -282,8 +298,6 @@ public class SakaFishBoss extends Boss { PaswordBadges.KILLSAKA(); yell( Messages.get(this, "defeated") ); - - } @Override @@ -310,8 +324,6 @@ public class SakaFishBoss extends Boss { private static final String BEAM_COOLDOWN = "beamCooldown"; private static final String BEAM_CHARGED = "beamCharged"; - //二阶段 - private static final String TO_ATTACK = "toattack"; @Override public void storeInBundle( Bundle bundle ) { @@ -370,7 +382,6 @@ public class SakaFishBoss extends Boss { { actPriority = HERO_PRIO+1; } - private static final float TIME_TO_ZAP = 1f; @Override protected boolean act() { @@ -446,7 +457,7 @@ public class SakaFishBoss extends Boss { endPos = leapPos; } - //do leap + //do leap 泥头车 sprite.visible = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[leapPos] || Dungeon.level.heroFOV[endPos]; sprite.dirtcar(pos, leapPos, new Callback() { @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/ApprenticeWitch.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/ApprenticeWitch.java new file mode 100644 index 000000000..d337b0b34 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/ApprenticeWitch.java @@ -0,0 +1,44 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ApprenticeWitchSprite; +import com.watabou.utils.Random; + +public class ApprenticeWitch extends Mob { + + { + spriteClass = ApprenticeWitchSprite.class; + + baseSpeed = 1.2f; + HP = HT = 150; + defenseSkill = 24; + maxLvl = 35; + properties.add(Property.HOLLOW); + + properties.add(Property.ICY); + properties.add(Property.FIERY); + properties.add(Property.ELECTRIC); + } + +// @Override +// protected boolean act() { +// return super.act(); +// } + + @Override + public int damageRoll() { + return Random.NormalIntRange( 20, 34 ); + } + + @Override + public int attackSkill( Char target ) { + return 15; + } + + @Override + public int drRoll() { + return Random.NormalIntRange(5, 10); + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/Frankenstein.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/Frankenstein.java new file mode 100644 index 000000000..4b9bb14ec --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/Frankenstein.java @@ -0,0 +1,36 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FrankensteinSprite; +import com.watabou.utils.Random; + +public class Frankenstein extends Mob { + + { + spriteClass = FrankensteinSprite.class; + + baseSpeed = 0.85f; + HP = HT = 90; + defenseSkill = 14; + maxLvl = 35; + properties.add(Char.Property.HOLLOW); + } + + @Override + public int damageRoll() { + return Random.NormalIntRange( 15, 27 ); + } + + @Override + public int attackSkill( Char target ) { + return 15; + } + + @Override + public int drRoll() { + return 0; + } +} + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/HollowMimic.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/HollowMimic.java new file mode 100644 index 000000000..86e55ba5d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/hollow/HollowMimic.java @@ -0,0 +1,50 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite; +import com.watabou.utils.Random; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +public class HollowMimic extends Mimic { + + { + spriteClass = MimicSprite.HollowWall.class; + properties.add( Property.HOLLOW ); + HP = HT= Random.Int(35,60); + } + + @Override + public int damageRoll() { + return Random.NormalIntRange( 30, 50 ); + } + + @Override + public int drRoll() { + return 0; + } + + public static HollowMimic spawnAt(int pos, Item item, Class mimicType ){ + return spawnAt( pos, Arrays.asList(item), mimicType); + } + + public static HollowMimic spawnAt(int pos, List items, Class mimicType ) { + + HollowMimic m; + m = new HollowMimic(); + + + m.items = new ArrayList<>( items ); + m.setLevel( Dungeon.depth ); + m.pos = pos; + + //generate an extra reward for killing the mimic + m.generatePrize(); + + return m; + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java index 114c826a7..9c54ed17d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Blacksmith.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; +import com.shatteredpixel.shatteredpixeldungeon.items.lightblack.OilPotion; import com.shatteredpixel.shatteredpixeldungeon.items.quest.DarkGold; import com.shatteredpixel.shatteredpixeldungeon.items.quest.Pickaxe; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; @@ -222,6 +223,10 @@ public class Blacksmith extends NPC { if (!item1.isIdentified() || !item2.isIdentified()) { return Messages.get(Blacksmith.class, "un_ided"); } + + if (item1 instanceof OilPotion || item2 instanceof OilPotion) { + return Messages.get(Blacksmith.class, "oil"); + } if (item1.cursed || item2.cursed || (item1 instanceof Armor && ((Armor) item1).hasCurseGlyph()) || diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index a732b0b81..e7b45eacf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -43,6 +43,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.MailArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.PlateArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ScaleArmor; +import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; +import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; @@ -216,13 +218,14 @@ public class Ghost extends NPC { public static int depth; public static Weapon weapon; + public static Food food; public static Armor armor; public static Weapon.Enchantment enchant; public static Armor.Glyph glyph; public static void reset() { spawned = false; - + food = null; weapon = null; armor = null; enchant = null; @@ -237,6 +240,8 @@ public class Ghost extends NPC { private static final String PROCESSED = "processed"; private static final String DEPTH = "depth"; private static final String WEAPON = "weapon"; + + private static final String FOOD = "food"; private static final String ARMOR = "armor"; private static final String ENCHANT = "enchant"; private static final String GLYPH = "glyph"; @@ -256,6 +261,7 @@ public class Ghost extends NPC { node.put( PROCESSED, processed ); node.put( WEAPON, weapon ); + node.put( FOOD, food ); node.put( ARMOR, armor ); if (enchant != null) { @@ -281,6 +287,7 @@ public class Ghost extends NPC { weapon = (Weapon)node.get( WEAPON ); armor = (Armor)node.get( ARMOR ); + food = (Food)node.get(FOOD); if (node.contains(ENCHANT)) { enchant = (Weapon.Enchantment) node.get(ENCHANT); @@ -351,7 +358,7 @@ public class Ghost extends NPC { int wepTier = Random.chances(new float[]{0, 0, 10, 6, 3, 1}); Generator.Category c = Generator.wepTiers[wepTier - 1]; weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]); - + food = new SmallRation.BlackMoon(); //26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4 ghostQuest(); @@ -419,7 +426,7 @@ public class Ghost extends NPC { public static void complete() { weapon = null; armor = null; - + food = null; Notes.remove( Notes.Landmark.GHOST ); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/GhostNPC.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/GhostNPC.java new file mode 100644 index 000000000..e76e70f67 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/GhostNPC.java @@ -0,0 +1,20 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; + +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; + +public class GhostNPC extends NTNPC{ + + { + spriteClass = GhostSprite.class; + } + + @Override + protected boolean act() { + if(Statistics.deadGo){ + die(true); + } + return super.act(); + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NTNPC.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NTNPC.java index 2e73794d9..e2f29fb4a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NTNPC.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NTNPC.java @@ -11,13 +11,14 @@ import java.util.ArrayList; public class NTNPC extends NPC { { - properties.add(Property.IMMOVABLE); } protected ArrayList chat = new ArrayList<>(); protected ArrayList endChat = new ArrayList<>(); + protected ArrayList sChat = new ArrayList<>(); + @Override protected boolean act() { throwItem(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NullDiedTO.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NullDiedTO.java index 2e4d23c54..8f330971e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NullDiedTO.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NullDiedTO.java @@ -151,7 +151,7 @@ public class NullDiedTO extends NTNPC { WndQuest.chating(this,chat); first=false; }else { - if(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) && Dungeon.depth == 28){ + if(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) && Dungeon.depth == 27){ GLog.n("冒险家,快通过水晶之心离开这里吧……"); } else { Game.runOnRenderThread(new Callback() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nxhy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nxhy.java index 04a47f978..ad896632b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nxhy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nxhy.java @@ -1,18 +1,14 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; -import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; -import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.journal.Notes; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.NxhySprite; public class Nxhy extends Shopkeeper { @@ -29,7 +25,13 @@ public class Nxhy extends Shopkeeper { if (!seenBefore && Dungeon.level.heroFOV[pos]) { yell(Messages.get(this, "greetings", Dungeon.hero.name())); seenBefore = true; + playBGM(Assets.SHOP, true); + } else if(seenBefore && !Dungeon.level.heroFOV[pos]) { + seenBefore = false; + yell(Messages.get(this, "goodbye", hero.name())); + BGMPlayer.playBGMWithDepth(); } + if (Dungeon.level.heroFOV[pos]){ Notes.add(Notes.Landmark.SHOP); } @@ -40,49 +42,10 @@ public class Nxhy extends Shopkeeper { return true; } - @Override - public void damage( int dmg, Object src ) { - flee(); - } - @Override public int defenseSkill( Char enemy ) { return 0; } - @Override - public void add( Buff buff ) { - flee(); - } - - - public void flee() { - destroy(); - Notes.remove(Notes.Landmark.SHOP); - CellEmitter.get(pos).burst(ElmoParticle.FACTORY, 6); - hero.sprite.burst(15597568, 9); - sprite.killAndErase(); - } - - - - @Override - public void destroy() { - Actor.remove( this ); - HP = 0; - for (Heap heap: Dungeon.level.heaps.valueList()) { - if (heap.type == Heap.Type.FOR_SALE) { - if (ShatteredPixelDungeon.scene() instanceof GameScene) { - CellEmitter.get(heap.pos).burst(ElmoParticle.FACTORY, 4); - } - if (heap.size() == 1) { - heap.destroy(); - } else { - heap.items.remove(heap.size()-1); - heap.type = Heap.Type.HEAP; - } - } - } - } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nyz.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nyz.java index 50998e899..dba883945 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nyz.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Nyz.java @@ -3,6 +3,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -57,24 +58,21 @@ public class Nyz extends NTNPC { playBGM(Assets.NYZSHOP, true); } seenBefore = true; - } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) { - playBGM(Assets.TOWN, true); - seenBefore = false; - } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) { - playBGM(Assets.BGM_2,true); + } else if(seenBefore && !Dungeon.level.heroFOV[pos]) { seenBefore = false; + BGMPlayer.playBGMWithDepth(); } throwItem(); sprite.turnTo( pos, Dungeon.hero.pos ); spend( TICK ); - shop6 = (Books) new YellowSunBooks().quantity(2); - shop5 = (Books) new BrokenBooks().quantity(2); - shop4 = (Books) new IceCityBooks().quantity(2); - shop3 = (Books) new NoKingMobBooks().quantity(2); - shop2 = (Books) new DeepBloodBooks().quantity(2); - shop1 = (Books) new MagicGirlBooks().quantity(2); + shop6 = (Books) new YellowSunBooks().quantity(1); + shop5 = (Books) new BrokenBooks().quantity(1); + shop4 = (Books) new IceCityBooks().quantity(1); + shop3 = (Books) new NoKingMobBooks().quantity(1); + shop2 = (Books) new DeepBloodBooks().quantity(1); + shop1 = (Books) new MagicGirlBooks().quantity(1); bomb1 = (Bomb) new Flashbang().quantity(1); bomb2 = (Bomb) new Noisemaker().quantity(1); bomb3 = (Bomb) new RegrowthBomb().quantity(1); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhost.java new file mode 100644 index 000000000..9116bbaac --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhost.java @@ -0,0 +1,161 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; +import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.Red; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfRoseShiled; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.FiveRen; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; +import com.watabou.noosa.Game; +import com.watabou.utils.Bundle; +import com.watabou.utils.Callback; + +import java.util.ArrayList; + +public class PinkGhost extends NTNPC { + + private boolean first=true; + private boolean secnod=true; + private boolean rd=true; + + private boolean sd=true; + + private static final String FIRST = "first"; + private static final String SECNOD = "secnod"; + private static final String RD = "rd"; + + private static final String SD = "sd"; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put(FIRST, first); + bundle.put(SECNOD,secnod); + bundle.put(RD,rd); + bundle.put(SD,sd); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + first = bundle.getBoolean(FIRST); + secnod = bundle.getBoolean(SECNOD); + rd = bundle.getBoolean(RD); + sd = bundle.getBoolean(SD); + } + + { + spriteClass = GhostSprite.PinkGhostSprites.class; + chat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "hello")); + add(Messages.get(PinkGhost.class, "hello_1")); + } + }; + endChat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "hello_2")); + add(Messages.get(PinkGhost.class, "hello_3")); + } + }; + } + + @Override + public boolean interact(Char c) { + Red red = hero.belongings.getItem(Red.class); + sprite.turnTo(pos, hero.pos); + if(first){ + WndQuest.chating(this,chat); + first = false; + } else if(secnod){ + WndQuest.chating(this,endChat); + secnod= false; + } else if(red == null && rd) { + rd = false; + InterlevelScene.mode = InterlevelScene.Mode.GARDEN; + Game.switchScene(InterlevelScene.class); + } else if(red == null) { + GLog.pink(Messages.get(PinkGhost.class,"why_red")); + } else { + tell(this); + } + return true; + } + + private void tells(String text) { + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + GameScene.show(new WndQuest(new PinkGhost(), text)); + } + } + ); + } + + private void tell(Char ghost) { + Weapon w3; + w3 = (Weapon) Generator.random(Generator.Category.WEAPON); + w3.upgrade(3); + w3.identify(); + + Armor a3; + a3 = (Armor) Generator.randomUsingDefaults( Generator.Category.ARMOR ); + a3.upgrade(3); + a3.identify(); + + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + + ShatteredPixelDungeon.scene().add(new WndOptions(new GhostSprite.PinkGhostSprites(), + Messages.get(PinkGhost.class, "name"), + Messages.get(PinkGhost.class, "good_desc"), + Messages.get(PinkGhost.class, "giverose"), + Messages.get(PinkGhost.class, "givemoon")) { + @Override + protected void onSelect(int index) { + SmallRation.BlackMoon moon = hero.belongings.getItem( SmallRation.BlackMoon.class); + Red red = hero.belongings.getItem(Red.class); + if (index == 0) { + if(red != null){ + GLog.p(Messages.get(PinkGhost.class, "goodluck")); + red.detach(hero.belongings.backpack); + + Dungeon.level.drop(a3, ghost.pos).sprite.drop(); + Dungeon.level.drop(w3, ghost.pos).sprite.drop(); + Dungeon.level.drop(new ScrollOfRoseShiled().identify(), ghost.pos ); + Dungeon.level.drop(new FiveRen().identify(), ghost.pos ); + die(null); + } + } else if (index == 1) { + if(moon == null){ + sprite.showLost(); + GLog.pink(Messages.get(PinkGhost.class, "whatmoon")); + } else { + tells(Messages.get(PinkGhost.class, "moonname")); + GLog.n(Messages.get(PinkGhost.class, "moonlost")); + moon.detach(hero.belongings.backpack); + Statistics.findMoon = true; + die( null ); + } + } + } + }); + } + }); + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhostNPC.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhostNPC.java new file mode 100644 index 000000000..ba5bdfea9 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/PinkGhostNPC.java @@ -0,0 +1,244 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; +import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.Red; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.RedWhiteRose; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfRoseShiled; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.FiveRen; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; +import com.watabou.noosa.Game; +import com.watabou.utils.Bundle; +import com.watabou.utils.Callback; + +import java.util.ArrayList; + +public class PinkGhostNPC extends NPC { + protected ArrayList chat = new ArrayList<>(); + protected ArrayList endChat = new ArrayList<>(); + + protected ArrayList sChat = new ArrayList<>(); + + protected ArrayList LChat = new ArrayList<>(); + + protected ArrayList TheEndChat = new ArrayList<>(); + protected ArrayList MChat = new ArrayList<>(); + + private boolean first=true; + private boolean secnod=true; + private boolean rd=true; + + private boolean sd=true; + + private static final String FIRST = "first"; + private static final String SECNOD = "secnod"; + private static final String RD = "rd"; + + private static final String SD = "sd"; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put(FIRST, first); + bundle.put(SECNOD,secnod); + bundle.put(RD,rd); + bundle.put(SD,sd); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + first = bundle.getBoolean(FIRST); + secnod = bundle.getBoolean(SECNOD); + rd = bundle.getBoolean(RD); + sd = bundle.getBoolean(SD); + } + + { + spriteClass = GhostSprite.PinkGhostSprites.class; + + state = SLEEPING; + chat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "not_sorry")); + add(Messages.get(PinkGhost.class, "not_sorry_1")); + add(Messages.get(PinkGhost.class, "not_sorry_2")); + add(Messages.get(PinkGhost.class, "not_sorry_3")); + add(Messages.get(PinkGhost.class, "not_sorry_4")); + } + }; + endChat = new ArrayList() { + { + add(Messages.get(GhostNPC.class, "love")); + } + }; + sChat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "oh_no")); + } + }; + LChat = new ArrayList() { + { + add(Messages.get(GhostNPC.class, "sorry")); + } + }; + TheEndChat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "linklove")); + } + }; + MChat = new ArrayList() { + { + add(Messages.get(PinkGhost.class, "thanks")); + add(Messages.get(PinkGhost.class, "thanks_1")); + add(Messages.get(PinkGhost.class, "thanks_2")); + add(Messages.get(PinkGhost.class, "thanks_3")); + add(Messages.get(PinkGhost.class, "thanks_4",hero.name())); + } + }; + } + + @Override + public int defenseSkill( Char enemy ) { + return INFINITE_EVASION; + } + + @Override + public float speed() { + return 1.5f; + } + + @Override + protected Char chooseEnemy() { + return null; + } + + @Override + public void damage( int dmg, Object src ) { + } + + @Override + public void add( Buff buff ) { + } + + @Override + public boolean reset() { + return true; + } + + private void tells(String text) { + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + GameScene.show(new WndQuest(new PinkGhost(), text)); + } + } + ); + } + + @Override + public boolean interact(Char c) { + NPC questBoss; + questBoss = new GhostNPC(); + + sprite.turnTo( pos, c.pos ); + + if (c != Dungeon.hero){ + return super.interact(c); + } + + Weapon w3; + w3 = (Weapon) Generator.random(Generator.Category.WEAPON); + w3.upgrade(3); + w3.identify(); + + Armor a3; + a3 = (Armor) Generator.randomUsingDefaults( Generator.Category.ARMOR ); + a3.upgrade(3); + a3.identify(); + if (state == SLEEPING && first) { + WndQuest.chating(this, chat); + state = WANDERING; + first = false; + } else if(secnod) { + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + ShatteredPixelDungeon.scene().add(new WndOptions(new GhostSprite.PinkGhostSprites(), + Messages.get(PinkGhost.class, "name"), + Messages.get(PinkGhost.class, "talk_desc"), + Messages.get(PinkGhost.class, "givego"), + Messages.get(PinkGhost.class, "take")) { + @Override + protected void onSelect(int index) { + DriedRose rose = Dungeon.hero.belongings.getItem(DriedRose.class); + if (index == 0) { + GLog.p(Messages.get(PinkGhost.class, "goodluck")); + Dungeon.level.drop(a3, pos).sprite.drop(); + Dungeon.level.drop(w3, pos).sprite.drop(); + Dungeon.level.drop(new ScrollOfRoseShiled().identify(), pos ); + Dungeon.level.drop(new FiveRen().identify(),pos ); + Statistics.findMoon = false; + die(null); + } else if (index == 1) { + if(rose == null){ + sprite.showLost(); + GLog.pink(Messages.get(PinkGhost.class, "whathere")); + } else { + tells(Messages.get(PinkGhost.class, "rose")); + secnod = false; + } + } + } + }); + } + }); + } else if(rd) { + questBoss.pos = pos+1; + GameScene.add(questBoss, 1f); + sprite.showAlert(); + WndQuest.chating(this, TheEndChat); + WndQuest.chating(questBoss,LChat); + WndQuest.chating(this, sChat); + WndQuest.chating(questBoss, endChat); + //GLog.p(Messages.get(PinkGhost.class,"love&love")); + rd = false; + } else if (sd) { + WndQuest.chating(this,MChat); + sd = false; + } else { + DriedRose rose = Dungeon.hero.belongings.getItem(DriedRose.class); + Red red = hero.belongings.getItem(Red.class); + GLog.i(Messages.get(PinkGhost.class, "thanks_5")); + die(null); + Statistics.deadGo = true; + Dungeon.level.drop(a3, pos).sprite.drop(); + Dungeon.level.drop(w3, pos).sprite.drop(); + Dungeon.level.drop(new ScrollOfRoseShiled().identify(), pos ); + Dungeon.level.drop(new FiveRen().identify(),pos ); + Dungeon.level.drop( rose.ghostWeapon(), pos ).sprite.drop(); + Dungeon.level.drop( new RedWhiteRose(), pos ).sprite.drop(); + Dungeon.level.drop( rose.ghostArmor(), pos ).sprite.drop(); + rose.detach(hero.belongings.backpack); + red.detach(hero.belongings.backpack); + PaswordBadges.ZQJ_FLOWER(); + } + return true; + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/REN.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/REN.java index 7e8bce763..1a322654f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/REN.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/REN.java @@ -3,13 +3,10 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.RenSprite; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; -import com.watabou.noosa.Game; import com.watabou.utils.Bundle; -import com.watabou.utils.Callback; import com.watabou.utils.Random; import java.util.ArrayList; @@ -86,15 +83,5 @@ public class REN extends NTNPC { return true; } - - private void tell(String text) { - Game.runOnRenderThread(new Callback() { - @Override - public void call() { - GameScene.show(new WndQuest(new REN(), text)); - } - } - ); - } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java index c5f7181dc..77d4c668e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/RatKing.java @@ -21,12 +21,15 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify; import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown; +import com.shatteredpixel.shatteredpixeldungeon.items.armor.custom.CustomArmor; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.RatKingSprite; @@ -107,18 +110,20 @@ public class RatKing extends NPC { public boolean interact(Char c) { sprite.turnTo( pos, c.pos ); - if (c != Dungeon.hero){ + if (c != hero){ return super.interact(c); } - KingsCrown crown = Dungeon.hero.belongings.getItem(KingsCrown.class); + KingsCrown crown = hero.belongings.getItem(KingsCrown.class); if (state == SLEEPING) { notice(); - yell( Messages.get(this, "not_sleeping") ); + yell(Messages.get(this, "not_sleeping")); state = WANDERING; } else if (crown != null){ - if (Dungeon.hero.belongings.armor() == null){ - yell( Messages.get(RatKing.class, "crown_clothes") ); + if (hero.belongings.armor() == null) { + yell(Messages.get(RatKing.class, "crown_clothes")); + } else if(hero.belongings.armor instanceof CustomArmor) { + yell(Messages.get(RatKing.class, "what",hero.belongings.armor.name())); } else { Badges.validateRatmogrify(); Game.runOnRenderThread(new Callback() { @@ -135,11 +140,11 @@ public class RatKing extends NPC { @Override protected void onSelect(int index) { if (index == 0){ - crown.upgradeArmor(Dungeon.hero, Dungeon.hero.belongings.armor(), new Ratmogrify()); + crown.upgradeArmor(hero, hero.belongings.armor(), new Ratmogrify()); ((RatKingSprite)sprite).resetAnims(); yell(Messages.get(RatKing.class, "crown_thankyou")); } else if (index == 1) { - GameScene.show(new WndInfoArmorAbility(Dungeon.hero.heroClass, new Ratmogrify())); + GameScene.show(new WndInfoArmorAbility(hero.heroClass, new Ratmogrify())); } else { yell(Messages.get(RatKing.class, "crown_fine")); } @@ -148,7 +153,7 @@ public class RatKing extends NPC { } }); } - } else if (Dungeon.hero.armorAbility instanceof Ratmogrify) { + } else if (hero.armorAbility instanceof Ratmogrify) { yell( Messages.get(RatKing.class, "crown_after") ); } else { yell( Messages.get(this, "what_is_it") ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java index 88305b76d..80af922c7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Shopkeeper.java @@ -21,8 +21,11 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; @@ -72,9 +75,11 @@ public class Shopkeeper extends NPC { if (!seenBefore && Dungeon.level.heroFOV[pos]) { yell(Messages.get(this, "greetings", hero.name())); seenBefore = true; + playBGM(Assets.SHOP, true); } else if(seenBefore && !Dungeon.level.heroFOV[pos]) { seenBefore = false; yell(Messages.get(this, "goodbye", hero.name())); + BGMPlayer.playBGMWithDepth(); } if (Dungeon.level.visited[pos]){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/GooMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/GooMob.java index 79df83a70..61e9e92da 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/GooMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/GooMob.java @@ -1,6 +1,10 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical; -import com.shatteredpixel.shatteredpixeldungeon.Challenges; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; @@ -9,31 +13,42 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Goo; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.GooNPC; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation; +import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.watabou.noosa.Camera; +import com.watabou.noosa.Game; import com.watabou.utils.Bundle; +import com.watabou.utils.Callback; +import com.watabou.utils.PathFinder; import com.watabou.utils.Random; public class GooMob extends Mob { + + { - if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { - HP = HT = 180; - } else { - HP = HT = Dungeon.isChallenged(Challenges.STRONGER_BOSSES) ? 120 : 100; - } + HP = HT = Random.NormalIntRange(90,180); EXP = 10; defenseSkill = 8; + maxLvl = 30; spriteClass = GooSprite.class; + state = PASSIVE; + flying = Dungeon.isChallenged(MOREROOM); - properties.add(Property.BOSS); + properties.add(Property.MINIBOSS); properties.add(Property.DEMONIC); properties.add(Property.ACIDIC); } @@ -44,7 +59,7 @@ public class GooMob extends Mob { @Override public int damageRoll() { int min = 1; - int max = (HP*2 <= HT) ? 12 : 8; + int max = (HP*2 <= HT) ? 16 : 10; if (pumpedUp > 0) { pumpedUp = 0; return Random.NormalIntRange( min*3, max*3 ); @@ -70,27 +85,55 @@ public class GooMob extends Mob { public int drRoll() { return Random.NormalIntRange(0, 2); } + public static boolean seenBefore = false; + + private void tell(String text) { + Game.runOnRenderThread(new Callback() { + @Override + public void call() { + GameScene.show(new WndQuest(new GooNPC(), text)); + } + } + ); + } + + @Override + public void add(Buff buff) { + super.add(buff); + if (state == PASSIVE && buff.type == Buff.buffType.NEGATIVE){ + state = HUNTING; + } + } @Override public boolean act() { + LockedFloor lock = Dungeon.hero.buff(LockedFloor.class); + + if (lock == null && Dungeon.level.heroFOV[pos]){ + SewerLevel level = (SewerLevel) Dungeon.level; + level.seal(); + level.updateChasmTerrain(); + if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))) { + AlarmTrap alarmTrap = new AlarmTrap(); + alarmTrap.pos = pos; + alarmTrap.activate(); + ScrollOfTeleportation.appear(hero, pos+3); + tell(Messages.get(this, "notice")); + } + } if (Dungeon.level.water[pos] && HP < HT) { HP += healInc; - LockedFloor lock = Dungeon.hero.buff(LockedFloor.class); + if (lock != null) lock.removeTime(healInc*2); if (Dungeon.level.heroFOV[pos] ){ sprite.emitter().burst( Speck.factory( Speck.HEALING ), healInc ); } - if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES) && healInc < 3) { + if (healInc < 3) { healInc++; } - if (HP*2 > HT) { - BossHealthBar.bleed(false); - ((GooSprite)sprite).spray(false); - HP = Math.min(HP, HT); - } } else { healInc = 1; } @@ -167,9 +210,8 @@ public class GooMob extends Mob { } else { pumpedUp++; - if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){ - pumpedUp++; - } + pumpedUp++; + ((GooSprite)sprite).pumpUp( pumpedUp ); @@ -204,6 +246,16 @@ public class GooMob extends Mob { public void damage(int dmg, Object src) { boolean bleeding = (HP*2 <= HT); super.damage(dmg, src); + + if (state == PASSIVE) { + state = HUNTING; + notice(); + ScrollOfTeleportation.appear(hero, pos+3); + SewerLevel level = (SewerLevel) Dungeon.level; + level.seal(); + level.updateChasmTerrain(); + } + if ((HP*2 <= HT) && !bleeding){ sprite.showStatus(CharSprite.NEGATIVE, Messages.get(Goo.class, "enraged")); ((GooSprite)sprite).spray(true); @@ -213,9 +265,32 @@ public class GooMob extends Mob { if (lock != null) lock.addTime(dmg*2); } + @Override + public void notice() { + super.notice(); + if (!BossHealthBar.isAssigned()) { + BossHealthBar.assignBoss(this); + yell(Messages.get(this, "notice")); + } + } + @Override public void die( Object cause ) { super.die( cause ); + SewerLevel level = (SewerLevel) Dungeon.level; + level.unseal(); + level.updateChasmTerrain(); + //60% chance of 2 blobs, 30% chance of 3, 10% chance for 4. Average of 2.5 + int blobs = Random.chances(new float[]{0, 0, 6, 3, 1}); + for (int i = 0; i < blobs; i++){ + int ofs; + do { + ofs = PathFinder.NEIGHBOURS8[Random.Int(8)]; + } while (!Dungeon.level.passable[pos + ofs]); + Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos ); + } + playBGM(Assets.BGM_1, true); + GameScene.bossSlain(); } private final String PUMPEDUP = "pumpedup"; @@ -234,10 +309,10 @@ public class GooMob extends Mob { public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle( bundle ); - + if (state == HUNTING){ + BossHealthBar.assignBoss(this); + } pumpedUp = bundle.getInt( PUMPEDUP ); - if (state != SLEEPING) BossHealthBar.assignBoss(this); - if ((HP*2 <= HT)) BossHealthBar.bleed(true); //if check is for pre-0.9.3 saves healInc = bundle.getInt(HEALINC); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/SlimeKingMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/SlimeKingMob.java index a4fc474e7..95a778420 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/SlimeKingMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/spical/SlimeKingMob.java @@ -25,7 +25,7 @@ import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.SlimeKingSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.SlimeKingMobSprites; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Bundle; @@ -105,7 +105,7 @@ public class SlimeKingMob extends Mob { EXP = 20; defenseSkill = 12; - spriteClass = SlimeKingSprite.class; + spriteClass = SlimeKingMobSprites.class; lootChance = 1; HUNTING = new Hunting(); properties.add(Property.BOSS); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/dict/DictSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/dict/DictSpriteSheet.java index 66f3e0ad4..c370e1462 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/dict/DictSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/dict/DictSpriteSheet.java @@ -1,6 +1,7 @@ package com.shatteredpixel.shatteredpixeldungeon.custom.dict; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ApprenticeWitchSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.BombGnollTricksterSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.BruteBotSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ClearElementalSprites; @@ -8,7 +9,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdGuardSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdRatSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.FireAcidicSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.FlameC01Sprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.GooSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FlowerSlimeSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.IceFireScorpioSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.IceGolemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; @@ -92,7 +93,7 @@ public class DictSpriteSheet { case GnollF: return new SkullShamanSprite(); case Goo: - return new GooSprite(); + return new ApprenticeWitchSprite(); case GNOLL: return new Image(Assets.Sprites.GNOLL, 0, 0, 12, 15); case STX: @@ -131,6 +132,8 @@ public class DictSpriteSheet { return new Image(Assets.Sprites.SLIME, 14, 0, 14, 12); case F_RAT: return new Image(Assets.Sprites.RAT, 0, 30, 16, 15); + case FLOWER: + return new FlowerSlimeSprites(); case GNOLL_DARTER: return new Image(Assets.Sprites.GNOLL, 0, 15, 12, 15); case CAUSTIC_SLIME: @@ -294,6 +297,8 @@ public class DictSpriteSheet { public static final int SLIME = 206 + 10000; public static final int CAUSTIC_SLIME = 207 + 10000; public static final int F_RAT = 208 + 10000; + + public static final int FLOWER = 1608 + 10000; public static final int GNOLL_DARTER = 209 + 10000; public static final int GREAT_CRAB = 210 + 10000; public static final int OGPDNQHZ = 211 + 10000; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/LevelTeleporter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/LevelTeleporter.java index c0fd94dbb..c3f8f2ac0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/LevelTeleporter.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/LevelTeleporter.java @@ -2,6 +2,7 @@ package com.shatteredpixel.shatteredpixeldungeon.custom.testmode; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Chrome; +import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; @@ -11,6 +12,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Imp; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.RedDragon; import com.shatteredpixel.shatteredpixeldungeon.custom.messages.M; import com.shatteredpixel.shatteredpixeldungeon.custom.utils.Constants; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; @@ -52,6 +59,7 @@ public class LevelTeleporter extends TestItem { private static final String AC_VIEW = "view"; private static final String AC_TP = "teleport"; private static final String AC_INTER_TP = "interlevel_tp"; + private static final String AC_RESET = "reset"; @Override public ArrayList actions(Hero hero ) { @@ -61,6 +69,7 @@ public class LevelTeleporter extends TestItem { actions.add(AC_VIEW); actions.add(AC_TP); actions.add(AC_INTER_TP); + actions.add(AC_RESET); return actions; } @@ -73,7 +82,7 @@ public class LevelTeleporter extends TestItem { public void execute( Hero hero, String action ) { super.execute( hero, action ); if(action.equals(AC_DESCEND)) { - if(Dungeon.hero.buff(LockedFloor.class) != null ) { + if(Dungeon.hero.buff(LockedFloor.class) != null || Dungeon.depth>26 && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) || Dungeon.depth>28 && Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ) { GLog.w(Messages.get(this,"cannot_send")); return; } @@ -108,6 +117,52 @@ public class LevelTeleporter extends TestItem { return; } GameScene.show(new WndSelectLevel()); + }else if (action.equals(AC_RESET)) { + switch (Dungeon.depth){ + case 2: + case 3: + case 4: + for (Mob m: Dungeon.level.mobs){ + if (m instanceof Ghost) { + Ghost.Quest.reset(); + } + } + break; + case 7: + case 8: + case 9: + for (Mob m: Dungeon.level.mobs){ + if (m instanceof Wandmaker) { + Wandmaker.Quest.reset(); + } + } + break; + case 12: + case 13: + case 14: + for (Mob m: Dungeon.level.mobs){ + if (m instanceof Blacksmith) { + Blacksmith.Quest.reset(); + } + if(m instanceof RedDragon){ + RedDragon.Quest.reset(); + } + } + break; + case 17: + case 18: + case 19: + for (Mob m: Dungeon.level.mobs){ + if (m instanceof Imp) { + Imp.Quest.reset(); + } + } + break; + } + if(Dungeon.level.locked) + Dungeon.level.unseal(); + InterlevelScene.mode = InterlevelScene.Mode.RESET; + Game.switchScene(InterlevelScene.class); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java index 55101ad49..72e2b5cc2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java @@ -23,12 +23,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Crab; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM200; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM201; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DemonSpawner; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Elemental; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.FetidRat; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Fire_Scorpio; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.FlameC01; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.FlowerSlime; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Gnoll; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollShiled; @@ -47,7 +47,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDLLS; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDNQHZ; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDZSLS; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedMurderer; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedSwarm; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RipperDemon; @@ -73,7 +72,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Warlock; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.XTG200; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical.GooMob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses.Cerberus; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical.SlimeKingMob; import com.shatteredpixel.shatteredpixeldungeon.custom.dict.DictSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.custom.messages.M; @@ -408,7 +407,7 @@ public class MobPlacer extends TestItem{ updateMobText(); } }; - btn.icon( DictSpriteSheet.miscImages(allData.get(dataThreshold(mobTier)+i).imageId) ); + btn.icon( Reflection.newInstance(allData.get(dataThreshold(mobTier)+i).getMobClass()).sprite()); float max = Math.max(btn.icon().width(), btn.icon().height()); btn.icon().scale = new PointF(BTN_SIZE/max, BTN_SIZE/max); if(i actions(Hero hero) { + ArrayList actions = super.actions(hero); + actions.add(AC_SPAWN); + return actions; + } + + @Override + public void execute(Hero hero, String action) { + super.execute(hero, action); + if (action.equals(AC_SPAWN)) { + GameScene.show(new ArmorSetting()); + } + } + + private Armor getArmor(int armor_id){ + switch (armor_id) { + case 1: + return new LeatherArmor(); + case 2: + return new MailArmor(); + case 3: + return new ScaleArmor(); + case 4: + return new PlateArmor(); + case 5: + return new LamellarArmor(); + case 6: + return new AncityArmor(); + default: + return new ClothArmor(); + } + } + + private void createArmor() { + Armor armor = getArmor(armor_id); + if (Challenges.isItemBlocked(armor)) { + return; + } + armor = modifyArmor(armor); + armor.identify(); + if (armor.collect()) { + GLog.i(Messages.get(hero, "you_now_have", armor.name())); + } else { + armor.doDrop(curUser); + } + } + + private Armor modifyArmor(Armor armor) { + if (armor_level >= 0) + armor.level(armor_level); + armor.cursed = cursed; + if (generateEnchant(enchant_rarity, enchant_id) == null) { + armor.inscribe(null); + } else { + armor.inscribe(Reflection.newInstance(generateEnchant(enchant_rarity, enchant_id))); + } + return armor; + } + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put("armor_id", armor_id); + bundle.put("cursed", cursed); + bundle.put("armor_level", armor_level); + bundle.put("enchant_rarity", enchant_rarity); + bundle.put("enchant_id", enchant_id); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + armor_id = bundle.getInt("armor_id"); + cursed = bundle.getBoolean("cursed"); + armor_level = bundle.getInt("armor_level"); + enchant_rarity = bundle.getInt("enchant_rarity"); + enchant_id = bundle.getInt("enchant_id"); + } + + private String currentGlyphName(Class glyph) { + if (enchant_rarity < 4) + return currentGlyphName(glyph, Messages.get(Armor.Glyph.class, "glyph")); + else + return currentGlyphName(glyph, Messages.get(Item.class, "curse")); + } + + private String currentGlyphName(Class glyph, String armorName) { + return Messages.get(glyph, "name", armorName); + } + + private Class generateEnchant(int enc_type, int enc_id) { + if (enc_type == 1) switch (enc_id) { + case 0: + return Obfuscation.class; + case 1: + return Swiftness.class; + case 2: + return Viscosity.class; + case 3: + return Potential.class; + default: + return null; + } + else if (enc_type == 2) switch (enc_id) { + case 0: + return Stone.class; + case 1: + return Brimstone.class; + case 2: + return Entanglement.class; + case 3: + return Repulsion.class; + case 4: + return Camouflage.class; + case 5: + return Flow.class; + default: + return null; + } + else if (enc_type == 3) switch (enc_id) { + case 0: + return AntiMagic.class; + case 1: + return Thorns.class; + case 2: + return Affection.class; + default: + return null; + } + else if (enc_type == 4) switch (enc_id) { + case 0: + return AntiEntropy.class; + case 1: + return Bulk.class; + case 2: + return Corrosion.class; + case 3: + return Displacement.class; + case 4: + return Metabolism.class; + case 5: + return Multiplicity.class; + case 6: + return Overgrowth.class; + case 7: + return Stench.class; + } + + return null; + } + + /** + * 护甲设置窗口类,继承自Window类。 + */ + private class ArmorSetting extends Window { + + // 定义常量 + private static final int WIDTH = 150; // 窗口宽度 + private static final int HEIGHT = 250; // 窗口高度 + private static final int GAP = 2; // 间隔大小 + private static final int BTN_SIZE = 18; // 按钮尺寸 + private static final int MAX_ICONS_PER_LINE = 7; // 每行最大图标数量 + + // 成员变量 + private Class[] AllArmor; // 所有护甲的Class数组 + private CheckBox CheckBox_curse; // 诅咒物品复选框 + private RenderedTextBlock RenderedTextBlock_enchantInfo; // 附魔信息文本块 + private OptionSlider OptionSlider_enchantId; // 附魔编号选项滑块 + private OptionSlider OptionSlider_enchantRarity; // 附魔种类选项滑块 + private RedButton RedButton_create; // 创建武器按钮 + private final ArrayList IconButtons = new ArrayList<>(); // 图标按钮列表 + private final RedButton Button_Level; // 武器等级按钮 + + /** + * 构造函数,用于初始化窗口。 + */ + public ArmorSetting() { + super(); + + // 设置窗口尺寸 + resize(WIDTH, HEIGHT); + + // 创建护甲列表及图标 + createArmorList(); + createArmorImage(AllArmor); + + // 创建护甲等级按钮 + Button_Level = new RedButton(Messages.get(this, "select_armor")) { + @Override + protected void onClick() { + if(!Button_Level.text().equals(Messages.get(SpawnArmor.ArmorSetting.class, "select_armor"))){ // 修改此行代码 + Game.runOnRenderThread(() -> ShatteredPixelDungeon.scene().add(new WndTextNumberInput( + Messages.get(SpawnArmor.ArmorSetting.class, "armor_level"), Messages.get(SpawnArmor.ArmorSetting.class, "armor_level_desc"), + Integer.toString(armor_level), + 4, false, Messages.get(SpawnArmor.ArmorSetting.class, "confirm"), + Messages.get(SpawnArmor.ArmorSetting.class, "cancel")) { + @Override + public void onSelect(boolean check, String text) { + + if (check && text.matches("\\d+")) { + int level = Integer.parseInt(text); + armor_level = Math.min(level, 6666); + } + } + })); + } else { + Game.scene().add( new WndError( Messages.get(SpawnArmor.ArmorSetting.class, "armor_level_error") ) ); + } + } + }; + Button_Level.text(((Armor) Reflection.newInstance(getArmor(armor_id).getClass())).name()); + add(Button_Level); + + // 创建附魔信息文本块 + RenderedTextBlock_enchantInfo = PixelScene.renderTextBlock("", 6); + RenderedTextBlock_enchantInfo.text(infoBuilder()); + RenderedTextBlock_enchantInfo.visible = true; + RenderedTextBlock_enchantInfo.maxWidth(WIDTH); + add(RenderedTextBlock_enchantInfo); + + // 创建附魔种类选项滑块 + OptionSlider_enchantRarity = new OptionSlider(Messages.get(this, "enchant_rarity"), "0", "4", 0, 4) { + @Override + protected void onChange() { + enchant_rarity = getSelectedValue(); + updateText(); + } + }; + OptionSlider_enchantRarity.setSelectedValue(enchant_rarity); + add(OptionSlider_enchantRarity); + + // 创建附魔编号选项滑块 + OptionSlider_enchantId = new OptionSlider(Messages.get(this, "enchant_id"), "0", "7", 0, 7) { + @Override + protected void onChange() { + enchant_id = getSelectedValue(); + updateText(); + } + }; + OptionSlider_enchantId.setSelectedValue(enchant_id); + add(OptionSlider_enchantId); + + // 创建诅咒物品复选框 + CheckBox_curse = new CheckBox(Messages.get(this, "cursed")) { + @Override + protected void onClick() { + super.onClick(); + cursed = checked(); + } + }; + CheckBox_curse.checked(cursed); + add(CheckBox_curse); + + // 创建生成护甲按钮 + RedButton_create = new RedButton(Messages.get(this, "create")) { + @Override + protected void onClick() { + createArmor(); + } + }; + add(RedButton_create); + + layout(); + } + + /** + * 封装一个同步UI的方法,用于调整UI组件的位置和大小。 + */ + private void layout() { + Button_Level.setRect(0, GAP , WIDTH, 24); + RenderedTextBlock_enchantInfo.setPos(0, GAP + Button_Level.top() + Button_Level.height()); + OptionSlider_enchantRarity.setRect(0, GAP + RenderedTextBlock_enchantInfo.bottom(), WIDTH, 24); + OptionSlider_enchantId.setRect(0, GAP + OptionSlider_enchantRarity.top() + OptionSlider_enchantRarity.height(), WIDTH, 24); + CheckBox_curse.setRect(0, GAP + OptionSlider_enchantId.top() + OptionSlider_enchantId.height(), WIDTH / 2f - GAP / 2f, 16); + RedButton_create.setRect(WIDTH / 2f + GAP / 2f, OptionSlider_enchantId.bottom() + GAP, WIDTH / 2f - GAP / 2f, 16); + resize(WIDTH, (int) RedButton_create.bottom()); + } + + @Override + public synchronized void update() { + super.update(); + // 实时同步UI + layout(); + } + + /** + * 创建护甲列表 + */ + private void createArmorList() { + //AllArmor = Generator.Category.ARMOR.classes.clone(); + AllArmor = new Class[]{ + ClothArmor.class, + LeatherArmor.class, + MailArmor.class, + ScaleArmor.class, + PlateArmor.class, + LamellarArmor.class, + AncityArmor.class}; + } + + /** + * 创建护甲图标,并添加到窗口中。 + * + * @param all 所有护甲的Class数组 + */ + private void createArmorImage(Class[] all) { + float left = BTN_SIZE / 2f; + float top = 27; + int placed = 0; + int length = all.length; + for (int i = 0; i < length; ++i) { + final int j = i; + IconButton btn = new IconButton() { + @Override + protected void onClick() { + armor_id = Math.min(maxSlots(armor_id) - 1, j); + updateSelectedArmorText(); + super.onClick(); + } + }; + Image im = new Image(Assets.Sprites.ITEMS); + im.frame(ItemSpriteSheet.film.get(Objects.requireNonNull(Reflection.newInstance(all[i])).image)); + im.scale.set(1f); + btn.icon(im); + int row = placed / MAX_ICONS_PER_LINE; + int col = placed % MAX_ICONS_PER_LINE; + float x = left + col * (BTN_SIZE + GAP); + float y = top + row * (BTN_SIZE + GAP); + btn.setRect(x, y, BTN_SIZE, BTN_SIZE); + add(btn); + placed++; + IconButtons.add(btn); + } + } + + /** + * 更新选中的武器文本。 + */ + private void updateSelectedArmorText() { + Armor armor = (Armor) Reflection.newInstance(getArmor(armor_id).getClass()); + Button_Level.text(armor.name()); + layout(); + } + + /** + * 获取附魔信息文本。 + * @return 附魔信息文本 + */ + private String infoBuilder() { + //String desc = Messages.get(BossRushArmor.class, "enchant_id_pre", enchant_rarity); + String desc = ""; + Class glyph = generateEnchant(enchant_rarity, enchant_id); + desc += Messages.get(this, "current_enchant", (glyph == null ? Messages.get(this, "no_enchant") : currentGlyphName(glyph))); + return desc; + } + + private int maxSlots(int t) { + if (t <= 1) return 5; + if (t == 2 || t == 3) return 1145; + else return 8; + } + + private void updateText() { + RenderedTextBlock_enchantInfo.text(infoBuilder()); + layout(); + } + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/SpawnWeapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/SpawnWeapon.java new file mode 100644 index 000000000..50ef349fe --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/SpawnWeapon.java @@ -0,0 +1,513 @@ +package com.shatteredpixel.shatteredpixeldungeon.custom.testmode; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.custom.messages.M; +import com.shatteredpixel.shatteredpixeldungeon.items.Generator; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Annoying; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Displacing; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Exhausting; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Fragile; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Friendly; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Polarized; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Sacrificial; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.curses.Wayward; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazing; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blocking; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blooming; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Corrupting; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Crushing; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.HaloBlazing; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Kinetic; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Lucky; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Projecting; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Unstable; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Vampiric; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.CheckBox; +import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton; +import com.shatteredpixel.shatteredpixeldungeon.ui.OptionSlider; +import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; +import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.shatteredpixel.shatteredpixeldungeon.utils.WndTextNumberInput; +import com.shatteredpixel.shatteredpixeldungeon.windows.WndError; +import com.watabou.noosa.Game; +import com.watabou.noosa.Image; +import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Bundle; +import com.watabou.utils.Reflection; + +import java.util.ArrayList; +import java.util.Objects; + + +public class SpawnWeapon extends TestItem{ + { + image = ItemSpriteSheet.DG25; + defaultAction = AC_SPAWN; + } + + private static final String AC_SPAWN = "spawn"; + + private int tier; + private boolean cursed; + private int weapon_level; + private int enchant_id; + private int enchant_rarity; + private int weapon_id; + + public SpawnWeapon(){ + this.tier = 1; + this.cursed = false; + this.weapon_level = 0; + this.enchant_id = 0; + this.enchant_rarity = 0; + this.weapon_id = 0; + } + + @Override + public ArrayList actions(Hero hero) { + ArrayList actions = super.actions(hero); + actions.add(AC_SPAWN); + return actions; + } + + @Override + public void execute(Hero hero, String action) { + super.execute(hero, action); + if (action.equals(AC_SPAWN)){ + GameScene.show(new WeaponSetting()); + } + } + + public void createWeapon(){ + try{ + Weapon wpn = (Weapon) Reflection.newInstance(getWeapon(tier)[weapon_id]); + wpn.level(weapon_level); + Class enchantResult = getEnchant(enchant_rarity,enchant_id); + if(enchantResult!=null){ + wpn.enchant((Weapon.Enchantment) Reflection.newInstance(enchantResult)); + } + wpn.cursed=cursed; + wpn.identify(); + if(wpn instanceof MagesStaff){ + wpn=new MagesStaff(new WandOfMagicMissile()); + wpn.identify(); + GameScene.pickUp(wpn,hero.pos); + Sample.INSTANCE.play(Assets.Sounds.ITEM); + } + if(wpn.collect()) { + GameScene.pickUp( wpn, hero.pos ); + Sample.INSTANCE.play( Assets.Sounds.ITEM ); + GLog.i(Messages.get(hero, "you_now_have", wpn.name())); + } else { + wpn.doDrop(Item.curUser); + } + }catch (Exception e){ + GLog.w(M.L(MobPlacer.class, "forbidden")); + } + } + + private Class[] getWeapon(int tier){ + switch (tier){ + case 1: + return Generator.Category.WEP_T1.classes.clone(); + case 2: + return Generator.Category.WEP_T2.classes.clone(); + case 3: + return Generator.Category.WEP_T3.classes.clone(); + case 4: + return Generator.Category.WEP_T4.classes.clone(); + case 5: + return Generator.Category.WEP_T5.classes.clone(); + case 6: + return Generator.Category.WEP_T6.classes.clone(); + } + return Generator.Category.WEP_T1.classes.clone(); + } + + private Class getEnchant(int rarity,int id){ + switch (rarity){ + case 1: + switch (id){ + case 0: + return Blazing.class; + case 1: + return Chilling.class; + case 2: + return Kinetic.class; + case 3: + return Shocking.class; + default: + return null; + } + case 2: + switch (id){ + case 0: + return Blocking.class; + case 1: + return Blooming.class; + case 2: + return Elastic.class; + case 3: + return Lucky.class; + case 4: + return Projecting.class; + case 5: + return Unstable.class; + default: + return null; + } + case 3: + switch (id){ + case 0: + return Corrupting.class; + case 1: + return Grim.class; + case 2: + return Vampiric.class; + case 3: + return HaloBlazing.class; + case 4: + return Crushing.class; + default: + return null; + } + case 4: + switch (id){ + case 0: + return Annoying.class; + case 1: + return Displacing.class; + case 2: + return Exhausting.class; + case 3: + return Fragile.class; + case 4: + return Sacrificial.class; + case 5: + return Wayward.class; + case 6: + return Polarized.class; + case 7: + return Friendly.class; + default: + return null; + } + } + return null; + } + + @Override + public void storeInBundle(Bundle b){ + super.storeInBundle(b); + b.put("tier", tier); + b.put("cursed", cursed); + b.put("weapon_level", weapon_level); + b.put("enchant_id", enchant_id); + b.put("enchant_rarity", enchant_rarity); + b.put("weapon_id", weapon_id); + } + + @Override + public void restoreFromBundle(Bundle b){ + super.restoreFromBundle(b); + tier = b.getInt("tier"); + cursed = b.getBoolean("cursed"); + weapon_level = b.getInt("weapon_level"); + enchant_id = b.getInt("enchant_id"); + enchant_rarity = b.getInt("enchant_rarity"); + weapon_id = b.getInt("weapon_id"); + } + + /** + * 武器设置窗口类,继承自Window类。 + */ + private class WeaponSetting extends Window { + + // 定义常量 + private static final int WIDTH = 150; // 窗口宽度 + private static final int HEIGHT = 250; // 窗口高度 + private static final int BTN_SIZE = 18; // 按钮尺寸 + private static final int GAP = 2; // 间隔大小 + private static final int MAX_ICONS_PER_LINE = 7; // 每行最大图标数量 + + // 成员变量 + private Class[] AllWeapon; // 所有武器的Class数组 + private final RedButton Button_Create; // 创建武器按钮 + private final CheckBox CheckBox_Curse; // 诅咒物品复选框 + private final ArrayList IconButtons = new ArrayList<>(); // 图标按钮列表 + private final OptionSlider OptionSlider_EnchantId; // 附魔编号选项滑块 + private final OptionSlider OptionSlider_EnchantRarity; // 附魔种类选项滑块 + private final RedButton Button_Level; // 武器等级按钮 + private final OptionSlider OptionSlider_Tier; // 武器阶数选项滑块 + private final RenderedTextBlock Text_EnchantInfo; // 附魔信息文本块 + + /** + * 构造函数,用于初始化窗口。 + */ + public WeaponSetting() { + super(); + + // 设置窗口尺寸 + resize(WIDTH, HEIGHT); + + // 创建武器列表 + createWeaponList(tier); + + // 创建武器阶数选项滑块 + OptionSlider_Tier = new OptionSlider(Messages.get(this, "weapon_tier"), "1", "6", 1, 6) { + @Override + protected void onChange() { + tier = getSelectedValue(); + clearImage(); + createWeaponList(tier); + createWeaponImage(AllWeapon); + } + }; + OptionSlider_Tier.setSelectedValue(tier); + add(OptionSlider_Tier); + + // 创建武器图标 + createWeaponImage(AllWeapon); + + // 创建附魔信息文本块 + Text_EnchantInfo = PixelScene.renderTextBlock("", 6); + updateEnchantText(); + add(Text_EnchantInfo); + + // 创建附魔种类选项滑块 + OptionSlider_EnchantRarity = new OptionSlider(Messages.get(this, "enchant_rarity"), "1", "5", 0, 4) { + @Override + protected void onChange() { + enchant_rarity = getSelectedValue(); + updateEnchantText(); + } + }; + OptionSlider_EnchantRarity.setSelectedValue(enchant_rarity); + add(OptionSlider_EnchantRarity); + + // 创建附魔编号选项滑块 + OptionSlider_EnchantId = new OptionSlider(Messages.get(this, "enchant_id"), "1", "8", 0, 7) { + @Override + protected void onChange() { + enchant_id = getSelectedValue(); + updateEnchantText(); + } + }; + OptionSlider_EnchantId.setSelectedValue(enchant_id); + add(OptionSlider_EnchantId); + + // 创建诅咒物品复选框 + CheckBox_Curse = new CheckBox(Messages.get(this, "cursed")) { + @Override + protected void onClick() { + super.onClick(); + cursed = checked(); + } + }; + CheckBox_Curse.checked(cursed); + add(CheckBox_Curse); + + // 创建武器等级按钮 + Button_Level = new RedButton(Messages.get(this, "select_weapon")) { + @Override + protected void onClick() { + if(!Button_Level.text().equals(Messages.get(SpawnWeapon.WeaponSetting.class, "select_weapon"))){ // 修改此行代码 + Game.runOnRenderThread(() -> ShatteredPixelDungeon.scene().add(new WndTextNumberInput( + Messages.get(SpawnWeapon.WeaponSetting.class, "weapon_level"), Messages.get(SpawnWeapon.WeaponSetting.class, "weapon_level_desc"), + Integer.toString(weapon_level), + 4, false, Messages.get(SpawnWeapon.WeaponSetting.class, "confirm"), + Messages.get(SpawnWeapon.WeaponSetting.class, "cancel")) { + @Override + public void onSelect(boolean check, String text) { + + if (check && text.matches("\\d+")) { + int level = Integer.parseInt(text); + weapon_level = Math.min(level, 6666); + } + } + })); + } else { + Game.scene().add( new WndError( Messages.get(SpawnWeapon.WeaponSetting.class, "weapon_level_error") ) ); + } + } + }; + Button_Level.text(((Weapon) Reflection.newInstance(getWeapon(tier)[weapon_id])).name()); + add(Button_Level); + + // 创建生成武器按钮 + Button_Create = new RedButton(Messages.get(this, "create")) { + @Override + protected void onClick() { + createWeapon(); + } + }; + add(Button_Create); + + layout(); + } + + /** + * 封装一个同步UI的方法,用于调整UI组件的位置和大小。 + */ + private void SyncUI() { + OptionSlider_Tier.setRect(0, GAP, WIDTH, 24); + int numLines = (int) Math.ceil(AllWeapon.length / (float) MAX_ICONS_PER_LINE); + float totalHeight = 30; + if (numLines > 0) { + totalHeight += numLines * (BTN_SIZE + GAP); + } + Button_Level.setRect(0, totalHeight, WIDTH, 24); + Text_EnchantInfo.setPos(0, GAP + Button_Level.bottom()); + OptionSlider_EnchantRarity.setRect(0, GAP + Text_EnchantInfo.bottom(), WIDTH, 24); + OptionSlider_EnchantId.setRect(0, GAP + OptionSlider_EnchantRarity.bottom(), WIDTH, 24); + CheckBox_Curse.setRect(0, GAP + OptionSlider_EnchantId.bottom(), WIDTH / 2f - GAP / 2f, 16); + Button_Create.setRect(WIDTH / 2f + GAP / 2f, CheckBox_Curse.top(), WIDTH / 2f - GAP / 2f, 16); + resize(WIDTH, (int) (CheckBox_Curse.bottom() + GAP)); + } + + @Override + public synchronized void update() { + super.update(); + // 实时同步UI + SyncUI(); + } + + private void layout(){ + SyncUI(); + } + + /** + * 创建武器列表,并根据阶数筛选相应的武器类。 + * + * @param tier 武器的阶数 + */ + private void createWeaponList(int tier) { + AllWeapon = getWeapon(tier); + } + + /** + * 更新选中的武器文本。 + */ + private void updateSelectedWeaponText() { + Weapon wpn = (Weapon) Reflection.newInstance(getWeapon(tier)[weapon_id]); + Button_Level.text(wpn.name()); + layout(); + } + + /** + * 创建武器图标,并添加到窗口中。 + * + * @param all 所有武器的Class数组 + */ + private void createWeaponImage(Class[] all) { + float left = BTN_SIZE / 2f; + float top = 27; + int placed = 0; + int length = all.length; + for (int i = 0; i < length; ++i) { + final int j = i; + IconButton btn = new IconButton() { + @Override + protected void onClick() { + weapon_id = Math.min(maxSlots(tier) - 1, j); + updateSelectedWeaponText(); + super.onClick(); + } + }; + Image im = new Image(Assets.Sprites.ITEMS); + im.frame(ItemSpriteSheet.film.get(Objects.requireNonNull(Reflection.newInstance(all[i])).image)); + im.scale.set(1f); + btn.icon(im); + int row = placed / MAX_ICONS_PER_LINE; + int col = placed % MAX_ICONS_PER_LINE; + float x = left + col * (BTN_SIZE + GAP); + float y = top + row * (BTN_SIZE + GAP); + btn.setRect(x, y, BTN_SIZE, BTN_SIZE); + add(btn); + placed++; + IconButtons.add(btn); + } + } + + /** + * 清除武器图标。 + */ + private void clearImage() { + for (int i = 0, len = IconButtons.size(); i < len; ++i) { + IconButtons.get(i).destroy(); + } + IconButtons.clear(); + } + /** + * 获取附魔信息文本。 + * + * @param enchant 附魔类 + * @return 附魔信息文本 */ + private String getEnchantInfo(Class enchant) { + return enchant==null?Messages.get(this, "no_enchant"):Messages.get(enchant, "name", Messages.get(this, "enchant")); + } + + private int maxSlots(int t) { + if (t <= 1) return 5; + if (t == 2 || t == 3) return 1145; + else return 8; + } + + + private int getEnchantCount(int rarity) { + switch (rarity) { + case 1: + return 4; + case 2: + return 6; + case 3: + return 5; + case 4: + return 8; + } + return 0; + } + + private void updateEnchantText() { + StringBuilder info = new StringBuilder(); + if (enchant_rarity == 0) { + info = new StringBuilder(Messages.get(this, "no_enchant")); + } else { + for (int i = 0; i < getEnchantCount(enchant_rarity); i++) { + info.append(i + 1).append(":").append(getEnchantInfo(getEnchant(enchant_rarity, i))).append(" "); + + // 添加换行判断 + if ((i + 1) % 4 == 0 || i == (getEnchantCount(enchant_rarity)-1)) { + info.append("\n"); + } + } + info.append(Messages.get(this, "current_enchant",getEnchantInfo(getEnchant(enchant_rarity, enchant_id)))); + } + Text_EnchantInfo.text(info.toString()); + } + + @Override + public void onBackPressed() { + super.onBackPressed(); + } + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Gregorian.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Gregorian.java new file mode 100644 index 000000000..c0b662c38 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/utils/Gregorian.java @@ -0,0 +1,61 @@ +package com.shatteredpixel.shatteredpixeldungeon.custom.utils; + +import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.birthday; +import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.holiday; + +import com.nlf.calendar.Lunar; +import com.nlf.calendar.Solar; +import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; + +import java.util.Calendar; + +public class Gregorian { + + /** + * 这个代码是基于6Tail的农历Java库
+ * 皆在计算中国的传统节日,
+ * 使地牢自动计算农历日期成为可能
+ * 目前已经实现端午节 中秋节 作者自身的生日等
+ *

+ * 要在地牢中使用该代码,
+ * 你需要在core级gradle导入指定的库
+ * 然后,使用这个库
+ * 最后调用在你需要的位置即可
+ *

+ * 实列参见RegularLevel.java:
+ * Gregorian.LunarCheckDate();
+ *
+ * Gradle Config:
+ * build.gradle (Module:core)
+ * implementation 'cn.6tail:lunar:1.3.6'
+ *

+ * Lunar Maven
+ * Lunar Release
+ * Lunar Github + * */ + public static void LunarCheckDate() { + Calendar calendar = Calendar.getInstance(); + Solar date = Solar.fromDate(calendar.getTime()); + Lunar lunar = date.getLunar(); + + boolean isZQJ = lunar.getMonth() == 8 && (lunar.getDay() >= 15-10 && lunar.getDay() <= 15+12); + boolean isDevBirthday = lunar.getMonth() == 8 && lunar.getDay() >= 22 && lunar.getDay() <= 25; + boolean isDWJ = lunar.getMonth() == 5 && (lunar.getDay() >= 5-3 && lunar.getDay() <= 5+7); + + //判断是否是开发组的开发者Ling的当天生日到后续三天-8-22--8.25*/ + if(isDevBirthday) { + birthday = RegularLevel.DevBirthday.DEV_BIRTHDAY; + } + + //判断是否是中秋节前10天到中秋节后12天*/ + if(isZQJ){ + holiday = RegularLevel.Holiday.ZQJ; + } + + //判断是否是端午节前3天到端午节后7天*/ + if(isDWJ){ + holiday = RegularLevel.Holiday.DWJ; + } + + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java index e33795db7..1565d072f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/EmoIcon.java @@ -103,6 +103,20 @@ public class EmoIcon extends Image { y = owner.y - height; } } + + public static class Love extends EmoIcon { + + public Love( CharSprite owner ) { + + super( owner ); + + copy( Icons.get( Icons.LOVE ) ); + + maxSize = 1.3f; + timeScale = 2; + scale.set( Random.Float( 1, maxSize ) ); + } + } public static class Lost extends EmoIcon { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java index 2455756c6..c3ac621a0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/Lightning.java @@ -64,7 +64,7 @@ public class Lightning extends Group { super(); this.arcs = arcs; - for (Arc arc : this.arcs) + for (Arc arc : this.arcs.toArray(new Arc[arcs.size()])) add(arc); this.callback = callback; @@ -87,7 +87,7 @@ public class Lightning extends Group { float alpha = life / DURATION; - for (Arc arc : arcs) { + for (Arc arc : arcs.toArray(new Arc[0])) { arc.alpha(alpha); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java index a8c4bc8e1..d261fb3c1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Amulet.java @@ -112,6 +112,7 @@ public class Amulet extends Item { public void afterCreate() { Badges.validateVictory(); Badges.validateChampion(Challenges.activeChallenges()); +// PaswordBadges.loadGlobal(); PaswordBadges.ALLCS(Challenges.activeChallenges()); Badges.saveGlobal(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java index 0c0ce2076..e624e9697 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/ArcaneResin.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; +import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfAnmy; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; @@ -108,7 +109,7 @@ public class ArcaneResin extends Item { @Override public void onSelect( Item item ) { - if (item != null && item instanceof Wand) { + if (item != null && item instanceof Wand && !(item instanceof WandOfAnmy)) { Wand w = (Wand)item; if (w.level() >= 3){ 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 4791e3441..36e4c9d95 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -120,10 +120,12 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfTransfusion; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfWarding; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.AssassinsBlade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BattleAxe; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Crossbow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dairikyan; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dirk; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.EndingBlade; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Flail; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gauntlet; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Glaive; @@ -142,8 +144,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Quarterstaff; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RedBloodMoon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RoundShield; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RunicBlade; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SDBSword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sai; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Scimitar; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Shortsword; @@ -400,9 +404,11 @@ public class Generator { Dairikyan.class, MagicTorch.class, GreenSword.class, + SDBSword.class, + RedBloodMoon.class, }; - WEP_T3.probs = new float[]{ 1, 5, 5, 4, 4, 4 ,3,5,3,6,0}; + WEP_T3.probs = new float[]{ 1, 5, 5, 4, 4, 4 ,3,5,3,6,0,0,0}; WEP_T4.classes = new Class[]{ Longsword.class, @@ -433,9 +439,11 @@ public class Generator { WEP_T6.classes = new Class[]{ IceFishSword.class, - IceDewVialSword.class + IceDewVialSword.class, + BloodthirstyThorn.class, + EndingBlade.class, }; - WEP_T6.probs = new float[]{ 1,0 }; + WEP_T6.probs = new float[]{ 1,0,0,0 }; //see Generator.randomArmor ARMOR.classes = new Class[]{ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java index c0dac9182..83d06763d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Item.java @@ -70,7 +70,11 @@ public class Item implements Bundlable { //TODO should these be private and accessed through methods? public int image = 0; - public int icon = -1; //used as an identifier for items with randomized images + + public Class ItemSpriteClass; + + public int icon = -1; + //used as an identifier for items with randomized images public boolean stackable = false; @@ -82,10 +86,10 @@ public class Item implements Bundlable { public int level = 0; public boolean levelKnown = false; - + public boolean cursed; public boolean cursedKnown; - + // Unique items persist through revival public boolean unique = false; @@ -94,14 +98,14 @@ public class Item implements Bundlable { // whether an item can be included in heroes remains public boolean bones = false; - + public static final Comparator itemComparator = new Comparator() { @Override public int compare( Item lhs, Item rhs ) { return Generator.Category.order( lhs ) - Generator.Category.order( rhs ); } }; - + public ArrayList actions( Hero hero ) { ArrayList actions = new ArrayList<>(); actions.add( AC_DROP ); @@ -119,17 +123,17 @@ public class Item implements Bundlable { public boolean doPickUp(Hero hero, int pos) { if (collect( hero.belongings.backpack )) { - + GameScene.pickUp( this, pos ); Sample.INSTANCE.play( Assets.Sounds.ITEM ); hero.spendAndNext( TIME_TO_PICK_UP ); return true; - + } else { return false; } } - + public void doDrop( Hero hero ) { hero.spendAndNext(TIME_TO_DROP); int pos = hero.pos; @@ -144,39 +148,39 @@ public class Item implements Bundlable { public void doThrow( Hero hero ) { GameScene.selectCell(thrower); } - + public void execute( Hero hero, String action ) { GameScene.cancel(); curUser = hero; curItem = this; - + if (action.equals( AC_DROP )) { - + if (hero.belongings.backpack.contains(this) || isEquipped(hero)) { doDrop(hero); } - + } else if (action.equals( AC_THROW )) { - + if (hero.belongings.backpack.contains(this) || isEquipped(hero)) { doThrow(hero); } - + } } - + public void execute( Hero hero ) { execute( hero, defaultAction ); } - + protected void onThrow( int cell ) { Heap heap = Dungeon.level.drop( this, cell ); if (!heap.isEmpty()) { heap.sprite.drop( cell ); } } - + //takes two items and merges them (if possible) public Item merge( Item other ){ if (isSimilar( other )){ @@ -185,7 +189,7 @@ public class Item implements Bundlable { } return this; } - + public boolean collect( Bag container ) { if (quantity <= 0){ @@ -209,7 +213,7 @@ public class Item implements Bundlable { if (!container.canHold(this)){ return false; } - + if (stackable) { for (Item item:items) { if (isSimilar( item )) { @@ -238,11 +242,11 @@ public class Item implements Bundlable { return true; } - + public boolean collect() { return collect( Dungeon.hero.belongings.backpack ); } - + //returns a new item if the split was sucessful and there are now 2 items, otherwise null public Item split( int amount ){ if (amount <= 0 || amount >= quantity()) { @@ -250,27 +254,27 @@ public class Item implements Bundlable { } else { //pssh, who needs copy constructors? Item split = Reflection.newInstance(getClass()); - + if (split == null){ return null; } - + Bundle copy = new Bundle(); this.storeInBundle(copy); split.restoreFromBundle(copy); split.quantity(amount); quantity -= amount; - + return split; } } - + public final Item detach( Bag container ) { - + if (quantity <= 0) { - + return null; - + } else if (quantity == 1) { @@ -279,18 +283,18 @@ public class Item implements Bundlable { } return detachAll( container ); - + } else { - - + + Item detached = split(1); updateQuickslot(); if (detached != null) detached.onDetach( ); return detached; - + } } - + public final Item detachAll( Bag container ) { Dungeon.quickslot.clearItem( this ); @@ -312,7 +316,7 @@ public class Item implements Bundlable { updateQuickslot(); return this; } - + public boolean isSimilar( Item item ) { return level == item.level && getClass() == item.getClass(); } @@ -328,7 +332,7 @@ public class Item implements Bundlable { public int level(){ return level; } - + //returns the level of the item, after it may have been modified by temporary boosts/reductions //note that not all item properties should care about buffs/debuffs! (e.g. str requirement) public int buffedLvl(){ @@ -344,39 +348,39 @@ public class Item implements Bundlable { updateQuickslot(); } - + public Item upgrade() { - + this.level++; updateQuickslot(); - + return this; } - + final public Item upgrade( int n ) { for (int i=0; i < n; i++) { upgrade(); } - + return this; } - + public Item degrade() { - + this.level--; - + return this; } - + final public Item degrade( int n ) { for (int i=0; i < n; i++) { degrade(); } - + return this; } - + public int visiblyUpgraded() { return levelKnown ? level() : 0; } @@ -384,19 +388,19 @@ public class Item implements Bundlable { public int buffedVisiblyUpgraded() { return levelKnown ? buffedLvl() : 0; } - + public boolean visiblyCursed() { return cursed && cursedKnown; } - + public boolean isUpgradable() { return true; } - + public boolean isIdentified() { return levelKnown && cursedKnown; } - + public boolean isEquipped( Hero hero ) { return false; } @@ -415,18 +419,18 @@ public class Item implements Bundlable { levelKnown = true; cursedKnown = true; Item.updateQuickslot(); - + return this; } - + public void onHeroGainExp( float levelPercent, Hero hero ){ //do nothing by default } - + public static void evoke( Hero hero ) { hero.sprite.emitter().burst( Speck.factory( Speck.EVOKE ), 5 ); } - + @Override public String toString() { @@ -441,19 +445,23 @@ public class Item implements Bundlable { return name; } - + public String name() { return trueName(); } - + public final String trueName() { return Messages.get(this, "name"); } - + public int image() { return image; } - + + public ItemSprite itemSprite() { + return Reflection.newInstance(ItemSpriteClass); + } + public ItemSprite.Glowing glowing() { return null; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java index 734f844e2..c2b9e96b9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java @@ -12,7 +12,7 @@ public class MainBooks extends Item { public int value() { return 20 * quantity; } - public String author = Messages.get(MainBooks.class, "desc"); + public String author = Messages.get(this, "desc"); public String authorx = Messages.get(this, "author"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java index 948f663c9..cab235852 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/armor/curses/Displacement.java @@ -35,7 +35,7 @@ public class Displacement extends Armor.Glyph { @Override public int proc(Armor armor, Char attacker, Char defender, int damage ) { - if (defender == Dungeon.hero && Random.Int(20) == 0){ + if (defender == Dungeon.hero && Random.Int(20) == 0 && !Dungeon.level.locked){ ScrollOfTeleportation.teleportChar(Dungeon.hero); return 0; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java index 87bde1bcc..c754add54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/ChaliceOfBlood.java @@ -85,7 +85,8 @@ public class ChaliceOfBlood extends Artifact { if (action.equals(AC_PRICK)){ - Statistics.ChaicBlood++; + //修复等级问题 2023 10 15 + Statistics.ChaicBlood = Math.min(Statistics.ChaicBlood + 1, 10); int damage = 3*(level()*level()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java index 9ec6ac7ec..297abf02d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/DriedRose.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.artifacts; +import static com.shatteredpixel.shatteredpixeldungeon.Statistics.deadGo; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; @@ -50,6 +52,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetributio import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfPsionicBlast; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon; +import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; @@ -80,6 +83,10 @@ public class DriedRose extends Artifact { { image = ItemSpriteSheet.ARTIFACT_ROSE1; + if(RegularLevel.holiday == RegularLevel.Holiday.ZQJ){ + cursed = false; + } + levelCap = 10; charge = 100; @@ -94,7 +101,7 @@ public class DriedRose extends Artifact { private GhostHero ghost = null; private int ghostID = 0; - private MeleeWeapon weapon = null; + public MeleeWeapon weapon = null; private Armor armor = null; public int droppedPetals = 0; @@ -110,7 +117,7 @@ public class DriedRose extends Artifact { actions.remove(AC_EQUIP); return actions; } - if (isEquipped( hero ) && charge == chargeCap && !cursed && ghostID == 0) { + if (isEquipped( hero ) && charge == chargeCap && !cursed && ghostID == 0 && !deadGo) { actions.add(AC_SUMMON); } if (ghostID != 0){ @@ -558,6 +565,11 @@ public class DriedRose extends Artifact { if (rose == null || !rose.isEquipped(Dungeon.hero)){ damage(1, this); } + + if(deadGo){ + die(true); + GLog.n(Messages.get(DriedRose.class, "sorry")); + } if (!isAlive()) { return true; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java index e530bc043..6705bb87e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java @@ -10,6 +10,8 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NPC; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -80,7 +82,7 @@ public class WraithAmulet extends Artifact { exp += level()>5 ? 20 : 40; Buff.affect(Dungeon.hero, Invisibility.class, Invisibility.DURATION/2); GLog.p(Messages.get(this,"ghost")); - cooldown = 20 - (level); + cooldown = 40 - (level); charge--; } else { GLog.i(Messages.get(this,"nochareup")); @@ -99,7 +101,7 @@ public class WraithAmulet extends Artifact { } else { GLog.i(Messages.get(this,"nochareup")); } - } else if(cursed) { + } else if(cursed && isEquipped(hero)) { GLog.i(Messages.get(this,"must_nocursed")); } } @@ -214,19 +216,28 @@ public class WraithAmulet extends Artifact { amulet.exp += 40; hero.pos = target; if (enemy.properties().contains(Char.Property.BOSS)) { - enemy.damage(enemy.HT/4, WraithAmulet.class); + enemy.damage(enemy.HT / 4, WraithAmulet.class); GLog.i(Messages.get(this, "killboss")); - enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this,"koss")); + amulet.cooldown = 150 / (amulet.level() / 2); + amulet.charge -= 6; + enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this, "koss")); + } else if (enemy.properties().contains(Char.Property.MIMIC) && enemy.alignment == Char.Alignment.NEUTRAL){ + for (Mob m: Dungeon.level.mobs){ + if(m.state == m.PASSIVE && (m instanceof Mimic)){ + GLog.i(Messages.get(this, "notthere2")); + return; + } + } } else { enemy.die(true); GLog.i(Messages.get(this, "killmobs")); enemy.sprite.showStatus(CharSprite.NEGATIVE, Messages.get(this,"died")); + ScrollOfTeleportation.appear(hero, target); + Dungeon.observe(); + hero.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10); + amulet.cooldown = 150 / (amulet.level() / 2); + amulet.charge -= 6; } - ScrollOfTeleportation.appear(hero, target); - Dungeon.observe(); - hero.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10); - amulet.cooldown = 150 / (amulet.level() / 2); - amulet.charge -= 6; } else { GLog.w(Messages.get(this, "notnpc")); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java index 1b2d1785a..cba8b720a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bags/PotionBandolier.java @@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.bags; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.LiquidMetal; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class PotionBandolier extends Bag { @@ -34,7 +35,7 @@ public class PotionBandolier extends Bag { @Override public boolean canHold( Item item ) { - if (item instanceof Potion || item instanceof LiquidMetal){ + if (item instanceof Potion && !(item instanceof PotionOfPurity.PotionOfPurityLing) || item instanceof LiquidMetal){ return super.canHold(item); } else { return false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java index 1fbe15ca1..edffdb16d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.bombs; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; @@ -191,7 +193,7 @@ public class Bomb extends Item { ch.damage(dmg, this); } - if (ch == Dungeon.hero && !ch.isAlive()) { + if (ch == hero && !ch.isAlive()) { Dungeon.fail(Bomb.class); } } @@ -202,6 +204,78 @@ public class Bomb extends Item { } } + public void explodeHeros(int cell){ + //We're blowing up, so no need for a fuse anymore. + this.fuse = null; + + Sample.INSTANCE.play( Assets.Sounds.BLAST ); + + if (explodesDestructively()) { + + ArrayList affected = new ArrayList<>(); + + if (Dungeon.level.heroFOV[cell]) { + CellEmitter.center(cell).burst(BlastParticle.FACTORY, 30); + } + + boolean terrainAffected = false; + for (int n : PathFinder.NEIGHBOURS9) { + int c = cell + n; + if (c >= 0 && c < Dungeon.level.length()) { + if (Dungeon.level.heroFOV[c]) { + CellEmitter.get(c).burst(SmokeParticle.FACTORY, 4); + } + + if (Dungeon.level.flamable[c]) { + Dungeon.level.destroy(c); + GameScene.updateMap(c); + terrainAffected = true; + } + + //destroys items / triggers bombs caught in the blast. +// Heap heap = Dungeon.level.heaps.get(c); +// if (heap != null) +// heap.explode(); + + Char ch = Actor.findChar(c); + if (ch != null) { + affected.add(ch); + } + } + } + + for (Char ch : affected){ + + //if they have already been killed by another bomb + if(!ch.isAlive()){ + continue; + } + + int dmg = Random.NormalIntRange(2 + Dungeon.depth, 4 + Dungeon.depth*2); + + //those not at the center of the blast take less damage + + + if (ch.pos != cell){ + dmg = Math.round(dmg*0.67f); + } + + dmg -= ch.drRoll(); + + if (dmg > 0) { + if(ch == hero){ + return; + } + ch.damage(dmg, this); + } + } + + if (terrainAffected) { + Dungeon.observe(); + } + } + } + public void explodeMobs(int cell){ //We're blowing up, so no need for a fuse anymore. this.fuse = null; @@ -262,7 +336,7 @@ public class Bomb extends Item { ch.damage(dmg, this); } - if (ch == Dungeon.hero && !ch.isAlive()) { + if (ch == hero && !ch.isAlive()) { Dungeon.fail(Bomb.class); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java index 4bce4eeb5..3b0fddd44 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java @@ -50,7 +50,12 @@ public class MeatPie extends Food { protected void satisfy(Hero hero) { if (Dungeon.isChallenged(Challenges.EXSG)){ Buff.prolong( hero, Haste.class, 8f); - if(Random.Float() > (0.2f + (hero.STR/5f)/10f)){ + + if(hero.STR<12){ + hero.STR++; + hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "eat_msg_1")); + GLog.p(Messages.get(this, "eat_msg_2")); + } else if(Random.Float() > (0.35f + (hero.STR/5f)/10f)){ hero.STR++; hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "eat_msg_1")); GLog.p(Messages.get(this, "eat_msg_2")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java index 9c4ce0f93..e9ea21909 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java @@ -35,42 +35,8 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; -import java.util.Calendar; - public class Pasty extends Food { - static{ - - RegularLevel.holiday = RegularLevel.Holiday.NONE; - - final Calendar calendar = Calendar.getInstance(); - switch(calendar.get(Calendar.MONTH)){ - case Calendar.JANUARY: - if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) - RegularLevel.holiday = RegularLevel.Holiday.XMAS; - break; - //2022 9.10-10.1 - case Calendar.SEPTEMBER: - if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ - RegularLevel.holiday = RegularLevel.Holiday.ZQJ; - } else { - RegularLevel.holiday = RegularLevel.Holiday.NONE; - } - break; - case Calendar.OCTOBER: - if (calendar.get(Calendar.DAY_OF_MONTH) == 1 ){ - RegularLevel.holiday = RegularLevel.Holiday.ZQJ; - } else { - RegularLevel.holiday = RegularLevel.Holiday.NONE; - } - break; - case Calendar.DECEMBER: - if (calendar.get(Calendar.WEEK_OF_MONTH) >= 3) - RegularLevel.holiday = RegularLevel.Holiday.XMAS; - break; - } - } - { reset(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/SmallRation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/SmallRation.java index 19a4c1656..3f2ecdff2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/SmallRation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/SmallRation.java @@ -34,6 +34,12 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class SmallRation extends Food { + public static class BlackMoon extends SmallRation{ + { + image = ItemSpriteSheet.BLACKMOON; + } + } + @Override protected void satisfy( Hero hero ){ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/CrystalKey.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/CrystalKey.java index 099af6591..1c14cec60 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/CrystalKey.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/keys/CrystalKey.java @@ -21,6 +21,10 @@ package com.shatteredpixel.shatteredpixeldungeon.items.keys; +import com.shatteredpixel.shatteredpixeldungeon.Conducts; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class CrystalKey extends Key { @@ -38,5 +42,13 @@ public class CrystalKey extends Key { this.depth = depth; } + @Override + public boolean doPickUp(Hero hero, int pos) { + if(depth == 10 || (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) && (depth == 8))){ + ShatteredPixelDungeon.resetScene(); + } + return super.doPickUp(hero, pos); + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilLantern.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilLantern.java index caf5b778b..06061793a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilLantern.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilLantern.java @@ -10,17 +10,19 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LighS; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.MagicFlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; +import com.watabou.noosa.particles.Emitter; import com.watabou.utils.Bundle; import java.util.ArrayList; -public class OilLantern extends Item { +public class OilLantern extends Artifact { private static final String ACTIVE = "active"; @@ -30,13 +32,14 @@ public class OilLantern extends Item { private static final String CHARGE = "charge"; private static final String FLASKS = "flasks"; + private static final String PLASKS = "plasks"; + private static final int MAX_CHARGE = 60; private static final int MIX_CHARGE = 20; private static final float TIME_TO_USE = 2.0f; private static final String TXT_STATUS = "%d%%"; private boolean active = false; - private int charge = 100+Challenges.activeChallenges()/5*50; public int flasks = 0; public int plingks = 0; @@ -45,14 +48,57 @@ public class OilLantern extends Item { this.image = ItemSpriteSheet.LANTERNA; this.unique = true; updateSprite(); + + int chCount = 0; + for (int ch : Challenges.MASKS){ + if ((Dungeon.challenges & ch) != 0) chCount++; + } + + charge = 100 - (chCount>=6 ? chCount*4 : 0); defaultAction = AC_LIGHT; } + //TODO 仍然有问题 +// public ItemSprite itemSprite() { +// ItemSprite sprite = new LS(); +// sprite.setPos(0, 0); +// return sprite; +// } + public void updateSprite() { this.image = isActivated() ? ItemSpriteSheet.LANTERNB : ItemSpriteSheet.LANTERNA; defaultAction = isActivated() ? AC_SNUFF : AC_LIGHT; + emitter(); } + @Override + public Emitter emitter() { + Emitter emitter = new Emitter(); + emitter.pos(4.5f, 6); + emitter.fillTarget = false; + if(image == ItemSpriteSheet.LANTERNB){ + emitter.pour(StaffParticleFactory, 0.1f); + } + return emitter; + } + + + private final Emitter.Factory StaffParticleFactory = new Emitter.Factory() { + /** + * @param emitter 目标来源 + * @param index 特效来源 + * @param x,y 位置 + */ + @Override + public void emit( Emitter emitter, int index, float x, float y ) { + ((MagicFlameParticle)emitter.recycle( MagicFlameParticle.class )).reset( x, y+3 ); + } + @Override + public boolean lightMode() { + return true; + } + }; + public int getCharge() { return this.charge; } @@ -72,6 +118,7 @@ public class OilLantern extends Item { bundle.put(ACTIVE, this.active); bundle.put(CHARGE, this.charge); bundle.put(FLASKS, this.flasks); + bundle.put(PLASKS, this.plingks); } public void restoreFromBundle(Bundle bundle) { @@ -79,6 +126,7 @@ public class OilLantern extends Item { this.active = bundle.getBoolean(ACTIVE); this.charge = bundle.getInt(CHARGE); this.flasks = bundle.getInt(FLASKS); + this.plingks = bundle.getInt(PLASKS); updateSprite(); } @@ -105,7 +153,7 @@ public class OilLantern extends Item { GLog.w(Messages.get(OilLantern.class, "lanterneedsx")); } } else { - GLog.n("你陷入灵魂残缺的迷茫当中 无法引燃提灯"); + GLog.n(Messages.get(OilLantern.class, "lanternosoul")); } break; case AC_REFILL: @@ -133,7 +181,7 @@ public class OilLantern extends Item { public void refill(Hero hero) { this.flasks--; - this.charge += Math.min(MAX_CHARGE,100); + this.charge = Math.min(this.charge + MAX_CHARGE, 100); hero.spend(TIME_TO_USE); hero.busy(); Sample.INSTANCE.play(Assets.Sounds.DRINK, TIME_TO_USE, TIME_TO_USE, 1.2f); @@ -144,7 +192,7 @@ public class OilLantern extends Item { public void refills(Hero hero) { this.plingks--; - this.charge += Math.min(MIX_CHARGE,100); + this.charge = Math.min(this.charge + MAX_CHARGE, 100); hero.spend(TIME_TO_USE); hero.busy(); Sample.INSTANCE.play(Assets.Sounds.DRINK, TIME_TO_USE, TIME_TO_USE, 1.2f); @@ -156,7 +204,7 @@ public class OilLantern extends Item { public void activate(Hero hero, boolean voluntary) { if (voluntary) { if (Dungeon.hero.buff(Light.class) != null || Dungeon.hero.buff(MagicTorch.MagicLight.class) != null) { - GLog.n("你已有其他光芒效果,在这些效果取消或主动失效前,暂时无法使用提灯的效果。"); + GLog.n(Messages.get(OilLantern.class, "lantermostic")); } else { hero.spend(TIME_TO_USE); hero.busy(); @@ -192,6 +240,11 @@ public class OilLantern extends Item { Dungeon.observe(); } + @Override + public String desc() { + return Messages.get(this, "desc",flasks,plingks); + } + public int price() { return 0; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilPotion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilPotion.java index 443a40454..2e4799c0a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilPotion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/lightblack/OilPotion.java @@ -12,19 +12,22 @@ public class OilPotion extends Item { public OilPotion() { image = ItemSpriteSheet.SKPOTION; - stackable = true; + stackable = false; } + @Override public boolean isIdentified() { return true; } + @Override public ArrayList actions(Hero hero) { ArrayList actions = OilPotion.super.actions(hero); actions.add(AC_REFILL); return actions; } + @Override public void execute(Hero hero, String action) { OilPotion.super.execute(hero, action); if (action.equals(AC_REFILL)) { @@ -38,11 +41,6 @@ public class OilPotion extends Item { detach(Dungeon.hero.belongings.backpack); } -// public int proc(Char attacker, Char defender, int damage) { -// Buff.prolong(defender, Slow.class, 10.0f); -// return OilPotion.super.proc(attacker, defender, damage); -// } - @Override public int value() { return quantity * 20; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java index 236ba9ab9..502294e88 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfMindVision.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -44,10 +45,9 @@ public class PotionOfMindVision extends Potion { public void apply(Hero hero) { identify(); - if (Dungeon.isChallenged(EXSG)&& Random.Float()>0.4f) { + if (Dungeon.isChallenged(EXSG) && Random.Float()>0.4f && !(Dungeon.level.feeling == Level.Feeling.DIEDROOM)) { if (Dungeon.level.mobs.size() > 0) { GLog.i(Messages.get(this, "can't_see_mobs")); - } else { GLog.i(Messages.get(this, "cant'see_none")); } @@ -72,7 +72,7 @@ public class PotionOfMindVision extends Potion { @Override public String desc() { //三元一次逻辑运算 - return Dungeon.isChallenged(Challenges.EXSG) ? Messages.get(this, "descx") : Messages.get(this, "desc"); + return Dungeon.isChallenged(Challenges.EXSG) && !(Dungeon.level.feeling == Level.Feeling.DIEDROOM) ? Messages.get(this, "descx") : Messages.get(this, "desc"); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java index 24223c9d1..0a5de7641 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/PotionOfPurity.java @@ -39,6 +39,30 @@ import com.watabou.utils.PathFinder; import java.util.ArrayList; public class PotionOfPurity extends Potion { + public static class PotionOfPurityLing extends PotionOfPurity { + { + icon = ItemSpriteSheet.Icons.POTION_PURITY; + image = ItemSpriteSheet.GREEN_LING; + affectedBlobs = new ArrayList<>(new BlobImmunity().immunities()); + } + + @Override + public int energyVal() { + return 0; + } + + @Override + public int value() { + return 0; + } + + public boolean isKnown() { + return true; + } + + + } + private static final int DISTANCE = 3; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DevItem/CrystalLing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DevItem/CrystalLing.java new file mode 100644 index 000000000..bd21546b6 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/DevItem/CrystalLing.java @@ -0,0 +1,30 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.quest.DevItem; + +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; + +public class CrystalLing extends Item { + + { + image = ItemSpriteSheet.CRYSTAL_LING; + cursed = false; + } + + @Override + public ItemSprite.Glowing glowing() { + return new ItemSprite.Glowing(0x008888, 6f); + } + + @Override + public boolean isUpgradable() { + return false; + } + + @Override + public boolean isIdentified() { + return true; + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Red.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Red.java index 4bfa98ff2..048c27388 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Red.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/Red.java @@ -21,18 +21,28 @@ package com.shatteredpixel.shatteredpixeldungeon.items.quest; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; +import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle; +import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.watabou.noosa.Game; + +import java.util.ArrayList; public class Red extends Item { { - image = ItemSpriteSheet.DG12; + image = ItemSpriteSheet.WHITEROSE; unique = true; } - + private static final String AC_BACK = "interlevel_tp"; @Override public boolean isUpgradable() { return false; @@ -43,8 +53,34 @@ public class Red extends Item { return true; } + @Override + public ArrayList actions(Hero hero ) { + ArrayList actions = super.actions( hero ); + if(Dungeon.depth == 50) { + actions.add(AC_BACK); + } + return actions; + } + + @Override + public void execute(Hero hero, String action ) { + super.execute(hero, action); + if (action.equals(AC_BACK)) { + Buff buff = hero.buff(TimekeepersHourglass.timeFreeze.class); + if (buff != null) buff.detach(); + buff = hero.buff(Swiftthistle.TimeBubble.class); + if (buff != null) buff.detach(); + InterlevelScene.mode = InterlevelScene.Mode.RETURN; + InterlevelScene.returnDepth = 17; + InterlevelScene.returnPos = -1; + Game.switchScene( InterlevelScene.class ); + } + } + + + @Override public ItemSprite.Glowing glowing() { - return new ItemSprite.Glowing(0x00ffff, 3f); + return new ItemSprite.Glowing(Window.WHITE, 3f); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/RedWhiteRose.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/RedWhiteRose.java new file mode 100644 index 000000000..ab44a1fec --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/RedWhiteRose.java @@ -0,0 +1,36 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.quest; + +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; + +public class RedWhiteRose extends Item { + + { + image = ItemSpriteSheet.REDWHITEROSE; + cursed = false; + } + + @Override + public ItemSprite.Glowing glowing() { + return new ItemSprite.Glowing(Window.GDX_COLOR, 3f); + } + + @Override + public boolean isUpgradable() { + return false; + } + + @Override + public int level() { + return 99; + } + + @Override + public boolean isIdentified() { + return true; + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java index 6f07150e8..3cd3b7c10 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/Scroll.java @@ -42,7 +42,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlast; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfClairvoyance; -import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepSleep; +import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDeepenedSleep; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfDisarming; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfEnchantment; import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFear; @@ -290,7 +290,7 @@ public abstract class Scroll extends Item { private static HashMap, Class> stones = new HashMap<>(); static { stones.put(ScrollOfIdentify.class, StoneOfIntuition.class); - stones.put(ScrollOfLullaby.class, StoneOfDeepSleep.class); + stones.put(ScrollOfLullaby.class, StoneOfDeepenedSleep.class); stones.put(ScrollOfMagicMapping.class, StoneOfClairvoyance.class); stones.put(ScrollOfMirrorImage.class, StoneOfFlock.class); stones.put(ScrollOfRetribution.class, StoneOfBlast.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java index 067b68b23..bd04cab09 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfTeleportation.java @@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; @@ -136,6 +137,11 @@ public class ScrollOfTeleportation extends Scroll { if (!(Dungeon.level instanceof RegularLevel)){ return teleportInNonRegularLevel( hero, true ); } + + if(Dungeon.level.locked){ + GLog.w( Messages.get(ScrollOfTeleportation.class, "strong_tele") ); + return false; + } RegularLevel level = (RegularLevel) Dungeon.level; ArrayList candidates = new ArrayList<>(); @@ -270,7 +276,7 @@ public class ScrollOfTeleportation extends Scroll { ch.sprite.interruptMotion(); - if (Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[ch.pos]){ + if (Dungeon.level.heroFOV[pos] && Dungeon.level.feeling != Level.Feeling.DIEDROOM || Dungeon.level.heroFOV[ch.pos] && Dungeon.level.feeling != Level.Feeling.DIEDROOM ){ Sample.INSTANCE.play(Assets.Sounds.TELEPORT); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java index 16b4dc69f..b2c564710 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfSirensSong.java @@ -122,8 +122,8 @@ public class ScrollOfSirensSong extends ExoticScroll { @Override public void fx(boolean on) { - if (on) target.sprite.add(CharSprite.State.PARALYSED); - else target.sprite.remove(CharSprite.State.PARALYSED); + if (on) target.sprite.add(CharSprite.State.HEARTS); + else target.sprite.remove(CharSprite.State.HEARTS); } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDeepSleep.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDeepSleep.java index 7d13e37e4..59903c8a7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDeepSleep.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/stones/StoneOfDeepSleep.java @@ -1,57 +1,57 @@ -/* - * Pixel Dungeon - * Copyright (C) 2012-2015 Oleg Dolya - * - * Shattered Pixel Dungeon - * Copyright (C) 2014-2022 Evan Debenham - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package com.shatteredpixel.shatteredpixeldungeon.items.stones; - -import com.shatteredpixel.shatteredpixeldungeon.Assets; -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.MagicalSleep; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; -import com.watabou.noosa.audio.Sample; - -public class StoneOfDeepSleep extends Runestone { - - { - image = ItemSpriteSheet.STONE_SLEEP; - } - - @Override - protected void activate(int cell) { - - if (Actor.findChar(cell) != null) { - - Char c = Actor.findChar(cell); - - if (c instanceof Mob){ - - Buff.affect(c, MagicalSleep.class); - - } - - } - - Sample.INSTANCE.play( Assets.Sounds.LULLABY ); - - } -} +///* +// * Pixel Dungeon +// * Copyright (C) 2012-2015 Oleg Dolya +// * +// * Shattered Pixel Dungeon +// * Copyright (C) 2014-2022 Evan Debenham +// * +// * This program is free software: you can redistribute it and/or modify +// * it under the terms of the GNU General Public License as published by +// * the Free Software Foundation, either version 3 of the License, or +// * (at your option) any later version. +// * +// * This program is distributed in the hope that it will be useful, +// * but WITHOUT ANY WARRANTY; without even the implied warranty of +// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// * GNU General Public License for more details. +// * +// * You should have received a copy of the GNU General Public License +// * along with this program. If not, see +// */ +// +//package com.shatteredpixel.shatteredpixeldungeon.items.stones; +// +//import com.shatteredpixel.shatteredpixeldungeon.Assets; +//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.MagicalSleep; +//import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +//import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +//import com.watabou.noosa.audio.Sample; +// +//public class StoneOfDeepSleep extends Runestone { +// +// { +// image = ItemSpriteSheet.STONE_SLEEP; +// } +// +// @Override +// protected void activate(int cell) { +// +// if (Actor.findChar(cell) != null) { +// +// Char c = Actor.findChar(cell); +// +// if (c instanceof Mob){ +// +// Buff.affect(c, MagicalSleep.class); +// +// } +// +// } +// +// Sample.INSTANCE.play( Assets.Sounds.LULLABY ); +// +// } +//} 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 index 09f16534c..ca460fb29 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAnmy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfAnmy.java @@ -79,12 +79,10 @@ public class WandOfAnmy extends DamageWand { @Override public void fx(boolean on) { - if (on) { - target.sprite.add(CharSprite.State.HEARTS); - //Statistics.TryUsedAnmy = true; + if(!target.properties.contains(Char.Property.NOBIG)){ + if (on) {target.sprite.add(CharSprite.State.HEARTS); + } else target.sprite.remove(CharSprite.State.HEARTS); } - else - target.sprite.remove(CharSprite.State.HEARTS); } @Override @@ -111,12 +109,10 @@ public class WandOfAnmy extends DamageWand { @Override public void fx(boolean on) { - if (on) { - target.sprite.add(CharSprite.State.HEARTS); - //Statistics.TryUsedAnmy = true; + if(!target.properties.contains(Char.Property.NOBIG)){ + if (on) {target.sprite.add(CharSprite.State.HEARTS); + } else target.sprite.remove(CharSprite.State.HEARTS); } - else - target.sprite.remove(CharSprite.State.HEARTS); } @Override @@ -125,7 +121,7 @@ public class WandOfAnmy extends DamageWand { } public int icon() { - return BuffIndicator.HEX; + return BuffIndicator.HEART; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java index 1e5c07ff6..a9fee7e1d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfFireblast.java @@ -55,7 +55,7 @@ public class WandOfFireblast extends DamageWand { public static class PlaceHolderX extends WandOfFireblast { { - image = ItemSpriteSheet.WAND_BLAST_WAVE; + image = ItemSpriteSheet.WAND_FIREBOLT; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java index 166da1322..065d21f22 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/wands/WandOfPrismaticLight.java @@ -21,15 +21,19 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Challenges; 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.buffs.Blindness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.effects.Beam; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; @@ -69,9 +73,12 @@ public class WandOfPrismaticLight extends DamageWand { affectMap(beam); if (Dungeon.level.viewDistance < 6 ){ - if (Dungeon.isChallenged(Challenges.DARKNESS)){ + if(Dungeon.isChallenged(Challenges.DHXD) && hero.buff(Talent.LanterCooldown.class) == null || Statistics.lanterfireactive && hero.buff(Talent.LanterCooldown.class) == null){ + hero.healLantern(5f); + Buff.affect(curUser, Talent.LanterCooldown.class, 200f); + } else if (Dungeon.isChallenged(Challenges.DARKNESS) && !Dungeon.isChallenged(Challenges.DHXD)){ Buff.prolong( curUser, Light.class, 2f + buffedLvl()); - } else { + } else if(!Dungeon.isChallenged(Challenges.DHXD)) { Buff.prolong( curUser, Light.class, 10f+buffedLvl()*5); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index 9e4907b7e..18f3c4e5a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -44,6 +44,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blocki import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blooming; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Corrupting; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Crushing; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.HaloBlazing; @@ -341,10 +342,12 @@ abstract public class Weapon extends KindOfWeapon { private static final Class[] uncommon = new Class[]{ Blocking.class, Blooming.class, Elastic.class, - Lucky.class, Projecting.class, Unstable.class,HaloBlazing.class}; + Lucky.class, Projecting.class, Unstable.class}; private static final Class[] rare = new Class[]{ - Corrupting.class, Grim.class, Vampiric.class}; + Corrupting.class, Grim.class, Vampiric.class, + HaloBlazing.class, + Crushing.class}; private static final float[] typeChances = new float[]{ 50, //12.5% each diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java new file mode 100644 index 000000000..08eb30299 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java @@ -0,0 +1,52 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.utils.Random; + +public class Crushing extends Weapon.Enchantment { + + private static ItemSprite.Glowing ORANGE = new ItemSprite.Glowing( 0xcc7770 ); + + @Override + public int proc(Weapon weapon, Char attacker, Char defender, int damage ) { + // lvl 0 - 33% + // lvl 1 - 50% + // lvl 2 - 60% + int level = Math.max( 0, weapon.level() ); + + if (Random.Int( level + 12 ) >= 5) { + + if (Random.Int( 2 ) == 0) { + Buff.prolong( defender, Cripple.class, Random.Float( 1f, 1f + level/2f ) ); + } + defender.damage( Random.Int( 1, level + 2 ), this ); + + defender.sprite.emitter().burst(BlastParticle.FACTORY, 30 ); + defender.sprite.emitter().burst(SmokeParticle.FACTORY, 4 ); + if (Random.Int( 2 ) == 0) { + damage += level; + GLog.n(Messages.get(Crushing.class,"kill"),attacker.name()); + new Bomb().explodeHeros(defender.pos); + } + } + + + + return damage; + + } + + @Override + public ItemSprite.Glowing glowing() { + return ORANGE; + } +} \ No newline at end of file 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 7fbf10c2e..d22cf406c 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 @@ -40,6 +40,7 @@ public class BloodthirstyThorn extends MeleeWeapon { hitSoundPitch = 0.9f; ACC = 1.75f; RCH=1; + tier=6; } @@ -48,7 +49,6 @@ public class BloodthirstyThorn extends MeleeWeapon { public boolean isUpgradable() { return false; } - public static final String AC_PRICK = "PRICK"; @Override @@ -195,6 +195,7 @@ public class BloodthirstyThorn extends MeleeWeapon { if(chaliceOfBlood!=null){ bloodthirstyThorn.level=chaliceOfBlood.level(); } else { + //如果圣杯物品为空,则读取本局全局玩家献祭圣杯的次数 bloodthirstyThorn.level=Statistics.ChaicBlood; } @@ -235,16 +236,26 @@ public class BloodthirstyThorn extends MeleeWeapon { @Override public int min(int lvl) { - return 2 +lvl*2; + if (lvl > 14) { + return 0; + } + return 2 + lvl * 2; } @Override public int max(int lvl) { - return 6 + lvl*4; + if (lvl > 14) { + return 0; + } + return 6 + lvl * 4; } + @Override - public int STRReq(int lvl){ + public int STRReq(int lvl) { + if (lvl > 14) { + return lvl * 5; + } return 14; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/FiveRen.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/FiveRen.java new file mode 100644 index 000000000..47d7ff792 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/FiveRen.java @@ -0,0 +1,50 @@ +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.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corrosion; +import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Random; + +public class FiveRen extends MeleeWeapon { + + { + image = ItemSpriteSheet.FIVEREN; + hitSound = Assets.Sounds.HIT_STAB; + hitSoundPitch = 0.9f; + + tier = 5; + DLY = 1.5f; //0.67x speed + RCH = 2; //extra reach + } + + @Override + public int proc(Char attacker, Char defender, int damage) { + switch (Random.Int(7)) { + case 0:case 1:case 2:case 3:case 4: + default: + return super.proc(attacker, defender, damage); + case 5:case 6:case 7: + if (Random.Int(10)==1) { + Buff.affect(defender, Corrosion.class).set(5f, Dungeon.depth/3); + if (Dungeon.level.heroFOV[defender.pos]) { + defender.sprite.centerEmitter().start(Speck.factory(Speck.HEART), 0.2f, 5); + Sample.INSTANCE.play(Assets.Sounds.CHARMS); + } + } + return super.proc(attacker, defender, damage); + } + } + + @Override + public int max(int lvl) { + return Math.round(6.67f*(tier+1)) + //20 base, up from 15 + lvl*Math.round(1.33f*(tier+1)); //+4 per level, up from +3 + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java index e98a86991..522bd4eca 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Gauntlet.java @@ -58,19 +58,19 @@ public class Gauntlet extends MeleeWeapon { switch (Random.Int(6)) { case 0:case 1:case 2:case 3: default: - return max(buffedLvl()); + return super.proc( attacker, defender, damage ); case 4: case 5: Buff.affect(defender, HalomethaneBurning.class).reignite(defender); if(Random.Float()<0.55f && level <3) { Buff.prolong(attacker, Vertigo.class, 3f); } - return max(buffedLvl()); + return super.proc( attacker, defender, damage ); } } public String statsInfo(){ if (isIdentified()){ - return Messages.get(this, "stats_desc", 1+1*buffedLvl()); + return Messages.get(this, "stats_desc", 1+ buffedLvl()); } else { return Messages.get(this, "typical_stats_desc", 1); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java index dababe1ec..4916ad01e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java @@ -30,7 +30,6 @@ public class Greatsword extends MeleeWeapon { image = ItemSpriteSheet.GREATSWORD; hitSound = Assets.Sounds.HIT_SLASH; hitSoundPitch = 1f; - tier=5; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java index c2244e754..460da42e0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java @@ -62,8 +62,8 @@ public class Sai extends MeleeWeapon { if(attacker.HP >= attacker.HT){ GLog.p("血量已满!无法回血"); } else if (Random.Int(10)<=4) { - R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5); - attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5; + R = (int) Math.min(attacker.HT-attacker.HP,(attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5)); + attacker.HP +=R; attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP")); GLog.p(attacker.name()+"的迅猛一击,回血成功!"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/legend/DiedCrossBow.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/legend/DiedCrossBow.java index 6219c5eb0..5b90bad23 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/legend/DiedCrossBow.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/legend/DiedCrossBow.java @@ -20,11 +20,13 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite; import com.shatteredpixel.shatteredpixeldungeon.ui.QuickSlotButton; import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.audio.Sample; import com.watabou.noosa.particles.Emitter; +import com.watabou.utils.Callback; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; @@ -115,9 +117,7 @@ public class DiedCrossBow extends LegendWeapon { QuickSlotButton.target(Actor.findChar(cell)); } cooldown = 60-level()*2; - knockArrow().cast(curUser, target-2); knockArrow().cast(curUser, target); - knockArrow().cast(curUser, target+2); QuickSlotButton.target(Actor.findChar(target)); } @@ -132,7 +132,12 @@ public class DiedCrossBow extends LegendWeapon { return new BombArrow(); } + + + public static class BombArrow extends TippedDart { + public boolean sniperSpecial = false; + public float sniperSpecialBonusDamage = 0f; @Override public Emitter emitter() { Emitter emitter = new Emitter(); @@ -146,6 +151,9 @@ public class DiedCrossBow extends LegendWeapon { image = ItemSpriteSheet.DISPLACING_DART; } + int flurryCount = -1; + private int targetPos; + @Override public int proc(Char attacker, Char defender, int damage) { DiedCrossBow dartGun = hero.belongings.getItem(DiedCrossBow.class); @@ -155,6 +163,48 @@ public class DiedCrossBow extends LegendWeapon { return super.proc(attacker, defender, damage); } + @Override + public void cast(final Hero user, final int dst) { + final int cell = throwPos( user, dst ); + targetPos = cell; + + + final Char enemy = Actor.findChar( cell ); + + QuickSlotButton.target(enemy); + + + user.busy(); + + throwSound(); + + ((MissileSprite) user.sprite.parent.recycle(MissileSprite.class)). + reset(user.sprite, + cell, + this, + new Callback() { + @Override + public void call() { + curUser = user; + onThrow(cell); + onThrow(cell+2); + onThrow(cell-2); + } + }); + + user.sprite.zap(cell, new Callback() { + @Override + public void call() { + flurryCount--; + if (flurryCount > 0){ + cast(user, dst); + } + } + }); + super.cast(user, dst); + + } + @Override public ItemSprite.Glowing glowing() { return new ItemSprite.Glowing(0x880000, 6f); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/AncityLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/AncityLevel.java index 7e3794f4f..c2d0f73cc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/AncityLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/AncityLevel.java @@ -56,9 +56,9 @@ public class AncityLevel extends Level { case 85: return Terrain.LOCKED_EXIT; case 17: - return Terrain.EXIT; + return Dungeon.depth == 27 ? Terrain.EMPTY_SP : Terrain.EXIT; case 83: - return Dungeon.depth == 17 || Dungeon.depth == 27 ? Terrain.ENTRANCE : 14; + return Dungeon.depth == 17 ? Terrain.ENTRANCE : 14; case 99: return Terrain.STATUE_SP; case 20: diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CaveTwoBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CaveTwoBossLevel.java index e010c87ec..205d227e8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CaveTwoBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CaveTwoBossLevel.java @@ -32,7 +32,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionHero; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewDM720; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OldDM300; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.PylonCS; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; @@ -807,7 +806,7 @@ public class CaveTwoBossLevel extends Level { if (c instanceof PylonCS && c.alignment != Char.Alignment.NEUTRAL){ energySourceSprite = c.sprite; break; - } else if (c instanceof OldDM300){ + } else if (c instanceof NewDM720){ energySourceSprite = c.sprite; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java index 5e71fd40e..09846a7c1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/CavesLevel.java @@ -21,10 +21,16 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.SIGN; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Blacksmith; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.RedDragon; +import com.shatteredpixel.shatteredpixeldungeon.items.Ankh; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.CavesPainter; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; @@ -43,7 +49,11 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.StormTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WarpingTrap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Camera; import com.watabou.noosa.Game; import com.watabou.noosa.Group; import com.watabou.noosa.audio.Music; @@ -60,6 +70,7 @@ public class CavesLevel extends RegularLevel { color2 = 0xb9d661; } + //红龙的试炼 @Override protected void createItems() { @@ -93,6 +104,37 @@ public class CavesLevel extends RegularLevel { //2 to 3, average 2.2 return 2+Random.chances(new float[]{4, 1}); } + + public void updateChasmTerrain() { + synchronized (map){ + for (int i = 0; i < map.length; i++) { + if (map[i] == Terrain.SIGN_SP) { + // 将 EMPTY_DECO 地块改为新地形 + set(i, Terrain.LOCKED_EXIT); + GameScene.updateMap(i); // 更新地图显示 + Camera.main.shake(4f,7f); + } else if(hero.buff(LockedFloor.class) == null && map[i] == Terrain.LOCKED_EXIT) { + // 将 CHASM 地块改为新地形 + set(i, Terrain.EMPTY); + GameScene.updateMap(i); // 更新地图显示 + GameScene.flash(Window.WATA_COLOR); + } + if (map[i] == SIGN) { + // 将 SIGN 地块改为新地形 + set(i, Terrain.WATER); + GameScene.updateMap(i); // 更新地图显示 + } + Ankh weapon = Dungeon.hero.belongings.getItem(Ankh.class); + if (weapon != null) { + Dungeon.level.drop(weapon, entrance).sprite.drop(); + weapon.detachAll(hero.belongings.backpack); + GLog.w(Messages.get(Level.class,"weapon")); + } + GameScene.flash(Window.SKYBULE_COLOR); + playBGM(Assets.BGM_BOSSC, true); + } + } + } @Override protected Painter painter() { 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 d81d9c388..06bae0fcb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ColdChestBossLevel.java @@ -321,20 +321,24 @@ public class ColdChestBossLevel extends Level { 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; + + if(Statistics.fuckGeneratorAlone==0) { + 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; + } } + Statistics.fuckGeneratorAlone++; pro = START; break; @@ -353,43 +357,46 @@ public class ColdChestBossLevel extends Level { 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; + if(Statistics.fuckGeneratorAlone==1) { + 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; + } } } + Statistics.fuckGeneratorAlone++; switch (Random.NormalIntRange(0,8)){ case 0: @@ -462,25 +469,28 @@ public class ColdChestBossLevel extends Level { //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; + if(Statistics.fuckGeneratorAlone==2) { + 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; + } } } + Statistics.fuckGeneratorAlone++; //生成四个水晶,宝箱王持续回血 for (int i : FourCrystal) { @@ -511,6 +521,8 @@ public class ColdChestBossLevel extends Level { if(boss instanceof DiamondKnight) { //如果楼层为开始且boss血量小于200 4阶段 if (pro == VSLINK_START && boss.HP <= 200) { + Buff.detach(boss, ChampionEnemy.Halo.class); + ((DiamondKnight) boss).baseSpeed *= 2; pro = VSYOU_START; } } @@ -523,7 +535,7 @@ public class ColdChestBossLevel extends Level { //如果楼层为开始且boss血量小于100 判定WIN if (pro == VSYOU_START && boss.HP <= 100) { pro = WIN; - Buff.detach(boss, ChampionEnemy.Halo.class); + //Buff.detach(boss, ChampionEnemy.Halo.class); } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ForestBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ForestBossLevel.java index 94488159d..919d17038 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ForestBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ForestBossLevel.java @@ -1,5 +1,6 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.STRONGER_BOSSES; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.level; import com.shatteredpixel.shatteredpixeldungeon.Assets; @@ -197,9 +198,15 @@ public class ForestBossLevel extends Level { GameScene.updateMap( HOME ); Dungeon.observe(); - drop( new PotionOfPurity(), WIDTH*11+15 ); - drop( new PotionOfPurity(), WIDTH*15+16 ); - drop( new PotionOfPurity(), WIDTH*11+17 ); + if (!Dungeon.isChallenged(STRONGER_BOSSES)) { + Heap s = drop(new PotionOfPurity.PotionOfPurityLing().identify(), WIDTH * 23 + 15); + s.type = Heap.Type.SKELETON; + s.sprite.view(s); + + Heap x = drop(new PotionOfPurity.PotionOfPurityLing().identify(), WIDTH * 15 + 17); + x.type = Heap.Type.SKELETON; + x.sprite.view(x); + } } @Override @@ -298,6 +305,42 @@ public class ForestBossLevel extends Level { }; + private static final int[] WorldHard = { + W,W,W,W,W,W,W,B,B,B,B,W,W,W,W,W,W,W,W,W,W,W,B,B,B,B,W,W,W,W,W,W, + W,M,M,M,M,M,M,C,C,C,C,L,L,W,T,M,I,M,T,W,L,L,C,C,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,C,L,L,L,W,T,M,M,M,T,W,L,L,L,C,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,H,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,M,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,H,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,M,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,H,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,T,M,M,M,T,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,W,W,X,W,W,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,L,L,L,L,W,M,B,H,B,M,W,L,L,L,L,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,C,L,L,L,A,M,C,H,C,M,A,L,L,L,C,C,C,M,M,M,M,M,W, + W,M,M,M,M,M,M,C,C,C,C,L,L,W,M,C,H,C,M,W,L,L,C,C,C,C,M,M,M,M,M,W, + W,B,B,B,B,B,B,W,W,W,W,B,W,B,M,C,H,C,M,B,W,B,W,W,W,B,B,B,B,B,B,W, + W,C,C,C,C,C,C,W,W,W,M,C,M,C,M,C,H,C,M,C,M,C,W,W,W,C,C,C,C,C,C,W, + W,L,L,L,W,W,W,B,M,M,M,C,M,H,M,C,H,C,M,H,M,C,M,M,B,W,W,L,L,L,L,W, + W,L,L,W,W,M,M,C,M,M,M,C,C,C,C,C,H,C,C,C,M,C,M,M,C,M,W,W,L,L,L,W, + W,W,W,W,B,M,M,W,M,M,M,H,C,C,H,H,H,H,H,C,M,H,M,M,W,M,M,B,W,W,W,W, + W,W,C,C,C,C,C,W,C,C,C,C,C,C,H,C,C,C,H,C,C,C,C,C,W,C,C,C,C,C,W,W, + W,H,H,H,W,W,W,W,W,W,W,H,H,H,H,C,D,C,H,H,H,W,W,W,W,W,W,W,H,H,H,W, + W,C,C,C,C,C,C,W,C,C,C,C,C,C,H,C,C,C,H,C,C,C,C,C,W,C,C,C,C,C,M,W, + W,M,M,M,M,M,M,W,M,M,M,H,M,C,H,H,H,H,H,C,M,H,M,M,W,M,M,M,M,M,M,W, + W,M,M,M,M,M,M,M,M,M,M,M,M,C,C,C,H,C,C,C,M,M,M,M,M,M,M,M,M,M,M,W, + W,M,M,H,M,M,M,M,M,M,M,M,M,H,M,C,H,C,M,H,M,M,M,M,M,M,M,M,M,M,M,W, + W,M,M,M,W,M,M,H,M,M,M,M,M,M,M,C,H,C,M,M,M,M,M,M,M,M,M,H,M,M,M,W, + W,M,M,M,M,M,W,M,M,M,M,W,W,W,W,W,S,W,W,W,W,W,M,H,W,M,M,M,M,M,M,W, + W,M,M,M,W,M,M,M,M,M,W,W,M,M,W,L,M,L,W,M,M,W,W,M,M,M,M,W,M,M,M,W, + W,M,M,M,H,M,M,M,W,W,W,M,M,M,W,L,M,L,W,M,M,M,W,W,M,M,M,M,M,M,M,W, + W,M,M,M,M,M,M,M,W,M,M,M,M,M,S,M,M,M,S,M,M,M,M,W,W,W,M,M,M,M,M,W, + W,M,M,M,M,M,M,M,W,M,M,M,M,M,W,L,M,L,W,M,M,M,M,M,W,M,M,H,M,M,M,W, + W,W,M,M,M,M,M,M,W,M,M,M,M,M,W,L,Q,L,W,M,M,M,M,M,W,M,M,M,M,M,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 class Sink extends Emitter { private int pos; @@ -375,7 +418,13 @@ public class ForestBossLevel extends Level { //构建地图 protected boolean build() { setSize(WIDTH, HEIGHT); - map = WorldRoomShort.clone(); + + if(Dungeon.isChallenged(STRONGER_BOSSES)){ + map = WorldHard.clone(); + } else { + map = WorldRoomShort.clone(); + } + this.entrance = WIDTH + 16 ; this.exit = WIDTH*30 + 16; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/GardenLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/GardenLevel.java new file mode 100644 index 000000000..10a9f2637 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/GardenLevel.java @@ -0,0 +1,112 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels; + +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.EMPTY; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.WALL; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.BlueWraith; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey; +import com.shatteredpixel.shatteredpixeldungeon.items.quest.Red; +import com.watabou.utils.Random; + +public class GardenLevel extends Level { + + private static final int W = WALL; + private static final int E = EMPTY; + private static final int L = Terrain.CRYSTAL_DOOR; + private static final int S =Terrain.EMPTY_SP; + + private static final int F =Terrain.FURROWED_GRASS; + + private static final int D = Terrain.SECRET_DOOR; + + private static final int M = Terrain.SECRET_DOOR; + private static final int X = Terrain.WATER; + + private static final int WIDTH = 24; + private static final int HEIGHT = 24; + + private static final int[] code_map = { + 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,S,S,S,S,S,W,E,E,E,W,E,E,E,S,E,E,E,E,E,W,E,E,W, + W,E,E,E,E,E,D,S,S,S,W,S,S,S,S,E,E,E,E,E,W,E,E,W, + W,E,E,E,E,E,W,X,X,X,W,E,E,E,S,E,E,E,E,E,W,S,S,W, + W,W,M,W,D,W,W,X,X,X,W,W,W,W,W,W,D,W,W,W,W,E,E,W, + W,E,S,E,E,E,E,X,X,X,E,E,E,E,S,E,E,E,E,E,S,E,E,W, + W,E,S,E,E,E,E,X,X,X,E,S,S,S,S,S,S,E,E,E,S,E,E,W, + W,E,S,S,S,S,S,S,S,E,E,S,E,E,E,E,S,E,E,E,S,E,E,W, + W,E,E,E,E,E,E,E,S,E,E,S,E,E,E,E,W,W,W,W,D,W,W,W, + W,W,W,D,W,W,E,E,W,W,W,W,W,W,W,E,W,E,E,E,S,E,E,W, + W,S,E,E,E,W,E,E,W,F,F,F,F,F,W,E,W,E,E,E,S,E,E,W, + W,S,S,S,S,W,S,S,W,F,W,L,W,F,W,E,M,S,S,S,S,E,E,W, + W,X,S,X,X,W,E,E,W,F,W,S,W,F,W,E,W,E,S,X,X,X,X,W, + W,X,S,X,X,W,E,E,W,F,W,W,W,F,W,E,W,E,S,X,X,X,X,W, + W,X,S,X,X,W,E,E,W,F,F,F,F,F,W,E,W,E,S,X,X,X,X,W, + W,X,S,X,X,M,E,E,W,W,W,L,W,W,W,S,W,S,S,X,X,X,X,W, + W,X,S,X,X,W,S,S,S,S,S,S,S,S,S,S,W,W,W,D,W,W,W,W, + W,X,S,X,X,W,E,E,S,X,X,X,X,X,S,S,E,E,S,E,E,E,E,W, + W,X,S,X,X,W,E,E,S,X,X,S,S,S,S,E,E,E,S,E,E,E,E,W, + W,E,S,E,E,W,E,E,S,X,X,S,S,E,E,E,E,E,S,S,S,S,S,W, + W,W,W,D,W,W,S,S,S,S,S,S,S,S,W,W,W,W,D,W,W,M,W,W, + W,E,E,E,E,W,E,E,S,E,E,S,E,E,W,E,E,E,S,E,E,E,E,W, + W,E,E,E,E,M,E,E,S,E,E,S,E,E,W,E,E,E,S,E,E,E,E,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, + + }; + + @Override + protected boolean build() { + setSize(WIDTH, HEIGHT); + map = code_map.clone(); + this.entrance = 25; + exit = 0; + return true; + } + + /** + * + */ + @Override + protected void createMobs() { + //第一个i是初始值,第二个i是条件范围值,第三个是循环方式,这里是每次+2 + for (int i = 10; i < 15; i+=2){ + BlueWraith x = new BlueWraith(); + x.pos = (this.width * i + 5); + mobs.add(x); + } + + for (int i = 10; i < 15; i+=2){ + BlueWraith a = new BlueWraith(); + a.pos = (this.width * i + 16); + mobs.add(a); + } + } + + /** + * + */ + @Override + protected void createItems() { + float randomValue = Random.Float(); + int secondCoordinate = (randomValue < 0.3f) ? 529 : + (randomValue < 0.6f) ? 386 : + (randomValue < 0.9f) ? 62 : + (randomValue < 0.95f) ? 284 : 251; + drop(new CrystalKey( Dungeon.depth ), 546 ); + drop(new CrystalKey( Dungeon.depth ), secondCoordinate); + + + drop(new Red(), 299); + } + + @Override + public String tilesTex() { + return Assets.Environment.TILES_GARDEN; + } + + @Override + public String waterTex() { + return Assets.Environment.WATER_COLD; + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HollowLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HollowLevel.java new file mode 100644 index 000000000..4f05cb6da --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/HollowLevel.java @@ -0,0 +1,171 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.hollow.HollowMimic; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Wandmaker; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.PrisonPainter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ChillingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ConfusionTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.FlockTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GatewayTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GeyserTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GrippingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.OozeTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.PoisonDartTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ShockingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.TeleportationTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ToxicTrap; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; +import com.watabou.noosa.Group; +import com.watabou.noosa.Halo; +import com.watabou.noosa.audio.Music; +import com.watabou.noosa.particles.Emitter; +import com.watabou.utils.PointF; +import com.watabou.utils.Random; + +import java.util.ArrayList; + +public class HollowLevel extends RegularLevel { + + { + color1 = 0x6a723d; + color2 = 0x88924c; + } + + @Override + public void playLevelMusic() { + Music.INSTANCE.playTracks( + new String[]{Assets.Music.PRISON_1, Assets.Music.PRISON_2, Assets.Music.PRISON_2}, + new float[]{1, 1, 0.5f}, + false); + } + + @Override + protected ArrayList initRooms() { + return Wandmaker.Quest.spawnRoom(super.initRooms()); + } + + @Override + protected int standardRooms(boolean forceMax) { + if (forceMax) return 6; + //5 to 6, average 5.5 + return 5+ Random.chances(new float[]{1, 1}); + } + + @Override + protected int specialRooms(boolean forceMax) { + if (forceMax) return 3; + //1 to 3, average 2.0 + return 1+Random.chances(new float[]{1, 3, 1}); + } + + @Override + protected Painter painter() { + return new PrisonPainter() + .setWater(feeling == Level.Feeling.WATER ? 0.90f : 0.30f, 4) + .setGrass(feeling == Level.Feeling.GRASS ? 0.80f : 0.20f, 3) + .setTraps(nTraps(), trapClasses(), trapChances()); + } + + @Override + public String tilesTex() { + return Assets.Environment.TILES_HOLLOW; + } + + @Override + public String waterTex() { + return Assets.Environment.WATER_HOLLOW; + } + + @Override + protected Class[] trapClasses() { + return new Class[]{ + ChillingTrap.class, ShockingTrap.class, ToxicTrap.class, BurningTrap.class, PoisonDartTrap.class, + AlarmTrap.class, OozeTrap.class, GrippingTrap.class, + ConfusionTrap.class, FlockTrap.class, SummoningTrap.class, TeleportationTrap.class, GatewayTrap.class, GeyserTrap.class }; + } + + @Override + protected float[] trapChances() { + return new float[]{ + 4, 4, 4, 4, 4, + 2, 2, 2, + 1, 1, 1, 1, 1, 1 }; + } + + @Override + public String tileName( int tile ) { + switch (tile) { + case Terrain.WATER: + return Messages.get(PrisonLevel.class, "water_name"); + case Terrain.WALL_DECO: + return Messages.get(HollowMimic.class, "minames"); + default: + return super.tileName( tile ); + } + } + + @Override + public String tileDesc(int tile) { + switch (tile) { + case Terrain.WALL_DECO: + return Messages.get(HollowMimic.class, "midescs"); + case Terrain.EMPTY_DECO: + return Messages.get(PrisonLevel.class, "empty_deco_desc"); + case Terrain.BOOKSHELF: + return Messages.get(PrisonLevel.class, "bookshelf_desc"); + default: + return super.tileDesc( tile ); + } + } + + @Override + public Group addVisuals() { + super.addVisuals(); + addPrisonVisuals(this, visuals); + return visuals; + } + + public static void addPrisonVisuals(Level level, Group group){ + for (int i=0; i < level.length(); i++) { + if (level.map[i] == Terrain.WALL_DECO) { + group.add( new PumpLanter( i ) ); + } + } + } + + public static class PumpLanter extends Emitter { + + private int pos; + + public PumpLanter( int pos ) { + super(); + + this.pos = pos; + + PointF p = DungeonTilemap.tileCenterToWorld( pos ); +// for (int i=0; i){ +// +// } +// pos( p.x - 4, p.y + 2, 2, 0 ); +// +// pour( FlameParticle.FACTORY, 0.15f ); + + add( new Halo( 12, 0xFFa500, 0.3f ).point( p.x, p.y + 1 ) ); + } + + @Override + public void update() { + if (visible == (pos < Dungeon.level.heroFOV.length && Dungeon.level.heroFOV[pos])) { + super.update(); + } + } + } +} 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 7aceb831c..b4aa3ae7d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Level.java @@ -21,7 +21,11 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.CHASM; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.SIGN; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.SIGN_SP; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Challenges; @@ -164,7 +168,11 @@ public abstract class Level implements Bundlable { DARK, LARGE, TRAPS, - SECRETS + SECRETS, + BIGTRAP, + THREEWELL, + LINKROOM, + DIEDROOM } public boolean isLevelExplored( int depth ){ @@ -262,6 +270,62 @@ public abstract class Level implements Bundlable { return 48*48; } + private void initializeLevelDepthType(){ + if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ + int randomInt = Random.Int(10); + if(Dungeon.depth == 4 || Dungeon.depth == 14){ + feeling = Feeling.DIEDROOM; + } else if (randomInt == 0) { + feeling = Feeling.CHASM; + } else if (randomInt == 1) { + feeling = Feeling.WATER; + } else if (randomInt == 2) { + feeling = Feeling.GRASS; + } else if (randomInt == 3) { + feeling = Feeling.DARK; + addItemToSpawn(new Torch()); + viewDistance = Math.round(viewDistance / 2f); + } else if (randomInt == 4) { + feeling = Feeling.TRAPS; + } else if (randomInt == 5) { + feeling = Feeling.BIGTRAP; + } else if (randomInt == 6) { + feeling = Feeling.SECRETS; + } else if (randomInt == 7) { + feeling = Feeling.LINKROOM; + } else if (randomInt == 8) { + feeling = Feeling.THREEWELL; + } + } else { + switch (Random.Int( 14 )) { + case 0: + feeling = Feeling.CHASM; + break; + case 1: + feeling = Feeling.WATER; + break; + case 2: + feeling = Feeling.GRASS; + break; + case 3: + feeling = Feeling.DARK; + addItemToSpawn(new Torch()); + viewDistance = Math.round(viewDistance/2f); + break; + case 4: + feeling = Feeling.LARGE; + addItemToSpawn(Generator.random(Generator.Category.FOOD)); + break; + case 5: + feeling = Feeling.TRAPS; + break; + case 6: + feeling = Feeling.SECRETS; + break; + } + } + } + public void create() { Random.pushGenerator( Dungeon.seedCurDepth() ); @@ -298,35 +362,12 @@ public abstract class Level implements Bundlable { addItemToSpawn( new StoneOfIntuition() ); } - if (Dungeon.depth > 1) { - //50% chance of getting a level feeling - //~7.15% chance for each feeling - switch (Random.Int( 14 )) { - case 0: - feeling = Feeling.CHASM; - break; - case 1: - feeling = Feeling.WATER; - break; - case 2: - feeling = Feeling.GRASS; - break; - case 3: - feeling = Feeling.DARK; - addItemToSpawn(new Torch()); - viewDistance = Math.round(viewDistance/2f); - break; - case 4: - feeling = Feeling.LARGE; - addItemToSpawn(Generator.random(Generator.Category.FOOD)); - break; - case 5: - feeling = Feeling.TRAPS; - break; - case 6: - feeling = Feeling.SECRETS; - break; - } + if (Dungeon.depth > 0) { + initializeLevelDepthType(); + } + + if(Dungeon.bossLevel()){ + feeling = Feeling.NONE; } } @@ -359,7 +400,7 @@ public abstract class Level implements Bundlable { length = w * h; map = new int[length]; - Arrays.fill( map, feeling == Level.Feeling.CHASM ? Terrain.CHASM : Terrain.WALL ); + Arrays.fill( map, feeling == Level.Feeling.CHASM ? CHASM : Terrain.WALL ); visited = new boolean[length]; mapped = new boolean[length]; @@ -546,9 +587,7 @@ public abstract class Level implements Bundlable { Mob m = Reflection.newInstance(mobsToSpawn.remove(0)); ChampionEnemy.rollForChampion(m); - if(Dungeon.isChallenged(SBSG)){ - ChampionEnemy.rollForStateLing(m); - } + ChampionEnemy.rollForStateLing(m); Buff.affect(m, HasteLing.MobLing.class, HasteLing.MobLing.DURATION*2000f); return m; } @@ -693,7 +732,6 @@ public abstract class Level implements Bundlable { } if (!mob.buffs(ChampionEnemy.class).isEmpty() && Dungeon.isChallenged(SBSG)){ GLog.n(Messages.get(ChampionEnemy.class, "warn2")); - GLog.w(Messages.get(ChampionEnemy.class, "warn")); } else if(!mob.buffs(ChampionEnemy.class).isEmpty()) { GLog.w(Messages.get(ChampionEnemy.class, "warn")); } @@ -763,8 +801,13 @@ public abstract class Level implements Bundlable { avoid[i] = (flags & Terrain.AVOID) != 0; water[i] = (flags & Terrain.LIQUID) != 0; pit[i] = (flags & Terrain.PIT) != 0; + } + + + + for (Blob b : blobs.values()){ b.onBuildFlagMaps(this); } @@ -896,7 +939,7 @@ public abstract class Level implements Bundlable { heap.seen = Dungeon.level == this && heroFOV[cell]; heap.pos = cell; heap.drop(item); - if (map[cell] == Terrain.CHASM || (Dungeon.level != null && pit[cell])) { + if (map[cell] == CHASM || (Dungeon.level != null && pit[cell])) { Dungeon.dropToChasm( item ); GameScene.discard( heap ); } else { @@ -1073,6 +1116,9 @@ public abstract class Level implements Bundlable { Door.enter( ch.pos ); } } + + + } //public method for forcing the hard press of a cell. e.g. when an item lands on it @@ -1103,6 +1149,8 @@ public abstract class Level implements Bundlable { case Terrain.FURROWED_GRASS: HighGrass.trample( this, cell); break; + + case Terrain.WELL: WellWater.affectCell( cell ); @@ -1383,7 +1431,7 @@ public abstract class Level implements Bundlable { public String tileName( int tile ) { switch (tile) { - case Terrain.CHASM: + case CHASM: return Messages.get(Level.class, "chasm_name"); case Terrain.EMPTY: case Terrain.EMPTY_SP: @@ -1424,7 +1472,7 @@ public abstract class Level implements Bundlable { return Messages.get(Level.class, "locked_exit_name"); case Terrain.UNLOCKED_EXIT: return Messages.get(Level.class, "unlocked_exit_name"); - case Terrain.SIGN: + case SIGN:case SIGN_SP: return Messages.get(Level.class, "sign_name"); case Terrain.WELL: return Messages.get(Level.class, "well_name"); @@ -1447,7 +1495,7 @@ public abstract class Level implements Bundlable { public String tileDesc( int tile ) { switch (tile) { - case Terrain.CHASM: + case CHASM: return Messages.get(Level.class, "chasm_desc"); case Terrain.WATER: return Messages.get(Level.class, "water_desc"); @@ -1469,7 +1517,7 @@ public abstract class Level implements Bundlable { return Messages.get(Level.class, "locked_exit_desc"); case Terrain.BARRICADE: return Messages.get(Level.class, "barricade_desc"); - case Terrain.SIGN: + case SIGN:case SIGN_SP: return Messages.get(Level.class, "sign_desc"); case Terrain.INACTIVE_TRAP: return Messages.get(Level.class, "inactive_trap_desc"); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LevelRules.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LevelRules.java index f9e046961..e3a0c4b70 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LevelRules.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/LevelRules.java @@ -69,9 +69,9 @@ public class LevelRules { return new DwarfMasterBossLevel(); case 26: return new YogGodHardBossLevel(); - case 28: - Buff.affect(hero, TestDwarfMasterLock.class).set(1, 1); - return new DM920BossLevel(); +// case 28: +// Buff.affect(hero, TestDwarfMasterLock.class).set(1, 1); +// return new DM920BossLevel(); default: Statistics.deepestFloor--; return new DeadEndLevel(); @@ -136,6 +136,8 @@ public class LevelRules { } case 26: return new LastLevel(); + case 50: + return new GardenLevel(); default: Statistics.deepestFloor--; return new DeadEndLevel(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java index ee247ddd1..eb8daddcb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/PrisonBossLevel.java @@ -107,7 +107,7 @@ public class PrisonBossLevel extends Level { @Override public String tilesTex() { - return Assets.Environment.TILES_PRISON; + return locked ? Assets.Environment.TILES_TENGUS : Assets.Environment.TILES_PRISON; } @Override @@ -300,7 +300,7 @@ public class PrisonBossLevel extends Level { customWalls.add(vis); GameScene.add(vis, true); - Painter.set(this, tenguCell.left+4, tenguCell.top, Terrain.DOOR); + Painter.set(this, tenguCell.left+4, tenguCell.top, Terrain.CRYSTAL_DOOR); int cell = pointToCell(endStart); int i = 0; @@ -397,8 +397,13 @@ public class PrisonBossLevel extends Level { return; } } - + + seal(); + GameScene.flash(0x80aaaaaa); + Camera.main.shake(1f,2f); + GameScene.bossReady(); + set(pointToCell(tenguCellDoor), Terrain.LOCKED_DOOR); GameScene.updateMap(pointToCell(tenguCellDoor)); @@ -510,6 +515,8 @@ public class PrisonBossLevel extends Level { Sample.INSTANCE.play(Assets.Sounds.BLAST); state = State.WON; + GameScene.updateMap(); + GameScene.flash(0x80FFFFFF); Game.runOnRenderThread(new Callback() { @Override public void call() { @@ -521,11 +528,10 @@ public class PrisonBossLevel extends Level { } private boolean[] triggered = new boolean[]{false, false, false, false}; - + @Override public void occupyCell(Char ch) { super.occupyCell(ch); - if (ch == Dungeon.hero){ switch (state){ case START: @@ -534,7 +540,6 @@ public class PrisonBossLevel extends Level { } break; case FIGHT_PAUSE: - if (cellToPoint(ch.pos).y <= startHallway.top+1){ progress(); } 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 172f36128..ea5013ca6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -23,9 +23,13 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; import static com.shatteredpixel.shatteredpixeldungeon.Challenges.AQUAPHOBIA; import static com.shatteredpixel.shatteredpixeldungeon.Challenges.EXSG; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.depth; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.Holiday.XMAS; +import com.nlf.calendar.Lunar; +import com.nlf.calendar.Solar; import com.shatteredpixel.shatteredpixeldungeon.Bones; import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -42,6 +46,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GoldenMimic; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mimic; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Statue; +import com.shatteredpixel.shatteredpixeldungeon.custom.utils.Gregorian; import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; @@ -60,17 +65,25 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.AutoShopRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.HealWellRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.IdenityRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.LanFireRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.MagicalFireRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.NxhyShopRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.NyzBombAndBooksRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.PitRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.RandomRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.ShopRoom; 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.GooRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.HeartRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.LinkRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.LoveRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.MagicDimandRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.OldDM300Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BlazingTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BurningTrap; @@ -93,58 +106,69 @@ public abstract class RegularLevel extends Level { public static Holiday holiday; + public static DevBirthday birthday; + + //开发团队的生日列表 + // S直接参与Calendar类计算 + // L参与Lunar-Java类计算 + public enum DevBirthday { + DEV_BIRTHDAY, + //QinYue S-5.13 + CHAPTER_BIRTHDAY, + //设寄师 + DESIGN_BIRTHDAY, + //丹尼尔 + ART_DC_BIRTHDAY, + //冷群 + ART_LQ_BIRTHDAY, + //小蓝 S-3.26 + ART_LB_BIRTHDAY, + //清扬 L-12.3 + ART_CY_BIRTHDAY, + } + public enum Holiday{ NONE, DWJ, ZQJ, //TBD HWEEN,//2nd week of october though first day of november - XMAS //3rd week of december through first week of january + XMAS, } + + static{ holiday = Holiday.NONE; + /**农历计算*/ + Gregorian.LunarCheckDate(); + final Calendar calendar = Calendar.getInstance(); + + Solar date = Solar.fromDate(calendar.getTime()); + Lunar lunar = date.getLunar(); + + boolean isZQJ = lunar.getMonth() == 8 && (lunar.getDay() >= 15-10 && lunar.getDay() <= 15+12); + + + //计算中国传统节日的代码已迁移到最上方的"Gregorian.LunarCheckDate();"方法。 switch(calendar.get(Calendar.MONTH)){ case Calendar.JANUARY: if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) - holiday = XMAS; - break; - //6.20-6.30 - case Calendar.JUNE: - if (calendar.get(Calendar.DAY_OF_MONTH) >= 20 ){ - holiday = Holiday.DWJ; - } else { - holiday = Holiday.NONE; - } - break; - case Calendar.JULY: - int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH); - if(dayOfMonth <= 12){ - holiday = Holiday.DWJ; - } else { - holiday = Holiday.NONE; - } - break; - //9.10-10.1 - case Calendar.SEPTEMBER: - if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ - holiday = Holiday.ZQJ; - } else { - holiday = Holiday.NONE; - } + holiday = Holiday.XMAS; break; case Calendar.OCTOBER: - if (calendar.get(Calendar.DAY_OF_MONTH) == 1 ){ - holiday = Holiday.ZQJ; - } else { - holiday = Holiday.NONE; - } + if (calendar.get(Calendar.WEEK_OF_MONTH) >= 2 && !isZQJ) + holiday = Holiday.HWEEN; + break; + case Calendar.NOVEMBER: + if (calendar.get(Calendar.DAY_OF_MONTH) == 1 && !isZQJ) + holiday = Holiday.HWEEN; break; case Calendar.DECEMBER: if (calendar.get(Calendar.WEEK_OF_MONTH) >= 3) - holiday = XMAS; + holiday = Holiday.XMAS; break; } } @@ -233,8 +257,8 @@ public abstract class RegularLevel extends Level { initRooms.add( roomExit = new ExitRoom()); //force max standard rooms and multiple by 1.5x for large levels - int standards = standardRooms(feeling == Feeling.LARGE); - if (feeling == Feeling.LARGE){ + int standards = standardRooms(feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))); + if (feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ standards = (int)Math.ceil(standards * 1.5f); } for (int i = 0; i < standards; i++) { @@ -257,7 +281,29 @@ public abstract class RegularLevel extends Level { } // initRooms.add(new EyeRoom()); -// initRooms.add(new YinYangRoom()); +// initRooms.add(new YinYangRoom());z + + if(feeling == Feeling.DIEDROOM){ + switch (depth){ + case 4: + initRooms.add(new GooRoom()); + break; + case 14: + initRooms.add(new OldDM300Room()); + break; + } + + } + + + if(RegularLevel.holiday == Holiday.ZQJ ){ + if(Dungeon.depth == 17){ + initRooms.add(new HeartRoom()); + } + if(Statistics.findMoon && Dungeon.depth == 18){ + initRooms.add(new LoveRoom()); + } + } if (Dungeon.NxhyshopOnLevel()) { initRooms.add(new NxhyShopRoom()); @@ -273,10 +319,20 @@ public abstract class RegularLevel extends Level { } //force max special rooms and add one more for large levels - int specials = specialRooms(feeling == Feeling.LARGE); - if (feeling == Feeling.LARGE){ + int specials = specialRooms(feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))); + if (feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ specials++; } + if(feeling == Feeling.THREEWELL){ + initRooms.add(new HealWellRoom()); + initRooms.add(new RandomRoom()); + initRooms.add(new IdenityRoom()); + } + + if(feeling == Feeling.LINKROOM){ + initRooms.add(new LinkRoom()); + } + SpecialRoom.initForFloor(); for (int i = 0; i < specials; i++) { SpecialRoom s = SpecialRoom.createRoom(); @@ -354,9 +410,15 @@ public abstract class RegularLevel extends Level { if (Dungeon.depth <= 1) return 0; int mobs = 3 + Dungeon.depth % 5 + Random.Int(3); - if (feeling == Feeling.LARGE){ + if (feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ mobs = (int)Math.ceil(mobs * 1.33f); } + + // 在特定挑战中怪物生成翻倍 + if (Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))) { + mobs += Random.NormalIntRange(1,3); + } + return mobs; } @@ -489,7 +551,7 @@ public abstract class RegularLevel extends Level { // drops 3/4/5 items 60%/30%/10% of the time int nItems = 3 + Random.chances(new float[]{6, 3, 1}); - if (feeling == Feeling.LARGE){ + if (feeling == Feeling.LARGE || Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ nItems += 2; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SLMKingLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SLMKingLevel.java index 44fd36a25..3f6dd2713 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SLMKingLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SLMKingLevel.java @@ -28,8 +28,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.builders.Builder; import com.shatteredpixel.shatteredpixeldungeon.levels.builders.FigureEightBuilder; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.JunglePainter; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; -import com.shatteredpixel.shatteredpixeldungeon.levels.painters.SewerPainter; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.RatKingRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.SewerBossEntranceRoom; @@ -74,11 +74,19 @@ public class SLMKingLevel extends SewerLevel { return initRooms; } + @Override + public int tunnelTile() { + return Terrain.WATER; + } + @Override protected int standardRooms(boolean forceMax) { - if (forceMax) return 3; - //2 to 3, average 2.5 - return 2+Random.chances(new float[]{1, 1}); + return 0; + } + + @Override + protected int specialRooms(boolean forceMax) { + return 0; } protected Builder builder(){ @@ -90,7 +98,7 @@ public class SLMKingLevel extends SewerLevel { @Override protected Painter painter() { - return new SewerPainter() + return new JunglePainter() .setWater(0.50f, 5) .setGrass(0.20f, 4) .setTraps(nTraps(), trapClasses(), trapChances()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java index 30a9c3ab8..a37ff3b5e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerBossLevel.java @@ -31,8 +31,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.levels.builders.Builder; import com.shatteredpixel.shatteredpixeldungeon.levels.builders.FigureEightBuilder; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.JunglePainter; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; -import com.shatteredpixel.shatteredpixeldungeon.levels.painters.SewerPainter; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.RatKingRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.sewerboss.GooBossRoom; @@ -57,6 +57,11 @@ public class SewerBossLevel extends SewerLevel { } private int stairs = 0; + + @Override + public int tunnelTile() { + return Terrain.WATER; + } @Override public void playLevelMusic() { @@ -108,9 +113,12 @@ public class SewerBossLevel extends SewerLevel { @Override protected int standardRooms(boolean forceMax) { - if (forceMax) return 3; - //2 to 3, average 2.5 - return 2+Random.chances(new float[]{1, 1}); + return 0; + } + + @Override + protected int specialRooms(boolean forceMax) { + return 0; } protected Builder builder(){ @@ -122,7 +130,7 @@ public class SewerBossLevel extends SewerLevel { @Override protected Painter painter() { - return new SewerPainter() + return new JunglePainter() .setWater(0.50f, 5) .setGrass(0.20f, 4) .setTraps(nTraps(), trapClasses(), trapChances()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java index 7b19c719a..a74424c63 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/SewerLevel.java @@ -21,13 +21,20 @@ package com.shatteredpixel.shatteredpixeldungeon.levels; +import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.SIGN; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.SIGN_SP; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.effects.Ripple; +import com.shatteredpixel.shatteredpixeldungeon.items.Ankh; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.JunglePainter; import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; -import com.shatteredpixel.shatteredpixeldungeon.levels.painters.SewerPainter; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ChillingTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ConfusionTrap; @@ -42,6 +49,9 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WornDartTrap; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.noosa.Camera; import com.watabou.noosa.Game; import com.watabou.noosa.Group; import com.watabou.noosa.particles.Emitter; @@ -73,11 +83,43 @@ public class SewerLevel extends RegularLevel { @Override protected Painter painter() { - return new SewerPainter() + return new JunglePainter() .setWater(feeling == Feeling.WATER ? 0.85f : 0.30f, 5) .setGrass(feeling == Feeling.GRASS ? 0.80f : 0.20f, 4) .setTraps(nTraps(), trapClasses(), trapChances()); } + + + public void updateChasmTerrain() { + synchronized (map){ + for (int i = 0; i < map.length; i++) { + if (map[i] == SIGN_SP) { + // 将 SIGN_SP 地块改为新地形 + set(i, Terrain.LOCKED_EXIT); + GameScene.updateMap(i); // 更新地图显示 + Camera.main.shake(3f,6f); + } else if(hero.buff(LockedFloor.class) == null + && map[i] == Terrain.LOCKED_EXIT) { + // 将 CHASM 地块改为新地形 + set(i, Terrain.EMPTY); + GameScene.updateMap(i); // 更新地图显示 + } + if (map[i] == SIGN) { + // 将 SIGN 地块改为新地形 + set(i, Terrain.WATER); + GameScene.updateMap(i); // 更新地图显示 + } + Ankh weapon = Dungeon.hero.belongings.getItem(Ankh.class); + if (weapon != null) { + Dungeon.level.drop(weapon, entrance).sprite.drop(); + weapon.detachAll(hero.belongings.backpack); + GLog.w(Messages.get(Level.class,"weapon")); + } + playBGM(Assets.BGM_BOSSA, true); + GameScene.flash(Window.DeepPK_COLOR); + } + } + } @Override public String tilesTex() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java index 10eca99ba..f57b36283 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/Terrain.java @@ -60,6 +60,9 @@ public class Terrain { public static final int WATER = 29; public static final int LAVA = 30; + + public static final int SIGN_SP = 33; + public static final int PASSABLE = 0x01; public static final int LOS_BLOCKING = 0x02; @@ -101,7 +104,15 @@ public class Terrain { flags[EMPTY_DECO] = flags[EMPTY]; flags[LOCKED_EXIT] = SOLID; flags[UNLOCKED_EXIT]= PASSABLE; - flags[SIGN] = SOLID; //Currently these are unused except for visual tile overrides where we want terrain to be solid with no other properties + + //Currently these are unused except for visual tile overrides where we want terrain to be solid with no other properties + flags[SIGN] = SOLID; + + flags[SIGN_SP] = PASSABLE; + + + + // to be solid with no other properties flags[WELL] = AVOID; flags[STATUE] = SOLID; flags[STATUE_SP] = flags[STATUE]; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ZeroLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ZeroLevel.java index 10e76c8a3..e0b398f84 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ZeroLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/ZeroLevel.java @@ -31,7 +31,6 @@ import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NxhyNpc; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Nyz; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkLing; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.REN; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Slyl; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.obSir; @@ -190,9 +189,9 @@ public class ZeroLevel extends Level { npc3.pos = (this.width * 18 + 20); mobs.add(npc3); - PinkLing god1= new PinkLing(); - god1.pos = (this.width * 28 + 30); - mobs.add(god1); +// PinkLing god1= new PinkLing(); +// god1.pos = (this.width * 28 + 30); +// mobs.add(god1); if (Badges.isUnlocked(Badges.Badge.NYZ_SHOP)){ Nyz npc4= new Nyz(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java index 78716fc06..b2aa41e21 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/features/HighGrass.java @@ -43,17 +43,17 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.watabou.utils.Random; public class HighGrass { - + //prevents items dropped from grass, from trampling that same grass. //yes this is a bit ugly, oh well. private static boolean freezeTrample = false; public static void trample( Level level, int pos ) { - + if (freezeTrample) return; - + Char ch = Actor.findChar(pos); - + if (level.map[pos] == Terrain.FURROWED_GRASS){ if (ch instanceof Hero && ((Hero) ch).heroClass == HeroClass.HUNTRESS){ //Do nothing @@ -61,7 +61,7 @@ public class HighGrass { } else { Level.set(pos, Terrain.GRASS); } - + } else { if (ch instanceof Hero && ((Hero) ch).heroClass == HeroClass.HUNTRESS){ Level.set(pos, Terrain.FURROWED_GRASS); @@ -69,9 +69,9 @@ public class HighGrass { } else { Level.set(pos, Terrain.GRASS); } - + int naturalismLevel = 0; - + if (ch != null) { SandalsOfNature.Naturalism naturalism = ch.buff( SandalsOfNature.Naturalism.class ); if (naturalism != null) { @@ -106,13 +106,13 @@ public class HighGrass { } } - + if (naturalismLevel >= 0) { // Seed, scales from 1/25 to 1/5 if (Random.Int(25 - (naturalismLevel * 5)) == 0) { level.drop(Generator.random(Generator.Category.SEED), pos).sprite.drop(); } - + // Dew, scales from 1/6 to 1/3 if (Random.Int(24 - naturalismLevel*3) <= 3) { level.drop(new Dewdrop(), pos).sprite.drop(); @@ -136,14 +136,14 @@ public class HighGrass { Camouflage.activate(statue, statue.armor().buffedLvl()); } } - + } - + freezeTrample = false; - + if (ShatteredPixelDungeon.scene() instanceof GameScene) { GameScene.updateMap(pos); - + CellEmitter.get(pos).burst(LeafParticle.LEVEL_SPECIFIC, 4); if (Dungeon.level.heroFOV[pos]) Dungeon.observe(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/JunglePainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/JunglePainter.java new file mode 100644 index 000000000..cef347cad --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/JunglePainter.java @@ -0,0 +1,155 @@ +/* + * Pixel Dungeon + * Copyright (C) 2012-2015 Oleg Dolya + * + * Shattered Pixel Dungeon + * Copyright (C) 2014-2022 Evan Debenham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see + */ + +package com.shatteredpixel.shatteredpixeldungeon.levels.painters; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard.StandardRoom; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTileSheet; +import com.watabou.utils.Random; + +import java.util.ArrayList; + +public class JunglePainter extends RegularPainter { + + private static final int SHAPE_RADIUS = 3; // + // 菱形的半径 + + @Override + protected void decorate(Level level, ArrayList rooms) { + int[] map = level.map; + int w = level.width(); + int l = level.length(); + + for (int i = 0; i < w; i++) { + if (map[i] == Terrain.WALL && map[i + w] == Terrain.WATER && Random.Int(4) == 0) { + map[i] = Terrain.WALL_DECO; + } + } + + for (int i = w; i < l - w; i++) { + if (map[i] == Terrain.WALL && map[i - w] == Terrain.WALL && map[i + w] == Terrain.WATER && Random.Int(2) == 0) { + map[i] = Terrain.WALL_DECO; + } + } + + for (Room room : rooms) { + if (!(room instanceof StandardRoom)) { + continue; + } + + if (room.width() <= 4 || room.height() <= 4) { + continue; + } + + int s = room.square(); + + if (Random.Int( s ) > 8) { + int corner = (room.left + 1) + (room.top + 1) * w; + if (map[corner - 1] == Terrain.WALL && map[corner - w] == Terrain.WALL) { + map[corner] = Terrain.WALL; + level.traps.remove(corner); + } + } + + if (Random.Int( s ) > 8) { + int corner = (room.right - 1) + (room.top + 1) * w; + if (map[corner + 1] == Terrain.WALL && map[corner - w] == Terrain.WALL) { + map[corner] = Terrain.WALL; + level.traps.remove(corner); + } + } + + if (Random.Int( s ) > 8) { + int corner = (room.left + 1) + (room.bottom - 1) * w; + if (map[corner - 1] == Terrain.WALL && map[corner + w] == Terrain.WALL) { + map[corner] = Terrain.WALL; + level.traps.remove(corner); + } + } + + if (Random.Int( s ) > 8) { + int corner = (room.right - 1) + (room.bottom - 1) * w; + if (map[corner + 1] == Terrain.WALL && map[corner + w] == Terrain.WALL) { + map[corner] = Terrain.WALL; + level.traps.remove(corner); + } + } + + } + + for (int i=0; i < l - w; i++) { + + if (map[i] == Terrain.EMPTY && Random.Int( 10 ) == 0) { + map[i] = Terrain.EMPTY_DECO; + + } else if (map[i] == Terrain.WALL + && !DungeonTileSheet.wallStitcheable(map[i + w]) + && Random.Int( 21 - Dungeon.depth ) == 0) { + map[i] = Terrain.WALL_DECO; + } + } + + for (int i = w + 1; i < l - w - 1; i++) { + if (map[i] == Terrain.EMPTY) { + int count = + (map[i + 1] == Terrain.WALL ? 1 : 0) + + (map[i - 1] == Terrain.WALL ? 1 : 0) + + (map[i + w] == Terrain.WALL ? 1 : 0) + + (map[i - w] == Terrain.WALL ? 1 : 0); + + if (Random.Int(16) < count * count) { + map[i] = Terrain.EMPTY_DECO; + } + } + } + + for (int i = 0; i < l; i++) { + if (map[i] == Terrain.WALL) { + if (checkShape(i % w, i / w, w, l)) { + map[i] = Terrain.WALL_DECO; + } + } else if (map[i] == Terrain.EMPTY && Random.Int(5) == 0) { + map[i] = Terrain.GRASS; + } + } + + for (Room r : rooms) { + for (Room n : r.neigbours) { + if (!r.connected.containsKey( n )) { + mergeRooms(level, r, n, null, Terrain.CHASM); + } + } + } + + } + + private boolean checkShape(int x, int y, int width, int length) { + int centerX = width / 2; + int centerY = length / 2; + + int distance = (x - centerX) * (x - centerX) + (y - centerY) * (y - centerY); + return distance <= SHAPE_RADIUS * SHAPE_RADIUS; + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PrisonPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PrisonPainter.java index 8b6b70939..2a064bd6c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PrisonPainter.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/PrisonPainter.java @@ -73,19 +73,26 @@ public class PrisonPainter extends RegularPainter { if (map[i] == Terrain.WALL && (map[i + w] == Terrain.EMPTY || map[i + w] == Terrain.EMPTY_SP) && Random.Int( 6 ) == 0) { - map[i] = Terrain.WALL_DECO; } } + + for (int i = w; i < l - w; i++) { + if (map[i] == Terrain.WALL && map[i - w] == Terrain.WALL && map[i + w] == Terrain.WATER && Random.Int(2) == 0) { + map[i] = Terrain.WALL_DECO; + + } + } - for (int i=w; i < l - w; i++) { - if (map[i] == Terrain.WALL && - map[i - w] == Terrain.WALL && - (map[i + w] == Terrain.EMPTY || map[i + w] == Terrain.EMPTY_SP) && - Random.Int( 3 ) == 0) { - - map[i] = Terrain.WALL_DECO; - } - } +// for (int i=w; i < l - w; i++) { +// if (map[i] == Terrain.WALL && +// map[i - w] == Terrain.WALL && +// (map[i + w] == Terrain.EMPTY || map[i + w] == Terrain.EMPTY_SP) && +// Random.Int( 3 ) == 0) { +// level.mobs.add(HollowMimic.spawnAt(i,( Generator.randomUsingDefaults( Generator.Category.ARMOR ) ), +// HollowMimic.class)); +// map[i] = Terrain.WALL; +// } +// } } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java index abb2a8224..dade65d3a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/RegularPainter.java @@ -121,7 +121,7 @@ public abstract class RegularPainter extends Painter { placeDoors( r ); r.paint( level ); } - + paintDoors( level, rooms ); if (waterFill > 0f) { @@ -440,10 +440,15 @@ public abstract class RegularPainter extends Painter { } //no more than one trap every 5 valid tiles. - nTraps = Math.min(nTraps, validCells.size()/5); + + nTraps = l.feeling == Level.Feeling.BIGTRAP ? Math.min(nTraps, + validCells.size()/2) : Math.min(nTraps, + validCells.size()/5); //5x traps on traps level feeling, but the extra traps are all visible - for (int i = 0; i < (l.feeling == Level.Feeling.TRAPS ? 5*nTraps : nTraps); i++) { + for (int i = 0; i < (l.feeling == Level.Feeling.BIGTRAP ? 30*nTraps : l.feeling == Level.Feeling.TRAPS ? + 5*nTraps : + nTraps); i++) { Trap trap = Reflection.newInstance(trapClasses[Random.chances( trapChances )]); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/SewerPainter.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/SewerPainter.java deleted file mode 100644 index 4ce67f316..000000000 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/painters/SewerPainter.java +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Pixel Dungeon - * Copyright (C) 2012-2015 Oleg Dolya - * - * Shattered Pixel Dungeon - * Copyright (C) 2014-2022 Evan Debenham - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package com.shatteredpixel.shatteredpixeldungeon.levels.painters; - -import com.shatteredpixel.shatteredpixeldungeon.levels.Level; -import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; -import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; -import com.watabou.utils.Random; - -import java.util.ArrayList; - -public class SewerPainter extends RegularPainter { - - @Override - protected void decorate(Level level, ArrayList rooms) { - - int[] map = level.map; - int w = level.width(); - int l = level.length(); - - for (int i=0; i < w; i++) { - if (map[i] == Terrain.WALL && - map[i + w] == Terrain.WATER && - Random.Int( 4 ) == 0) { - - map[i] = Terrain.WALL_DECO; - } - } - - for (int i=w; i < l - w; i++) { - if (map[i] == Terrain.WALL && - map[i - w] == Terrain.WALL && - map[i + w] == Terrain.WATER && - Random.Int( 2 ) == 0) { - - map[i] = Terrain.WALL_DECO; - } - } - - for (int i=w + 1; i < l - w - 1; i++) { - if (map[i] == Terrain.EMPTY) { - - int count = - (map[i + 1] == Terrain.WALL ? 1 : 0) + - (map[i - 1] == Terrain.WALL ? 1 : 0) + - (map[i + w] == Terrain.WALL ? 1 : 0) + - (map[i - w] == Terrain.WALL ? 1 : 0); - - if (Random.Int( 16 ) < count * count) { - map[i] = Terrain.EMPTY_DECO; - } - } - } - } -} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/sewerboss/GooBossRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/sewerboss/GooBossRoom.java index 96c486e9d..9d803284e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/sewerboss/GooBossRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/sewerboss/GooBossRoom.java @@ -32,6 +32,7 @@ import com.watabou.utils.Random; public abstract class GooBossRoom extends StandardRoom { + @Override public float[] sizeCatProbs() { return new float[]{0, 1, 0}; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/HealWellRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/HealWellRoom.java new file mode 100644 index 000000000..4caba9e13 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/HealWellRoom.java @@ -0,0 +1,37 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special; + +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfHealth; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WellWater; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class HealWellRoom extends SpecialRoom { + + private static final Class[] WATERS = + {WaterOfHealth.class}; + + public Class overrideWater = null; + + public void paint( Level level ) { + + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1, Terrain.EMPTY ); + + Point c = center(); + Painter.set( level, c.x, c.y, Terrain.WELL ); + + @SuppressWarnings("unchecked") + Class waterClass = + overrideWater != null ? + overrideWater : + (Class) Random.element( WATERS ); + + + WellWater.seed(c.x + level.width() * c.y, 1, waterClass, level); + + entrance().set( Door.Type.REGULAR ); + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/IdenityRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/IdenityRoom.java new file mode 100644 index 000000000..59d060bd1 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/IdenityRoom.java @@ -0,0 +1,40 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special; + +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfAwareness; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WellWater; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class IdenityRoom extends SpecialRoom { + + private static final Class[] WATERS = + {WaterOfAwareness.class}; + + public Class overrideWater = null; + + public void paint( Level level ) { + + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1, Terrain.EMPTY ); + + Point c = center(); + Painter.set( level, c.x, c.y, Terrain.WELL ); + + @SuppressWarnings("unchecked") + Class waterClass = + overrideWater != null ? + overrideWater : + (Class) Random.element( WATERS ); + + + WellWater.seed(c.x + level.width() * c.y, 1, waterClass, level); + + entrance().set( Room.Door.Type.REGULAR ); + } +} + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NxhyShopRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NxhyShopRoom.java index 00c3c96a8..e779d33e6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NxhyShopRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NxhyShopRoom.java @@ -165,8 +165,8 @@ public class NxhyShopRoom extends SpecialRoom { break; case 3: case 4: - itemsToSpawn2.add(new YellowSunBooks().quantity(3)); - itemsToSpawn2.add(new GrassKingBooks().quantity(3)); + itemsToSpawn2.add(new YellowSunBooks().quantity(1)); + itemsToSpawn2.add(new GrassKingBooks().quantity(1)); break; case 5: itemsToSpawn2.add(new MeatPie()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NyzBombAndBooksRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NyzBombAndBooksRoom.java index cfc706a85..bdc26f138 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NyzBombAndBooksRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/NyzBombAndBooksRoom.java @@ -126,7 +126,7 @@ public class NyzBombAndBooksRoom extends SpecialRoom { itemsToSpawn2.add (new Firebomb().quantity(1)); itemsToSpawn2.add (new FrostBomb().quantity(1)); itemsToSpawn2.add(new MerchantsBeacon()); - itemsToSpawn2.add(new GrassKingBooks().quantity(2)); + itemsToSpawn2.add(new GrassKingBooks().quantity(1)); itemsToSpawn2.add(new ScrollOfTransmutation()); //itemsToSpawn2.add(new DriedRose()); itemsToSpawn2.add(new ScrollOfMagicMapping()); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RandomRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RandomRoom.java new file mode 100644 index 000000000..486b41997 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/special/RandomRoom.java @@ -0,0 +1,39 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special; + +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WaterOfTransmutation; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.WellWater; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.Room; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class RandomRoom extends SpecialRoom { + + private static final Class[] WATERS = + {WaterOfTransmutation.class}; + + public Class overrideWater = null; + + public void paint( Level level ) { + + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1, Terrain.EMPTY ); + + Point c = center(); + Painter.set( level, c.x, c.y, Terrain.WELL ); + + @SuppressWarnings("unchecked") + Class waterClass = + overrideWater != null ? + overrideWater : + (Class) Random.element( WATERS ); + + + WellWater.seed(c.x + level.width() * c.y, 1, waterClass, level); + + entrance().set( Room.Door.Type.REGULAR ); + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/GooRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/GooRoom.java new file mode 100644 index 000000000..bd65ee131 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/GooRoom.java @@ -0,0 +1,251 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ClearElemental; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM100; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Guard; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Salamander; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical.GooMob; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.MagicalFireRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BlazingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.CorrosionTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.CursingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.DisarmingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.DisintegrationTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.DistortionTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.FlashingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.FrostTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.GuardianTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.PitfallTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.RockfallTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.StormTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.SummoningTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WarpingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.WeakeningTrap; +import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap; +import com.watabou.noosa.Image; +import com.watabou.noosa.Tilemap; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class GooRoom extends SpecialRoom { + + { + //noMobs = true; + } + + @Override + public int minWidth() { return 21; } + @Override + public int minHeight() { + return 21; + } + @Override + public int maxWidth() { return 21; } + @Override + public int maxHeight() { return 21; } + @Override + public boolean canMerge(Level l, Point p, int mergeTerrain) { + return false; + } + + public void paint( Level level ) { + + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1, Terrain.SIGN_SP ); + Painter.fill( level, this, 2, Terrain.EMPTY_SP ); + + + Point c = center(); + int cx = c.x; + int cy = c.y; + + for (Door door : connected.values()) { + door.set( Door.Type.CRYSTAL ); + } + + int KeyPos = (top + 10) * level.width() + left + 10; + + int L1Pos = (top + 6) * level.width() + left + 6; + + level.drop( new CrystalKey( Dungeon.depth ), L1Pos).type = Heap.Type.SKELETON; + + level.drop( new CrystalKey( Dungeon.depth ), KeyPos).type = Heap.Type.CHEST; + level.addItemToSpawn( new PotionOfMindVision()); + + for(Point p : getPoints()) { + int cell = level.pointToCell(p); + if (level.map[cell] == Terrain.TRAP){ + Blob.seed(level.pointToCell(p), 1, MagicalFireRoom.EternalFire.class, level); + } + } + + setupGooNest(level); + + int pillarW = (width()-8)/2; + int pillarH = (height()-8)/2; + + Painter.fill(level, left+3, top+3, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, left+3, bottom-3-pillarH, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, right-3-pillarW, top+3, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, right-3-pillarW, bottom-3-pillarH, pillarW+1, pillarH+1, Terrain.WALL); + + Painter.drawCircle(level, c, 7, Terrain.WATER); + Painter.drawCircle(level, c, 5, Terrain.EMPTY); + Painter.drawCircle(level, c, 3, Terrain.WATER); + Painter.drawCircle(level, c, 2, Terrain.SIGN); + Painter.drawCircle(level, c, 0, Terrain.WATER); + + Painter.set(level, cx, cy - 4, Terrain.STATUE); + + Painter.set(level, cx+4, cy,Terrain.STATUE); + Painter.set(level, cx-4, cy, Terrain.STATUE); + + Painter.set(level, cx, cy + 4, Terrain.STATUE); + + Painter.set(level, cx, cy - 7, Terrain.WALL); + + Painter.set(level, cx+7, cy,Terrain.WALL); + + Painter.set(level, cx-7, cy, Terrain.WALL); + + Painter.set(level, cx, cy + 7, Terrain.WALL); + + switch (Random.Int(4)){ + case 0: + Painter.set(level, cx, cy - 7, Terrain.CRYSTAL_DOOR); + break; + case 1: + Painter.set(level, cx+7, cy,Terrain.CRYSTAL_DOOR); + break; + case 2: + Painter.set(level, cx-7, cy, Terrain.CRYSTAL_DOOR); + break; + case 3: + Painter.set(level, cx, cy + 7, Terrain.CRYSTAL_DOOR); + break; + } + + GooMob statue = new GooMob(); + statue.pos = cx + cy * level.width(); + statue.state = statue.PASSIVE; + level.mobs.add( statue ); + + Guard statue2 = new Guard(); + statue2.HT = statue2.HP = statue2.HT*2; + statue2.pos = (cx-5) + cy * level.width(); + statue2.properties.add(Char.Property.IMMOVABLE); + level.mobs.add( statue2 ); + + Salamander statue3 = new Salamander(); + statue3.HT = statue3.HP = statue3.HT * 2; + statue3.properties.add(Char.Property.IMMOVABLE); + statue3.pos = (cx+5) + cy * level.width(); + level.mobs.add( statue3 ); + + ClearElemental statue4 = new ClearElemental(); + statue4.HT = statue4.HP = statue4.HT * 3; + statue4.properties.add(Char.Property.IMMOVABLE); + statue4.pos = (cx) + (cy-5) * level.width(); + level.mobs.add( statue4 ); + + DM100 statue5 = new DM100(); + statue5.properties.add(Char.Property.IMMOVABLE); + statue5.HT = statue5.HP = statue5.HT * 2; + statue5.pos = (cx) + (cy+5) * level.width(); + level.mobs.add( statue5 ); + } + + protected void setupGooNest( Level level ){ + GooRoom.GooNest nest = new GooRoom.GooNest(); + nest.setRect(left + width()/2 - 2, top + height()/2 - 2, 4 + width()%2, 4 + height()%2); + + level.customTiles.add(nest); + } + + public static class GooNest extends CustomTilemap { + + { + texture = Assets.Environment.SEWER_BOSS; + } + + @Override + public Tilemap create() { + Tilemap v = super.create(); + int[] data = new int[tileW*tileH]; + for (int x = 0; x < tileW; x++){ + for (int y = 0; y < tileH; y++){ + + //corners + if ((x == 0 || x == tileW-1) && (y == 0 || y == tileH-1)){ + data[x + tileW*y] = -1; + + //adjacent to corners + } else if ((x == 1 && y == 0) || (x == 0 && y == 1)){ + data[x + tileW*y] = 0; + + } else if ((x == tileW-2 && y == 0) || (x == tileW-1 && y == 1)){ + data[x + tileW*y] = 1; + + } else if ((x == 1 && y == tileH-1) || (x == 0 && y == tileH-2)){ + data[x + tileW*y] = 2; + + } else if ((x == tileW-2 && y == tileH-1) || (x == tileW-1 && y == tileH-2)) { + data[x + tileW*y] = 3; + + //sides + } else if (x == 0){ + data[x + tileW*y] = 4; + + } else if (y == 0){ + data[x + tileW*y] = 5; + + } else if (x == tileW-1){ + data[x + tileW*y] = 6; + + } else if (y == tileH-1){ + data[x + tileW*y] = 7; + + //inside + } else { + data[x + tileW*y] = 8; + } + + } + } + v.map( data, tileW ); + return v; + } + + @Override + public Image image(int tileX, int tileY) { + return null; + } + } + + protected Class[] trapClasses() { + return new Class[]{ + FrostTrap.class, StormTrap.class, CorrosionTrap.class, BlazingTrap.class, DisintegrationTrap.class, + RockfallTrap.class, FlashingTrap.class, GuardianTrap.class, WeakeningTrap.class, + DisarmingTrap.class, SummoningTrap.class, WarpingTrap.class, CursingTrap.class, PitfallTrap.class, DistortionTrap.class }; + } + + + protected float[] trapChances() { + return new float[]{ + 4, 4, 4, 4, 4, + 2, 2, 2, 2, + 1, 1, 1, 1, 1, 1 }; + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/HeartRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/HeartRoom.java new file mode 100644 index 000000000..5a6bce80a --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/HeartRoom.java @@ -0,0 +1,101 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.CHASM; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.EMPTY; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.EMPTY_SP; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.FURROWED_GRASS; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.PEDESTAL; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.WATER; + +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkGhost; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; +import com.watabou.utils.Point; + +public class HeartRoom extends SpecialRoom { + + @Override + public int minWidth() { + return 15; + } + + @Override + public int minHeight() { + return 15; + } + + @Override + public int maxWidth() { + return 15; + } + + @Override + public int maxHeight() { + return 15; + } + + @Override + public boolean canMerge(Level l, Point p, int mergeTerrain) { + return false; + } + + @Override + public void paint(Level level) { + Point center = new Point((left + right) / 2, (top + bottom) / 2); + int centerX = center.x; + int centerY = center.y; + int radius = (right - left) / 2; + + int MiddlePos = (top + 7) * level.width() + left + 7; + + Mob n = new PinkGhost(); + n.pos = MiddlePos; + level.mobs.add(n); + + Painter.drawLine(level, new Point(left, top), new Point(right, top), WATER); + Painter.drawLine(level, new Point(right, top), new Point(right, bottom), CHASM); + Painter.drawLine(level, new Point(right, bottom), new Point(left, bottom), WATER); + Painter.drawLine(level, new Point(left, bottom), new Point(left, top), CHASM); + + Painter.fill(level,this, FURROWED_GRASS); + + // 绘制爱心 + + + Painter.drawLine(level, new Point(centerX - radius, centerY), new Point(centerX, centerY - radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX + radius, centerY), new Point(centerX, centerY - radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX - radius, centerY), new Point(centerX, centerY + radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX + radius, centerY), new Point(centerX, centerY + radius), PEDESTAL); + + // 绘制眼睛外圈和门 + int eyeRadius = radius /4; + Painter.drawCircle(level, center, eyeRadius + 5, EMPTY); + + Painter.drawCircle(level, center, eyeRadius, CHASM); + + Painter.drawCircle(level, center, eyeRadius - 2, EMPTY_SP); + + // 左侧爱心 + Painter.drawLine(level, new Point(centerX - 4, centerY - 3), new Point(centerX - 2, centerY - 5), EMPTY_SP); + Painter.drawLine(level, new Point(centerX - 2, centerY - 5), new Point(centerX, centerY - 3), EMPTY_SP); + Painter.drawLine(level, new Point(centerX, centerY - 3), new Point(centerX - 4, centerY + 1),EMPTY_SP); + Painter.drawLine(level, new Point(centerX - 5, centerY), new Point(centerX - 5, centerY - 2), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX + 3, centerY + 2), new Point(centerX + 1, centerY + 4), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX, centerY + 5), new Point(centerX, centerY + 5), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX - 3, centerY + 2), new Point(centerX - 1, centerY + 4), EMPTY_SP); + + // 右侧爱心 + Painter.drawLine(level, new Point(centerX + 4, centerY - 3), new Point(centerX + 2, centerY - 5), EMPTY_SP); + Painter.drawLine(level, new Point(centerX + 2, centerY - 5), new Point(centerX, centerY - 3), EMPTY_SP); + Painter.drawLine(level, new Point(centerX, centerY - 3), new Point(centerX + 4, centerY + 1), EMPTY_SP); + Painter.drawLine(level, new Point(centerX + 5, centerY), new Point(centerX + 5, centerY - 2), EMPTY_SP); + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LinkRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LinkRoom.java new file mode 100644 index 000000000..707d0febb --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LinkRoom.java @@ -0,0 +1,102 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.depth; + +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.BruteBot; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM200; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Eye; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GreenSlting; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.SRPDHBLR; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class LinkRoom extends StandardRoom { + + @Override + public int minWidth() { return 7; } + @Override + public int minHeight() { + return 7; + } + @Override + public int maxWidth() { return 7; } + @Override + public int maxHeight() { return 7; } + + @Override + public void paint(Level level) { + Painter.fill( level, this, Terrain.WALL ); + + Painter.fillEllipse( level, this, 1 , Terrain.EMPTY ); + Painter.fillEllipse( level, this, 2 , Terrain.EMPTY_SP ); + + for (Door door : connected.values()) { + door.set( Door.Type.REGULAR ); + if (door.x == left || door.x == right){ + Painter.drawInside(level, this, door, width()/2, Terrain.EMPTY_SP); + } else { + Painter.drawInside(level, this, door, height()/2, Terrain.EMPTY_SP); + } + } + + Point center = center(); + Painter.set( level, center, Terrain.PEDESTAL ); + + + Mob n = new GreenSlting(); + if(depth >= 20){ + n = new Eye(); + } else if(depth >= 15) { + n = new BruteBot(); + } else if(depth >= 10) { + n = new DM200(); + } else if(depth >= 6){ + n = new SRPDHBLR(); + } + n.HT = n.HP = n.HT * 2; + n.pos = level.pointToCell(center); + Class buffCls; + switch (Random.NormalIntRange(0,6)){ + case 0: default: + buffCls = ChampionEnemy.Small.class; + break; + case 1: + buffCls = ChampionEnemy.Bomber.class; + break; + case 2: + buffCls = ChampionEnemy.Middle.class; + break; + case 3: + buffCls = ChampionEnemy.Big.class; + break; + case 4: + buffCls = ChampionEnemy.Sider.class; + break; + case 5: + buffCls = ChampionEnemy.LongSider.class; + break; + } + Buff.affect( n, buffCls); + level.mobs.add(n); + + Item prize = level.findPrizeItem(); + if (prize != null){ + int pos; + do { + pos = level.pointToCell(random()); + } while (level.map[pos] != Terrain.EMPTY_SP); + level.drop( prize, pos ); + } + int pos; + do { + pos = level.pointToCell(random()); + } while (!level.adjacent(pos, n.pos)); + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LoveRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LoveRoom.java new file mode 100644 index 000000000..8327443c3 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/LoveRoom.java @@ -0,0 +1,101 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.CHASM; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.EMPTY; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.EMPTY_SP; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.FURROWED_GRASS; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.PEDESTAL; +import static com.shatteredpixel.shatteredpixeldungeon.levels.Terrain.WATER; + +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkGhostNPC; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; +import com.watabou.utils.Point; + +public class LoveRoom extends SpecialRoom { + + @Override + public int minWidth() { + return 17; + } + + @Override + public int minHeight() { + return 17; + } + + @Override + public int maxWidth() { + return 17; + } + + @Override + public int maxHeight() { + return 17; + } + + @Override + public boolean canMerge(Level l, Point p, int mergeTerrain) { + return false; + } + + @Override + public void paint(Level level) { + Point center = new Point((left + right) / 2, (top + bottom) / 2); + int centerX = center.x; + int centerY = center.y; + int radius = (right - left) / 2; + + int MiddlePos = (top + 8) * level.width() + left + 8; + + Mob n = new PinkGhostNPC(); + n.pos = MiddlePos; + level.mobs.add(n); + + Painter.drawLine(level, new Point(left, top), new Point(right, top), WATER); + Painter.drawLine(level, new Point(right, top), new Point(right, bottom), CHASM); + Painter.drawLine(level, new Point(right, bottom), new Point(left, bottom), WATER); + Painter.drawLine(level, new Point(left, bottom), new Point(left, top), CHASM); + + Painter.fill(level,this, WATER); + + // 绘制爱心 + + + Painter.drawLine(level, new Point(centerX - radius, centerY), new Point(centerX, centerY - radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX + radius, centerY), new Point(centerX, centerY - radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX - radius, centerY), new Point(centerX, centerY + radius), PEDESTAL); + + Painter.drawLine(level, new Point(centerX + radius, centerY), new Point(centerX, centerY + radius), PEDESTAL); + + // 绘制眼睛外圈和门 + int eyeRadius = radius / 4; + Painter.drawCircle(level, center, eyeRadius + 5, EMPTY); + + Painter.drawCircle(level, center, eyeRadius, FURROWED_GRASS); + + Painter.drawCircle(level, center, eyeRadius - 2, EMPTY_SP); + + // 左侧爱心 + Painter.drawLine(level, new Point(centerX - 4, centerY - 3), new Point(centerX - 2, centerY - 5), EMPTY_SP); + Painter.drawLine(level, new Point(centerX - 2, centerY - 5), new Point(centerX, centerY - 3), EMPTY_SP); + Painter.drawLine(level, new Point(centerX, centerY - 3), new Point(centerX - 4, centerY + 1),EMPTY_SP); + Painter.drawLine(level, new Point(centerX - 5, centerY), new Point(centerX - 5, centerY - 2), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX + 3, centerY + 2), new Point(centerX + 1, centerY + 4), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX, centerY + 5), new Point(centerX, centerY + 5), EMPTY_SP); + + Painter.drawLine(level, new Point(centerX - 3, centerY + 2), new Point(centerX - 1, centerY + 4), EMPTY_SP); + + // 右侧爱心 + Painter.drawLine(level, new Point(centerX + 4, centerY - 3), new Point(centerX + 2, centerY - 5), EMPTY_SP); + Painter.drawLine(level, new Point(centerX + 2, centerY - 5), new Point(centerX, centerY - 3), EMPTY_SP); + Painter.drawLine(level, new Point(centerX, centerY - 3), new Point(centerX + 4, centerY + 1), EMPTY_SP); + Painter.drawLine(level, new Point(centerX + 5, centerY), new Point(centerX + 5, centerY - 2), EMPTY_SP); + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/NukeRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/NukeRoom.java new file mode 100644 index 000000000..ffa8ea5d1 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/NukeRoom.java @@ -0,0 +1,84 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Firebomb; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.ShrapnelBomb; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.features.Maze; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ExplosiveTrap; +import com.watabou.utils.PathFinder; +import com.watabou.utils.Point; +import com.watabou.utils.Random; + +public class NukeRoom extends StandardRoom { + + @Override + public int minWidth() { + return 28; + } + + @Override + public int minHeight() { + return 28; + } + + @Override + public int maxWidth() { + return 28; + } + + @Override + public int maxHeight() { + return 28; + } + + @Override + public boolean canMerge(Level l, Point p, int mergeTerrain) { + return false; + } + + @Override + public void paint(Level level) { + + Painter.fill(level, this, Terrain.WALL); + Painter.fill(level, this, 1, Terrain.EMBERS); + + //true = space, false = wall + Maze.allowDiagonals = false; + boolean[][] maze = Maze.generate(this); + boolean[] passable = new boolean[width()*height()]; + + Painter.fill(level, this, 1, Terrain.EMPTY); + Painter.fill(level, this, 2, Terrain.HIGH_GRASS); + for (int x = 0; x < maze.length; x++) { + for (int y = 0; y < maze[0].length; y++) { + if (maze[x][y] == Maze.FILLED) { + Painter.fill(level, x + left, y + top, 1, 1, Terrain.WALL_DECO); + } + passable[x + width()*y] = maze[x][y] == Maze.EMPTY; + } + } + + PathFinder.setMapSize(width(), height()); + Point entrance = connected.values().iterator().next(); + int entrancePos = (entrance.x - left) + width()*(entrance.y - top); + + PathFinder.buildDistanceMap( entrancePos, passable ); + + for (int i = 0; i < 20; i++) { + int dropPos; + do { + dropPos = level.pointToCell(random()); + } while (level.map[dropPos] != Terrain.HIGH_GRASS || level.heaps.get( dropPos ) != null); + Item prize = Random.Int(8) == 0 ? new ShrapnelBomb() : new Firebomb(); + level.drop(prize, dropPos).type = Heap.Type.HEAP; + level.map[dropPos] = Terrain.TRAP; + level.setTrap(new ExplosiveTrap(), dropPos); + } + + PathFinder.setMapSize(level.width(), level.height()); + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/OldDM300Room.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/OldDM300Room.java new file mode 100644 index 000000000..c48fae09d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/OldDM300Room.java @@ -0,0 +1,129 @@ +package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM201; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OldDM300; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.keys.CrystalKey; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision; +import com.shatteredpixel.shatteredpixeldungeon.levels.Level; +import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter; +import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.BlazingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.CursingTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.FrostTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.RockfallTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.StormTrap; +import com.shatteredpixel.shatteredpixeldungeon.levels.traps.Trap; +import com.watabou.utils.Point; +import com.watabou.utils.Random; +import com.watabou.utils.Reflection; + +public class OldDM300Room extends SpecialRoom { + + { + //noMobs = true; + } + + @Override + public int minWidth() { return 39; } + @Override + public int minHeight() { + return 39; } + @Override + public int maxWidth() { return 39; } + @Override + public int maxHeight() { return 39; } + @Override + public boolean canMerge(Level l, Point p, int mergeTerrain) { + return false; + } + + public void paint( Level level ) { + + Painter.fill( level, this, Terrain.WALL ); + Painter.fill( level, this, 1, Terrain.SIGN_SP ); + Painter.fill( level, this, 2, Terrain.WATER ); + + Point c = center(); + int cx = c.x; + int cy = c.y; + + for (Door door : connected.values()) { + door.set( Door.Type.CRYSTAL ); + } + + int KeyPos = (top + 20) * level.width() + left + 20; + + level.drop( new CrystalKey( Dungeon.depth ), KeyPos).type = Heap.Type.CHEST; + level.addItemToSpawn( new PotionOfMindVision()); + + + int pillarW = (width()-8)/2; + int pillarH = (height()-8)/2; + + Painter.fill(level, left+3, top+3, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, left+3, bottom-3-pillarH, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, right-3-pillarW, top+3, pillarW+1, pillarH+1, Terrain.WALL); + Painter.fill(level, right-3-pillarW, bottom-3-pillarH, pillarW+1, pillarH+1, Terrain.WALL); + + Painter.drawCircle(level, c, 17, Terrain.HIGH_GRASS); + Painter.drawCircle(level, c, 16, Terrain.TRAP); + Painter.drawCircle(level, c, 15, Terrain.HIGH_GRASS); + Painter.drawCircle(level, c, 14, Terrain.TRAP); + Painter.drawCircle(level, c, 13, Terrain.EMPTY); + Painter.drawCircle(level, c, 7, Terrain.STATUE); + Painter.drawCircle(level, c, 6, Terrain.WATER); + Painter.drawCircle(level, c, 5, Terrain.WATER); + Painter.drawCircle(level, c, 2, Terrain.SIGN); + Painter.drawCircle(level, c, 1, Terrain.WATER); + + for(Point p : getPoints()) { + int cell = level.pointToCell(p); + if (level.map[cell] == Terrain.TRAP){ + Trap trap = Reflection.newInstance(trapClasses()[Random.chances( trapChances() )]).reveal(); + level.setTrap( trap, cell ); + } + } + + OldDM300 statue = new OldDM300(); + statue.pos = cx + cy * level.width(); + level.mobs.add( statue ); + + DM201 statue2 = new DM201(); + statue2.pos = (cx-5) + cy * level.width(); + statue2.properties.add(Char.Property.IMMOVABLE); + level.mobs.add( statue2 ); + + DM201 statue3 = new DM201(); + statue3.properties.add(Char.Property.IMMOVABLE); + statue3.pos = (cx+5) + cy * level.width(); + level.mobs.add( statue3 ); + + DM201 statue4 = new DM201(); + statue4.properties.add(Char.Property.IMMOVABLE); + statue4.pos = (cx) + (cy-5) * level.width(); + level.mobs.add( statue4 ); + + DM201 statue5 = new DM201(); + statue5.properties.add(Char.Property.IMMOVABLE); + statue5.pos = (cx) + (cy+5) * level.width(); + level.mobs.add( statue5 ); + + } + + protected Class[] trapClasses() { + return new Class[]{ + FrostTrap.class, StormTrap.class,BlazingTrap.class, + RockfallTrap.class,CursingTrap.class }; + } + + + protected float[] trapChances() { + return new float[]{ + 1, 2, 3, 2, 3, + }; + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/YinYangRoom.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/YinYangRoom.java index c6947a52e..1ca11a58f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/YinYangRoom.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/rooms/standard/YinYangRoom.java @@ -52,7 +52,7 @@ public class YinYangRoom extends SpecialRoom { Item prize; do { prize = Generator.random(cat); - prize.level= Random.NormalIntRange(1,2); + prize.upgrade(Random.NormalIntRange(1,2)); prize.cursed = false; } while (Challenges.isItemBlocked(prize)); return prize; @@ -64,7 +64,7 @@ public class YinYangRoom extends SpecialRoom { Item prize; do { prize = Generator.random(cat); - prize.level= Random.NormalIntRange(2,3); + prize.upgrade(Random.NormalIntRange(2,3)); prize.cursed = true; } while (Challenges.isItemBlocked(prize)); return prize; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java index 489ebc46f..5a48c658b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java @@ -45,7 +45,8 @@ import java.util.Locale; This means that an object can just ask for "name" rather than, say, "items.weapon.enchantments.death.name" */ public class Messages { - + private static String baseNameX; + public static final String NO_TEXT_FOUND = baseNameX; private static ArrayList bundles; private static Languages lang; @@ -121,6 +122,7 @@ public class Messages { //Use baseName so the missing string is clear what exactly needs replacing. Otherwise, it just says java.lang.Object.[key] if (baseName == null) { baseName = key; + baseNameX = baseName; } //this is so child classes can inherit properties from their parents. //in cases where text is commonly grabbed as a utility from classes that aren't mean to be instantiated diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java index a3d6854d5..d3606cb01 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/plants/Rotberry.java @@ -3,7 +3,7 @@ * Copyright (C) 2012-2015 Oleg Dolya * * Shattered Pixel Dungeon - * Copyright (C) 2014-2022 Evan Debenham + * Copyright (C) 2014-2023 Evan Debenham * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,12 +23,15 @@ package com.shatteredpixel.shatteredpixeldungeon.plants; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AdrenalineSurge; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class Rotberry extends Plant { @@ -42,20 +45,21 @@ public class Rotberry extends Plant { public void activate( Char ch ) { if (ch instanceof Hero && ((Hero) ch).subClass == HeroSubClass.WARDEN){ Buff.affect(ch, AdrenalineSurge.class).reset(1, AdrenalineSurge.DURATION); + } else { + GameScene.add( Blob.seed( pos, 100, ToxicGas.class ) ); } - - Dungeon.level.drop( new Seed(), pos ).sprite.drop(); } - + @Override public void wither() { Dungeon.level.uproot( pos ); - + if (Dungeon.level.heroFOV[pos]) { CellEmitter.get( pos ).burst( LeafParticle.GENERAL, 6 ); } - - //no warden benefit + + //seed always drops, no lotus benefit + Dungeon.level.drop( new Seed(), pos ).sprite.drop(); } public static class Seed extends Plant.Seed { @@ -66,7 +70,7 @@ public class Rotberry extends Plant { unique = true; } - + @Override public int value() { return 30 * quantity; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java index 1765dfd19..b9260d7d2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ChangesScene.java @@ -131,7 +131,8 @@ public class ChangesScene extends PixelScene { float nextPosY = 0; boolean second = false; if (changesSelected == 0) { - ChangeSelection selection = new ChangeSelection(Messages.get(this, "later"), Messages.get(this, "mlpd")) { + ChangeSelection selection2 = new ChangeSelection(Messages.get(this, "later"), Messages.get(this, + "mlpd-0.6.4-5")) { @Override public void onClick() { NewChangesScene.changesSelected = 0; @@ -139,11 +140,54 @@ public class ChangesScene extends PixelScene { ShatteredPixelDungeon.switchNoFade(NewChangesScene.class); } }; - selection.icon(new ItemSprite(ItemSpriteSheet.MAGICGIRLBOOKS)); + selection2.icon(new ItemSprite(ItemSpriteSheet.REDWHITEROSE)); + selection2.hardlight(Window.TITLE_COLOR); + selection2.setRect(0, posY, panel.innerWidth(), 0); + content.add(selection2); + + ChangeSelection selection3 = new ChangeSelection(null, Messages.get(this, + "mlpd-0.6.0-3")) { + @Override + public void onClick() { + NewChangesScene.changesSelected = 1; + NewChangesScene.fromChangesScene = false; + ShatteredPixelDungeon.switchNoFade(NewChangesScene.class); + } + }; + selection3.icon(new ItemSprite(ItemSpriteSheet.LANTERNB)); + selection3.hardlight(Window.TITLE_COLOR); + selection3.setRect(0, posY+35, panel.innerWidth(), 0); + content.add(selection3); + + ChangeSelection selection = new ChangeSelection(null, Messages.get(this, + "mlpd-0.5.X")) { + @Override + public void onClick() { + NewChangesScene.changesSelected = 2; + NewChangesScene.fromChangesScene = false; + ShatteredPixelDungeon.switchNoFade(NewChangesScene.class); + } + }; + selection.icon(new ItemSprite(ItemSpriteSheet.DG19)); selection.hardlight(Window.TITLE_COLOR); - selection.setRect(0, posY, panel.innerWidth(), 0); + selection.setRect(0, posY+60, panel.innerWidth(), 0); content.add(selection); - posY = nextPosY = selection.bottom(); + + ChangeSelection selection0 = new ChangeSelection(null, Messages.get(this, + "mlpd-0.4.X")) { + @Override + public void onClick() { + NewChangesScene.changesSelected = 3; + NewChangesScene.fromChangesScene = false; + ShatteredPixelDungeon.switchNoFade(NewChangesScene.class); + } + }; + selection0.icon(new ItemSprite(ItemSpriteSheet.RedBloodMoon)); + selection0.hardlight(Window.TITLE_COLOR); + selection0.setRect(0, posY+85, panel.innerWidth(), 0); + content.add(selection0); + + posY = nextPosY = selection0.bottom(); } for (ChangeInfo info : changeInfos){ if (info.major) { 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 5f632cfe4..61b99d38c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java @@ -17,7 +17,6 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton; import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.windows.WndHardNotification; import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndOptions; import com.watabou.noosa.BitmapText; import com.watabou.noosa.Camera; import com.watabou.noosa.Game; @@ -266,59 +265,36 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继 if (article.ling > Game.versionCode) { // 向用户展示新文章可用的选项:下载或退出游戏 - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES), + ShatteredPixelDungeon.scene().add(new WndHardNotification(Icons.get(Icons.CHANGES), article.title, article.summary, - Messages.get(this, "download"),Messages.get(this, "stop_download")) { + Messages.get(this, "download"), + 0){ @Override - protected void onSelect(int index) { - if (index == 0) { - // 如果是桌面版就打开桌面版的下载链接,否则打开安卓版的下载链接 - if (DeviceCompat.isDesktop()) { - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES), - article.title, - article.summary, - "JAR版下载","NoJVM-版本下载") { - @Override - protected void onSelect(int index) { - if (index == 0) { - ShatteredPixelDungeon.platform.openURI(article.DesktopURL); - } else { - ShatteredPixelDungeon.platform.openURI("https://lingasdj.lanzouo.com/b05rqansf"); - } - Gdx.app.exit(); - } - - @Override - public void onBackPressed() { - // - } - }); - } else { - ShatteredPixelDungeon.platform.openURI(article.URL); - Gdx.app.exit(); - } - + public void hide() { + // 如果是桌面版就打开桌面版的下载链接,否则打开安卓版的下载链接 + if (DeviceCompat.isDesktop()) { + ShatteredPixelDungeon.platform.openURI(article.DesktopURL); } else { - ShatteredPixelDungeon.switchNoFade(TitleScene.class); + ShatteredPixelDungeon.platform.openURI(article.URL); } + Gdx.app.exit(); } @Override public void onBackPressed() { - // + ShatteredPixelDungeon.switchNoFade(TitleScene.class); } }); } else { // 向用户展示新版本可用的选项:强制下载或退出游戏 - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(article.ling < Game.versionCode ? - Icons.WARNING : Icons.CHANGES), + ShatteredPixelDungeon.scene().add(new WndHardNotification(Icons.get(Icons.CHANGES), article.title, article.summary, - Messages.get(this, "force_download")) { + Messages.get(this, "force_download"), + 0){ @Override - protected void onSelect(int index) { - if (index == 0) { + public void hide() { // 如果是桌面版就打开桌面版的下载链接,否则打开安卓版的下载链接 if (DeviceCompat.isDesktop()) { ShatteredPixelDungeon.platform.openURI(article.DesktopURL); @@ -326,7 +302,6 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继 ShatteredPixelDungeon.platform.openURI(article.URL); } Gdx.app.exit(); - } } @Override @@ -338,15 +313,14 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继 } else { // 显示天赋图标并提示用户已经更新完成 icon(UpdateNews.parseArticleIcon(article)); - ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.TALENT), - Messages.get(this, "update"), - Messages.get(this, "desc")+"\n\n"+article.summary, - Messages.get(this, "okay")) { + ShatteredPixelDungeon.scene().add(new WndHardNotification(Icons.get(Icons.CHANGES), + article.title, + article.summary, + Messages.get(this, "okay"), + 0){ @Override - protected void onSelect(int index) { - if (index == 0) { + public void hide() { ShatteredPixelDungeon.switchNoFade(TitleScene.class); - } } public void onBackPressed() { 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 8013b60f9..d683ae4f2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -711,12 +711,15 @@ public class GameScene extends PixelScene { case LARGE: GLog.w(Messages.get(this, "large")); break; case TRAPS: GLog.w(Messages.get(this, "traps")); break; case SECRETS: GLog.w(Messages.get(this, "secrets")); break; + case BIGTRAP: GLog.w(Messages.get(this, "moretraps")); break; + case THREEWELL: GLog.p(Messages.get(this, "threewells")); break; + case LINKROOM: GLog.w(Messages.get(this, "links")); break; + case DIEDROOM: GLog.n(Messages.get(this, "died")); break; } for (Mob mob : Dungeon.level.mobs) { if (!mob.buffs(ChampionEnemy.class).isEmpty() && Dungeon.isChallenged(SBSG)){ GLog.n(Messages.get(ChampionEnemy.class, "warn2")); - GLog.w(Messages.get(ChampionEnemy.class, "warn")); } else if(!mob.buffs(ChampionEnemy.class).isEmpty()) { GLog.w(Messages.get(ChampionEnemy.class, "warn")); } @@ -1525,6 +1528,16 @@ public class GameScene extends PixelScene { bossSlain.show( Window.CYELLOW, 0.3f, 5f); scene.showBanner(bossSlain); break; + case 10: + bossSlain.texture(Assets.Interfaces.Tengu_Title); + bossSlain.show( Window.R_COLOR, 0.3f, 4f); + scene.showBanner(bossSlain); + break; + case 14: + bossSlain.texture(Assets.Interfaces.DMOR_Title); + bossSlain.show( Window.CBLACK, 0.3f, 5f); + scene.showBanner(bossSlain); + break; case -31: bossSlain.texture(Assets.Interfaces.SakaBJY_Title); bossSlain.show( Window.CYELLOW, 0.3f, 5f); @@ -1562,6 +1575,16 @@ public class GameScene extends PixelScene { bossSlain.show( Window.CYELLOW, 0.3f, 5f); scene.showBanner(bossSlain); break; + case 10: + bossSlain.texture(Assets.Interfaces.Tengu_Clear); + bossSlain.show( Window.R_COLOR, 0.2f, 5f); + scene.showBanner(bossSlain); + break; + case 14: + bossSlain.texture(Assets.Interfaces.DMOR_Clear); + bossSlain.show( Window.GDX_COLOR, 0.3f, 5f); + scene.showBanner(bossSlain); + break; case -31: bossSlain.texture(Assets.Interfaces.SakaBJY_Clear); bossSlain.show( Window.CYELLOW, 0.3f, 5f); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java index 89356249f..3c3aff086 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/HeroSelectScene.java @@ -294,6 +294,11 @@ public class HeroSelectScene extends PixelScene { if( !visible && GamesInProgress.selectedClass != null){ visible = true; } + if (SPDSettings.challenges() > 0) { + icon(Icons.get( Icons.CHALLENGE_ON)); + } else { + icon(Icons.get( Icons.CHALLENGE_OFF)); + } super.update(); } 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 557072f48..af2bdfaf4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/InterlevelScene.java @@ -73,7 +73,7 @@ public class InterlevelScene extends PixelScene { public static int returnBranch; public enum Mode { - DESCEND, ASCEND, CONTINUE, RESURRECT, RETURN, FALL, RESET, NONE,EXBOSS,GOBACK,FRGIRLBOSS,ANCITYBOSS,DR, + DESCEND, ASCEND, CONTINUE, RESURRECT, RETURN, FALL, RESET, NONE,EXBOSS,GOBACK,FRGIRLBOSS,ANCITYBOSS,DR,GARDEN } public static Mode mode; @@ -178,6 +178,7 @@ public class InterlevelScene extends PixelScene { else if (loadingDepth <= 25) loadingAsset = Assets.Interfaces.LOADING_HALLS; else loadingAsset = Assets.Interfaces.SHADOW; + //场景过渡速度 //本地调试+桌面 if (DeviceCompat.isDebug() && DeviceCompat.isDesktop()){ fadeTime = 0.1f; @@ -288,6 +289,9 @@ public class InterlevelScene extends PixelScene { case ANCITYBOSS: exboss(4); break; + case GARDEN: + exboss(5); + break; } @@ -537,7 +541,6 @@ public class InterlevelScene extends PixelScene { private void reset() throws IOException { Mob.holdAllies( Dungeon.level ); - hero.HP += 20; SpecialRoom.resetPitRoom(Dungeon.depth+1); //Boss全局布尔控制 @@ -572,6 +575,9 @@ public class InterlevelScene extends PixelScene { case 4: level=Dungeon.AncityBossWaterLevel(); break; + case 5: + level=Dungeon.GardenLevel(); + break; default: level = Dungeon.newLevel(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/MobCatLogScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/MobCatLogScene.java new file mode 100644 index 000000000..983d3a2b3 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/MobCatLogScene.java @@ -0,0 +1,39 @@ +package com.shatteredpixel.shatteredpixeldungeon.scenes; + +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.Archs; +import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton; +import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.watabou.noosa.Camera; + +//怪物图鉴 尚未完成 +public class MobCatLogScene extends PixelScene { + + @Override + public void create() { + super.create(); + uiCamera.visible = false; + + int w = Camera.main.width; + int h = Camera.main.height; + + Archs archs = new Archs(); + archs.setSize(w,h); + addToBack(archs); + + ExitButton btnExit = new ExitButton(); + btnExit.setPos( w - btnExit.width(), 0 ); + add( btnExit ); + + RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 9); + title.hardlight(Window.TITLE_COLOR); + title.setPos( + (w - title.width()) / 2f, + (20 - title.height()) / 2f + ); + align(title); + add(title); + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewChangesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewChangesScene.java index d4e0c6411..2c945e191 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewChangesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewChangesScene.java @@ -5,15 +5,14 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.Archs; import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton; -import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane; import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton; import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeInfo; -import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeSelection; import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.S_Changes; import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd.vM0_5_X_Changes; +import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd.vM0_6_4_P_Changes; import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd.vM0_6_7_X_Changes; import com.watabou.noosa.Camera; import com.watabou.noosa.NinePatch; @@ -62,12 +61,15 @@ public class NewChangesScene extends PixelScene { switch (changesSelected){ case 0: default: - vM0_6_7_X_Changes.addAllChanges(changeInfos); + vM0_6_4_P_Changes.addAllChanges(changeInfos); break; case 1: - vM0_5_X_Changes.addAllChanges(changeInfos); + vM0_6_7_X_Changes.addAllChanges(changeInfos); break; case 2: + vM0_5_X_Changes.addAllChanges(changeInfos); + break; + case 3: S_Changes.addAllChanges(changeInfos); break; } @@ -114,21 +116,6 @@ public class NewChangesScene extends PixelScene { } } } - if (changesSelected == 0) { - posY = nextPosY; - ChangeSelection selection = new ChangeSelection(Messages.get(ChangesScene.class, "earlier"), Messages.get(ChangesScene.class, "shpd")) { - @Override - public void onClick() { - ChangesScene.changesSelected = 0; - ShatteredPixelDungeon.switchNoFade(ChangesScene.class); - } - }; - selection.icon(Icons.get(Icons.SHPX)); - selection.hardlight(Window.TITLE_COLOR); - selection.setRect(0, posY, panel.innerWidth(), 0); - content.add(selection); - posY = selection.bottom(); - } content.setSize( panel.innerWidth(), (int)Math.ceil(posY) ); @@ -139,7 +126,7 @@ public class NewChangesScene extends PixelScene { panel.innerHeight() + 2); list.scrollTo(0, fromChangesScene ? posY - list.height() : 0); - StyledButton btnBeta = new StyledButton(Chrome.Type.TOAST, "0.6.X"){ + StyledButton btnBeta2 = new StyledButton(Chrome.Type.TOAST, "0.6.4-5"){ @Override protected void onClick() { super.onClick(); @@ -150,11 +137,11 @@ public class NewChangesScene extends PixelScene { } }; - if (changesSelected != 0) btnBeta.textColor( 0xBBBBBB ); - btnBeta.setRect(list.left()-4f, list.bottom(), 46, changesSelected == 0 ? 19 : 15); - addToBack(btnBeta); + if (changesSelected != 0) btnBeta2.textColor( 0xBBBBBB ); + btnBeta2.setRect(list.left()-4f, list.bottom(), 32, changesSelected == 0 ? 19 : 15); + addToBack(btnBeta2); - StyledButton btn0_8 = new StyledButton(Chrome.Type.TOAST, "0.5.X"){ + StyledButton btnBeta = new StyledButton(Chrome.Type.TOAST, "0.6.0-3"){ @Override protected void onClick() { super.onClick(); @@ -164,11 +151,12 @@ public class NewChangesScene extends PixelScene { } } }; - if (changesSelected != 1) btn0_8.textColor( 0xBBBBBB ); - btn0_8.setRect(btnBeta.right()+1, list.bottom(), 47, changesSelected == 1 ? 19 : 15); - addToBack(btn0_8); - StyledButton btn0_7 = new StyledButton(Chrome.Type.TOAST, "0.0-0.4"){ + if (changesSelected != 1) btnBeta.textColor( 0xBBBBBB ); + btnBeta.setRect(btnBeta2.right()+1, list.bottom(), 32, changesSelected == 1 ? 19 : 15); + addToBack(btnBeta); + + StyledButton btn0_8 = new StyledButton(Chrome.Type.TOAST, "0.5.X"){ @Override protected void onClick() { super.onClick(); @@ -178,8 +166,22 @@ public class NewChangesScene extends PixelScene { } } }; - if (changesSelected != 2) btn0_7.textColor( 0xBBBBBB ); - btn0_7.setRect(btn0_8.right() + 1, btn0_8.top(), 46, changesSelected == 2 ? 19 : 15); + if (changesSelected != 2) btn0_8.textColor( 0xBBBBBB ); + btn0_8.setRect(btnBeta.right()+1, list.bottom(), 30, changesSelected == 2 ? 19 : 15); + addToBack(btn0_8); + + StyledButton btn0_7 = new StyledButton(Chrome.Type.TOAST, "0.0-0.4"){ + @Override + protected void onClick() { + super.onClick(); + if (changesSelected != 3) { + changesSelected = 3; + ShatteredPixelDungeon.seamlessResetScene(); + } + } + }; + if (changesSelected != 3) btn0_7.textColor( 0xBBBBBB ); + btn0_7.setRect(btn0_8.right() + 1, btn0_8.top(), 44, changesSelected == 3 ? 19 : 15); addToBack(btn0_7); Archs archs = new Archs(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java index f8bb0f30f..b57d0fd4c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/NewsScene.java @@ -145,11 +145,7 @@ public class NewsScene extends PixelScene { @Override protected void onClick() { super.onClick(); - String link = "https://ShatteredPixel.com"; - //tracking codes, so that the website knows where this pageview came from - link += "?utm_source=shatteredpd"; - link += "&utm_medium=news_page"; - link += "&utm_campaign=ingame_link"; + String link = "http://www.pd.qinyueqwq.top/"; ShatteredPixelDungeon.platform.openURI(link); } }; @@ -270,7 +266,7 @@ public class NewsScene extends PixelScene { icon(News.parseArticleIcon(article)); long lastRead = SPDSettings.newsLastRead(); if (lastRead > 0 && article.date.getTime() > lastRead) { - textColor(Window.SHPX_COLOR); + textColor(Window.Pink_COLOR); } Calendar cal = Calendar.getInstance(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java index c44228e89..9496280a2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java @@ -16,7 +16,6 @@ import com.shatteredpixel.shatteredpixeldungeon.windows.WndProBadge; import com.watabou.noosa.Camera; import com.watabou.noosa.Game; import com.watabou.noosa.Image; -import com.watabou.noosa.audio.Music; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Random; @@ -29,7 +28,9 @@ public class PassWordBadgesScene extends PixelScene { super.create(); - Music.INSTANCE.play( Assets.Music.THEME, true ); + Badges.HDEX(); + fadeIn(); + //Music.INSTANCE.play( Assets.Music.THEME, true ); uiCamera.visible = false; @@ -56,7 +57,7 @@ public class PassWordBadgesScene extends PixelScene { List badges = PaswordBadges.filtered( true ); - int blankBadges = 8; + int blankBadges = 13; blankBadges -= badges.size(); if (badges.contains(Badges.Badge.ALL_ITEMS_IDENTIFIED)) blankBadges -= 6; if (badges.contains(Badges.Badge.YASD)) blankBadges -= 5; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ThanksScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ThanksScene.java index 708202657..b87567b1e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ThanksScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/ThanksScene.java @@ -78,22 +78,40 @@ public class ThanksScene extends PixelScene { content.add(ptr); //*** Special Thanks *** - CreditsBlock specialThanks = new CreditsBlock(true, 0xffffff, - "Original Music By Prohonor", + CreditsBlock specialThanksX = new CreditsBlock(true, 0x808080, + "Original Music One By Prohonor", new Image("ptr.png", 0, 0, 32, 32), null, null, null); - specialThanks.setRect((Camera.main.width - colWidth)/2f-10, ptr.bottom()+6, colWidth+20, 0); - content.add(specialThanks); + specialThanksX.setRect((Camera.main.width - colWidth)/2f-10, ptr.bottom()+6, colWidth+20, 0); + content.add(specialThanksX); - CreditsBlock specialThanksB = new CreditsBlock(true, 0xbe8e6e, - "Part Music Used Terraria", - new Image("tra.png", 0, 0, 17, 28), + CreditsBlock specialThanks = new CreditsBlock(true, 0x00899C, + "Original Music Two By 犬羅", + new Image("dog.png", 0, 0, 22, 24), null, null, null); - specialThanksB.setRect((Camera.main.width - colWidth)/2f-10, specialThanks.bottom()+6, colWidth+20, 0); + specialThanks.setRect((Camera.main.width - colWidth)/2f-10, specialThanksX.bottom()+6, colWidth+20, 0); + content.add(specialThanks); + + CreditsBlock specialThanks2 = new CreditsBlock(true, 0xC62BFF, + "Map Made 迪泠", + new Image("DiLing.png", 0, 0, 32, 32), + null, + null, + null); + specialThanks2.setRect((Camera.main.width - colWidth)/2f-10, specialThanks.bottom()+6, colWidth+20, 0); + content.add(specialThanks2); + + CreditsBlock specialThanksB = new CreditsBlock(true, Window.TITLE_COLOR, + "Third Party Music Used:\n\nTerraria--Arknight--TitanSoul", + new Image("tra.png", 0, 0, 73, 28), + null, + null, + null); + specialThanksB.setRect((Camera.main.width - colWidth)/2f-10, specialThanks2.bottom()+6, colWidth+20, 0); content.add(specialThanksB); //*** Shattered Pixel Dungeon Credits *** diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java index 784bd82b1..95c55e287 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java @@ -1,10 +1,14 @@ package com.shatteredpixel.shatteredpixeldungeon.scenes; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Chrome; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; +import com.shatteredpixel.shatteredpixeldungeon.Statistics; +import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner; import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites; import com.shatteredpixel.shatteredpixeldungeon.effects.Fireball; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; @@ -28,24 +32,47 @@ import com.watabou.utils.ColorMath; import com.watabou.utils.DeviceCompat; import com.watabou.utils.GameMath; import com.watabou.utils.Point; +import com.watabou.utils.Random; +import java.util.Calendar; import java.util.Date; public class TitleScene extends PixelScene { + public static boolean Reusable = false; - + public static boolean NightDay = false; @Override public void create() { super.create(); - + Calendar calendar = Calendar.getInstance(); + int currentHour = calendar.get(Calendar.HOUR_OF_DAY); + Badges.loadGlobal(); + Dungeon.whiteDaymode = currentHour > 7 && currentHour < 22; // if(SPDSettings.startPort(false)){ // SPDSettings.scale(3); // ShatteredPixelDungeon.seamlessResetScene(); // SPDSettings.startPort(true); // } - Music.INSTANCE.play(Assets.Music.THEME_1, true); + Badges.loadGlobal(); + boolean whiteDaymode = currentHour > 7 && currentHour < 22; + if(Random.Int(10) == 1 && !NightDay && !whiteDaymode){ + NightDay = true; + } + + if(Random.Int(10) == 1 && !Reusable && Statistics.winGame && !NightDay) { + Reusable = true; + Music.INSTANCE.play(Assets.Music.THEME_2, true); + } else if (!Reusable && !NightDay) { + Music.INSTANCE.play(Assets.Music.THEME_1, true); + } else if(NightDay) { + Music.INSTANCE.play(Assets.NIGHT, true); + } else { + Music.INSTANCE.play(Assets.Music.THEME_1, true); + } + + uiCamera.visible = false; @@ -173,6 +200,23 @@ public class TitleScene extends PixelScene { ShatteredPixelDungeon.switchNoFade( StartScene.class ); } + @Override + public void update() { + super.update(); + + if(TitleScene.NightDay){ + textColor(ColorMath.interpolate( 0xFFFFFF, Window.CBLACK, + 0.1f + (float)Math.sin(Game.timeTotal*5)/2f)); + text(Messages.get(TitleScene.class, "dark")); + icon(BadgeBanner.image(Badges.Badge.STORM.image)); + } else if (TitleScene.Reusable){ + textColor(ColorMath.interpolate( 0xFFFFFF, Window.CYELLOW, + 0.5f + (float)Math.sin(Game.timeTotal*5)/2f)); + text(Messages.get(TitleScene.class, "go")); + icon(BadgeBanner.image(Badges.Badge.HAPPY_END.image)); + } + } + @Override protected boolean onLongClick() { //making it easier to start runs quickly while debugging @@ -204,7 +248,10 @@ public class TitleScene extends PixelScene { } @Override protected boolean onLongClick() { + Badges.silentValidateHDEX(); + ShatteredPixelDungeon.switchNoFade(PassWordBadgesScene.class); + return super.onLongClick(); } }; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index 515274d6e..17680b7bd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -70,7 +70,7 @@ public class WelcomeScene extends PixelScene { return; } - if (ShatteredPixelDungeon.versionCode == previousVersion && !SPDSettings.intro() && !SPDSettings.firebase()) { + if (!SPDSettings.intro() && !SPDSettings.firebase()) { ShatteredPixelDungeon.switchNoFade(GameNewsScene.class); } else { ShatteredPixelDungeon.switchNoFade(TitleScene.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ApprenticeWitchSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ApprenticeWitchSprite.java new file mode 100644 index 000000000..086685248 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ApprenticeWitchSprite.java @@ -0,0 +1,30 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.TextureFilm; + +public class ApprenticeWitchSprite extends MobSprite { + + public ApprenticeWitchSprite() { + super(); + + texture( Assets.Sprites.APWHEEL ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new Animation( 6, true ); + idle.frames( frames, 0, 1, 2, 3, 2 ,1 ); + + run = new Animation( 12, true ); + run.frames( frames, 14,15,16,17 ); + + attack = new Animation( 18, false ); + attack.frames( frames, 4,5,6,7,8,9,0 ); + + die = new Animation( 18, false ); + die.frames( frames, 10, 12, 13 ); + + play( idle ); + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BlueWraithSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BlueWraithSprite.java new file mode 100644 index 000000000..36bef50c1 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/BlueWraithSprite.java @@ -0,0 +1,34 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.TextureFilm; + +public class BlueWraithSprite extends MobSprite { + + public BlueWraithSprite() { + super(); + + texture( Assets.Sprites.REDWRAITH ); + + TextureFilm frames = new TextureFilm( texture, 14, 15 ); + + idle = new Animation( 5, true ); + idle.frames( frames, 0, 1 ); + + run = new Animation( 10, true ); + run.frames( frames, 0, 1 ); + + attack = new Animation( 10, false ); + attack.frames( frames, 0, 2, 3 ); + + die = new Animation( 8, false ); + die.frames( frames, 0, 4, 5, 6, 7 ); + + play( idle ); + } + + @Override + public int blood() { + return 0x88000000; + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CerberusSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CerberusSprite.java new file mode 100644 index 000000000..006cfd797 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CerberusSprite.java @@ -0,0 +1,43 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class CerberusSprite extends MobSprite { + + private Animation skills; + + public CerberusSprite() { + super(); + + texture( Assets.Sprites.CSBR ); + + TextureFilm frames = new TextureFilm( texture, 32, 32); + + idle = new MovieClip.Animation( 6, true ); + idle.frames( frames, 0, 1, 2, 3, 4 ,6, 7,8 ); + + run = new MovieClip.Animation( 6, true ); + run.frames( frames, 9,10,11,12,13,14,15,16,17 ); + + attack = new MovieClip.Animation( 6, false ); + attack.frames( frames, 18,19,20,21 ); + + skills = new MovieClip.Animation( 18, true ); + skills.frames( frames, 22, 23, 24, 25, 26 ); + + die = new MovieClip.Animation( 18, false ); + die.frames( frames, 27, 28, 29, 30, 31, 32, 33, 34, 35 ); + + play( idle ); + } + + //Skills Animation + public void Skills( int cell ){ + turnTo( ch.pos, cell ); + play( skills ); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index f7e377165..fec0f591c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -576,6 +576,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip hearts.on = false; hearts = null; } + break; } } @@ -694,6 +695,27 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip } } + public void showLove() { + synchronized (EmoIcon.class) { + if (!(emo instanceof EmoIcon.Love)) { + if (emo != null) { + emo.killAndErase(); + } + emo = new EmoIcon.Love(this); + emo.visible = visible; + } + } + } + + public void hideLove() { + synchronized (EmoIcon.class) { + if (emo instanceof EmoIcon.Love) { + emo.killAndErase(); + emo = null; + } + } + } + public void showLost() { synchronized (EmoIcon.class) { if (!(emo instanceof EmoIcon.Lost)) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300DeathBallSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300DeathBallSprite.java index 61267d212..aadb66c2e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300DeathBallSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300DeathBallSprite.java @@ -15,21 +15,13 @@ public class DM300DeathBallSprite extends MobSprite texture("mobs/dm300deathballmode.png"); TextureFilm texturefilm = new TextureFilm(texture, 21, 21); idle = new Animation(10, true); - idle.frames(texturefilm, new Object[] { - Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3), Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) - }); + idle.frames(texturefilm, 0, 1, 2, 3, 0, 1, 2, 3); run = new Animation(10, true); - run.frames(texturefilm, new Object[] { - Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(0), Integer.valueOf(1) - }); + run.frames(texturefilm, 0, 1, 0, 1, 0, 1, 0, 1); attack = new Animation(15, false); - attack.frames(texturefilm, new Object[] { - Integer.valueOf(0), Integer.valueOf(1), Integer.valueOf(2), Integer.valueOf(3) - }); + attack.frames(texturefilm, 0, 1, 2, 3); die = new Animation(20, false); - die.frames(texturefilm, new Object[] { - Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(4), Integer.valueOf(5), Integer.valueOf(4), Integer.valueOf(5) - }); + die.frames(texturefilm, 4, 5, 4, 5, 4, 5, 4, 5); play(idle); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300SpiderSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300SpiderSprite.java index 773d9d9a0..1894338a1 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300SpiderSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DM300SpiderSprite.java @@ -7,10 +7,13 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Spinner; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM200; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OldDM300; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.TextureFilm; import com.watabou.noosa.audio.Sample; import com.watabou.utils.Callback; @@ -66,16 +69,26 @@ public class DM300SpiderSprite extends MobSprite play( zap ); MagicMissile.boltFromChar( parent, - MagicMissile.MAGIC_MISSILE, + MagicMissile.CORROSION, this, cell, new Callback() { @Override public void call() { - ((Spinner)ch).shootWeb(); + Sample.INSTANCE.play( Assets.Sounds.GAS ); + ((DM200)ch).onZapComplete(); } } ); - Sample.INSTANCE.play( Assets.Sounds.MISS ); + Sample.INSTANCE.play( Assets.Sounds.MISS, 1f, 1.5f ); + GLog.w(Messages.get(OldDM300.class, "vent")); + } + + @Override + public void onComplete( Animation anim ) { + if (anim == zap) { + idle(); + } + super.onComplete( anim ); } public void attack(int var1) { 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 07483ab1f..8a1e1d494 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/DimandKingSprite.java @@ -157,7 +157,7 @@ public class DimandKingSprite extends MobSprite { } public void updateArmor( int tier ) { - TextureFilm film = new TextureFilm( HeroSprite.tiers(), 6, FRAME_WIDTH, FRAME_HEIGHT ); + TextureFilm film = new TextureFilm( HeroSprite.tiers(), 7, FRAME_WIDTH, FRAME_HEIGHT ); idle = new Animation( 1, true ); idle.frames( film, 0, 0, 0, 1, 0, 0, 1, 1 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FistSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FistSprite.java index 1a15d08a5..55fa7cd95 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FistSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FistSprite.java @@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.CorrosionParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.HalomethaneFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle; @@ -304,4 +305,54 @@ public abstract class FistSprite extends MobSprite { } + public static class Ice extends FistSprite { + + { + boltType = MagicMissile.FROST; + } + + @Override + protected int texOffset() { + return 60; + } + + @Override + protected Emitter createEmitter() { + Emitter emitter = emitter(); + emitter.pour(MagicMissile.MagicParticle.FACTORY, 0.06f ); + return emitter; + } + + @Override + public int blood() { + return 0xFF26CCC2; + } + + } + + public static class HaloFist extends FistSprite { + + { + boltType = MagicMissile.HALOFIRE; + } + + @Override + protected int texOffset() { + return 70; + } + + @Override + protected Emitter createEmitter() { + Emitter emitter = emitter(); + emitter.pour(HalomethaneFlameParticle.FACTORY, 0.06f ); + return emitter; + } + + @Override + public int blood() { + return 0xFF34C9C9; + } + + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FlowerSlimeSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FlowerSlimeSprites.java new file mode 100644 index 000000000..cc395ea25 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FlowerSlimeSprites.java @@ -0,0 +1,31 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class FlowerSlimeSprites extends MobSprite { + + public FlowerSlimeSprites() { + super(); + + texture( Assets.Sprites.FLOWER_SLIME ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new MovieClip.Animation( 2, true ); + idle.frames( frames, 0, 0, 0, 1 ); + + run = new MovieClip.Animation( 10, true ); + run.frames( frames, 2,3 ); + + attack = new MovieClip.Animation( 15, false ); + attack.frames( frames, 9, 10, 11, 5, 0 ); + + die = new MovieClip.Animation( 10, false ); + die.frames( frames, 4,5,6,7 ); + + play( idle ); + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FrankensteinSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FrankensteinSprite.java new file mode 100644 index 000000000..afa276e39 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/FrankensteinSprite.java @@ -0,0 +1,32 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class FrankensteinSprite extends MobSprite { + + public FrankensteinSprite() { + super(); + + texture( Assets.Sprites.ZOMBIE ); + + TextureFilm frames = new TextureFilm( texture, 16, 20 ); + + idle = new MovieClip.Animation( 2, true ); + idle.frames( frames, 0, 1 ); + + run = new MovieClip.Animation( 9, true ); + run.frames( frames, 2,3,4,5 ); + + attack = new MovieClip.Animation( 6, false ); + attack.frames( frames, 6,7,8,9,0 ); + + die = new MovieClip.Animation( 6, false ); + die.frames( frames, 10, 12, 13 ); + + play( idle ); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java index 41ba2e380..62539a0f9 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GhostSprite.java @@ -28,12 +28,12 @@ import com.watabou.glwrap.Blending; import com.watabou.noosa.TextureFilm; public class GhostSprite extends MobSprite { - + public GhostSprite() { super(); texture( Assets.Sprites.GHOST ); - + TextureFilm frames = new TextureFilm( texture, 14, 15 ); idle = new Animation( 5, true ); @@ -69,4 +69,48 @@ public class GhostSprite extends MobSprite { public int blood() { return 0xFFFFFF; } + + public static class PinkGhostSprites extends MobSprite { + + public PinkGhostSprites() { + super(); + + texture(Assets.Sprites.PINKGHOST); + + TextureFilm frames = new TextureFilm(texture, 14, 15); + + idle = new Animation(5, true); + idle.frames(frames, 0, 1); + + run = new Animation(10, true); + run.frames(frames, 0, 1); + + attack = new Animation(10, false); + attack.frames(frames, 0, 2, 3); + + die = new Animation(8, false); + die.frames(frames, 0, 4, 5, 6, 7); + + play(idle); + } + + @Override + public void draw() { + Blending.setLightMode(); + super.draw(); + Blending.setNormalMode(); + } + + @Override + public void die() { + super.die(); + emitter().start(ShaftParticle.FACTORY, 0.3f, 4); + emitter().start(Speck.factory(Speck.LIGHT), 0.2f, 3); + } + + @Override + public int blood() { + return 0xFFFFFF; + } + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GreenSltingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GreenSltingSprite.java new file mode 100644 index 000000000..f10b9ad9f --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/GreenSltingSprite.java @@ -0,0 +1,31 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class GreenSltingSprite extends MobSprite { + + public GreenSltingSprite() { + super(); + + texture( Assets.Sprites.GREEN ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new MovieClip.Animation( 24, true ); + idle.frames( frames, 0, 0, 0, 1 ); + + run = new MovieClip.Animation( 10, true ); + run.frames( frames, 0,0,1,1,2,2 ); + + attack = new MovieClip.Animation( 15, false ); + attack.frames( frames, 2,3 ); + + die = new MovieClip.Animation( 10, false ); + die.frames( frames, 2,3,4 ); + + play( idle ); + } + +} 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 ae379e0c1..d422c4788 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -87,10 +87,10 @@ public class ItemSpriteSheet { public static final int PETAL = UNCOLLECTIBLE+4; public static final int SANDBAG = UNCOLLECTIBLE+5; public static final int SPIRIT_ARROW = UNCOLLECTIBLE+6; - + public static final int GUIDE_PAGE = UNCOLLECTIBLE+8; public static final int ALCH_PAGE = UNCOLLECTIBLE+9; - + public static final int TENGU_BOMB = UNCOLLECTIBLE+11; public static final int TENGU_SHOCKER = UNCOLLECTIBLE+12; static{ @@ -101,10 +101,10 @@ public class ItemSpriteSheet { assignItemRect(PETAL, 8, 8); assignItemRect(SANDBAG, 10, 10); assignItemRect(SPIRIT_ARROW,11, 11); - + assignItemRect(GUIDE_PAGE, 10, 11); assignItemRect(ALCH_PAGE, 10, 11); - + assignItemRect(TENGU_BOMB, 10, 10); assignItemRect(TENGU_SHOCKER, 10, 10); } @@ -149,11 +149,11 @@ public class ItemSpriteSheet { static{ assignItemRect(ANKH, 10, 16); assignItemRect(STYLUS, 12, 13); - + assignItemRect(SEAL, 9, 15); assignItemRect(TORCH, 12, 15); assignItemRect(BEACON, 16, 15); - + assignItemRect(HONEYPOT, 14, 12); assignItemRect(SHATTPOT, 14, 12); assignItemRect(IRON_KEY, 8, 14); @@ -166,7 +166,7 @@ public class ItemSpriteSheet { assignItemRect(MASTERY, 13, 16); assignItemRect(KIT, 16, 15); } - + private static final int BOMBS = xy(1, 5); //16 slots public static final int BOMB = BOMBS+0; public static final int DBL_BOMB = BOMBS+1; @@ -181,7 +181,9 @@ public class ItemSpriteSheet { public static final int ARCANE_BOMB = BOMBS+10; public static final int SHRAPNEL_BOMB = BOMBS+11; public static final int BLACK_KEY = BOMBS+12; - + + public static final int CRYSTAL_LING = BOMBS+13; + static{ assignItemRect(BOMB, 10, 13); assignItemRect(DBL_BOMB, 14, 13); @@ -198,8 +200,8 @@ public class ItemSpriteSheet { assignItemRect(BLACK_KEY, 8, 14); } - - //16 free slots + + //16 free slots private static final int WEP_TIER1 = xy(1, 7); //8 slots public static final int WORN_SHORTSWORD = WEP_TIER1+0; @@ -279,50 +281,50 @@ public class ItemSpriteSheet { assignItemRect(GAUNTLETS, 13, 15); } - //8 free slots + //8 free slots private static final int MISSILE_WEP = xy(1, 10); //16 slots. 3 per tier + boomerang public static final int SPIRIT_BOW = MISSILE_WEP+0; - + public static final int DART = MISSILE_WEP+1; public static final int THROWING_KNIFE = MISSILE_WEP+2; public static final int THROWING_STONE = MISSILE_WEP+3; - + public static final int FISHING_SPEAR = MISSILE_WEP+4; public static final int SHURIKEN = MISSILE_WEP+5; public static final int THROWING_CLUB = MISSILE_WEP+6; - + public static final int THROWING_SPEAR = MISSILE_WEP+7; public static final int BOLAS = MISSILE_WEP+8; public static final int KUNAI = MISSILE_WEP+9; - + public static final int JAVELIN = MISSILE_WEP+10; public static final int TOMAHAWK = MISSILE_WEP+11; public static final int BOOMERANG = MISSILE_WEP+12; - + public static final int TRIDENT = MISSILE_WEP+13; public static final int THROWING_HAMMER = MISSILE_WEP+14; public static final int FORCE_CUBE = MISSILE_WEP+15; - + static{ assignItemRect(SPIRIT_BOW, 16, 16); - + assignItemRect(DART, 15, 15); assignItemRect(THROWING_KNIFE, 12, 13); assignItemRect(THROWING_STONE, 12, 10); - + assignItemRect(FISHING_SPEAR, 11, 11); assignItemRect(SHURIKEN, 12, 12); assignItemRect(THROWING_CLUB, 12, 12); - + assignItemRect(THROWING_SPEAR, 13, 13); assignItemRect(BOLAS, 15, 14); assignItemRect(KUNAI, 15, 15); - + assignItemRect(JAVELIN, 16, 16); assignItemRect(TOMAHAWK, 13, 13); assignItemRect(BOOMERANG, 14, 14); - + assignItemRect(TRIDENT, 16, 16); assignItemRect(THROWING_HAMMER, 12, 12); assignItemRect(FORCE_CUBE, 11, 12); @@ -348,7 +350,7 @@ public class ItemSpriteSheet { for (int i = TIPPED_DARTS; i < TIPPED_DARTS+16; i++) assignItemRect(i, 15, 15); } - + private static final int ARMOR = xy(1, 12); //16 slots public static final int ARMOR_CLOTH = ARMOR+0; public static final int ARMOR_LEATHER = ARMOR+1; @@ -377,7 +379,7 @@ public class ItemSpriteSheet { assignItemRect(ARMOR_ANCITY, 15,14); } - //16 free slots + //16 free slots private static final int WANDS = xy(1, 14); //16 slots public static final int WAND_MAGIC_MISSILE = WANDS+0; @@ -450,7 +452,9 @@ public class ItemSpriteSheet { public static final int MIME_THREE = ARTIFACTS+26; public static final int MIME_FOUR = ARTIFACTS+27; public static final int MIME_FIVE = ARTIFACTS+28; + public static final int WHITEROSE = ARTIFACTS+29; + public static final int REDWHITEROSE = ARTIFACTS+30; static{ assignItemRect(ARTIFACT_CLOAK, 9, 15); assignItemRect(ARTIFACT_ARMBAND, 16, 13); @@ -476,9 +480,10 @@ public class ItemSpriteSheet { assignItemRect(ARTIFACT_ROSE2, 14, 14); assignItemRect(ARTIFACT_ROSE3, 14, 14); assignItemRect(Gold_Iron, 16, 16); + assignItemRect(REDWHITEROSE, 15, 15); } - //16 free slots + //16 free slots private static final int SCROLLS = xy(1, 19); //16 slots public static final int SCROLL_KAUNAN = SCROLLS+0; @@ -493,7 +498,7 @@ public class ItemSpriteSheet { public static final int SCROLL_BERKANAN = SCROLLS+9; public static final int SCROLL_ODAL = SCROLLS+10; public static final int SCROLL_TIWAZ = SCROLLS+11; - + public static final int SCROLL_CATALYST = SCROLLS+13; public static final int ARCANE_RESIN = SCROLLS+14; static { @@ -580,17 +585,22 @@ public class ItemSpriteSheet { public static final int SEED_BLINDWEED = SEEDS+11; public static final int SEED_SKYBLUEFIRE = SEEDS+12; public static final int SEED_AIKELAIER = SEEDS+13; + + + public static final int GREEN_LING = SEEDS+15; static{ for (int i = SEEDS; i < SEEDS+16; i++) assignItemRect(i, 10, 10); + + assignItemRect(GREEN_LING, 8, 15); } - + private static final int BREWS = xy(1, 25); //8 slots public static final int BREW_INFERNAL = BREWS+0; public static final int BREW_BLIZZARD = BREWS+1; public static final int BREW_SHOCKING = BREWS+2; public static final int BREW_CAUSTIC = BREWS+3; - + private static final int ELIXIRS = xy(9, 25); //8 slots public static final int ELIXIR_HONEY = ELIXIRS+0; public static final int ELIXIR_AQUA = ELIXIRS+1; @@ -603,9 +613,9 @@ public class ItemSpriteSheet { for (int i = BREWS; i < BREWS+16; i++) assignItemRect(i, 12, 14); } - - //16 free slots - + + //16 free slots + private static final int SPELLS = xy(1, 27); //16 slots public static final int MAGIC_PORTER = SPELLS+0; public static final int PHASE_SHIFT = SPELLS+1; @@ -613,11 +623,11 @@ public class ItemSpriteSheet { public static final int WILD_ENERGY = SPELLS+3; public static final int RETURN_BEACON = SPELLS+4; public static final int SUMMON_ELE = SPELLS+5; - + public static final int AQUA_BLAST = SPELLS+7; public static final int FEATHER_FALL = SPELLS+8; public static final int RECLAIM_TRAP = SPELLS+9; - + public static final int CURSE_INFUSE = SPELLS+11; public static final int MAGIC_INFUSE = SPELLS+12; public static final int ALCHEMIZE = SPELLS+13; @@ -629,11 +639,11 @@ public class ItemSpriteSheet { assignItemRect(WILD_ENERGY, 8, 16); assignItemRect(RETURN_BEACON, 8, 16); assignItemRect(SUMMON_ELE, 8, 16); - + assignItemRect(AQUA_BLAST, 11, 11); assignItemRect(FEATHER_FALL, 11, 11); assignItemRect(RECLAIM_TRAP, 11, 11); - + assignItemRect(CURSE_INFUSE, 10, 15); assignItemRect(MAGIC_INFUSE, 10, 15); assignItemRect(ALCHEMIZE, 10, 15); @@ -735,8 +745,11 @@ public class ItemSpriteSheet { public static final int DIEDBOOK= LENGYWEAPONS+10; + public static final int FIVEREN= LENGYWEAPONS+11; + static { assignItemRect(DIEDCROSSBOW, 16, 15); + assignItemRect(FIVEREN, 16, 13); } private static final int BAGS = xy(1, 31); //16 slots @@ -825,8 +838,8 @@ public class ItemSpriteSheet { assignItemRect(HOLSTER, 15, 16); assignItemRect(DRAGONKINGHALOFIRE, 12, 14); assignItemRect(REDDRAGON, 14, 14); - assignItemRect(LANTERNA, 10, 14); - assignItemRect(LANTERNB, 10, 14); + assignItemRect(LANTERNA, 10, 16); + assignItemRect(LANTERNB, 10, 16); assignItemRect(SKPOTION, 8, 15); assignItemRect(SKNANO, 15, 14); assignItemRect(WATERSOUL, 14, 14); @@ -857,6 +870,11 @@ public class ItemSpriteSheet { public static final int FISHSKELETON= EXFOODINDEX+0; public static final int FISHBONE= EXFOODINDEX+1; + public static final int BLACKMOON= EXFOODINDEX+2; + static { + assignItemRect(BLACKMOON, 15, 12); + } + private static final int MAINPALYBOOKS = xy(1, 40); public static final int MONEYBOOKS= MAINPALYBOOKS+1; public static final int PINKBOOKS= MAINPALYBOOKS+2; @@ -885,6 +903,15 @@ public class ItemSpriteSheet { public static final int CHALLANEESICON_15= CHALLANEESICONINDEX+14; + public static final int CHALLANEESICON_16= CHALLANEESICONINDEX+15; + + + private static final int SCROLL_GOLD = xy(1, 46); //16 slots + public static final int SCROLL_MORETR = SCROLL_GOLD; + static { + assignItemRect(SCROLL_GOLD, 15, 14); + } + //for smaller 8x8 icons that often accompany an item sprite public static class Icons { @@ -931,7 +958,7 @@ public class ItemSpriteSheet { assignIconRect( RING_WEALTH, 7, 6 ); } - //16 free slots + //16 free slots private static final int SCROLLS = xy(1, 3); //16 slots public static final int SCROLL_UPGRADE = SCROLLS+0; @@ -1005,7 +1032,7 @@ public class ItemSpriteSheet { assignIconRect( SCROLL_METAMORPH, 8, 8 ); } - //16 free slots + //16 free slots private static final int POTIONS = xy(1, 6); //16 slots public static final int POTION_STRENGTH = POTIONS+0; @@ -1072,7 +1099,7 @@ public class ItemSpriteSheet { assignIconRect( POTION_SRTDIED, 6, 7 ); } - //16 free slots + //16 free slots } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MiMiCRYSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MiMiCRYSprites.java new file mode 100644 index 000000000..1b69b6d50 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MiMiCRYSprites.java @@ -0,0 +1,32 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class MiMiCRYSprites extends MimicSprite { + + public MiMiCRYSprites() { + super(); + + texture( Assets.Sprites.MIMICRY ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + idle = new MovieClip.Animation( 5, true ); + idle.frames( frames, 0, 1, 2 ); + + run = new MovieClip.Animation( 9, true ); + run.frames( frames, 2,3,4,5 ); + + attack = new MovieClip.Animation( 6, false ); + attack.frames( frames,4,5,6); + + die = new MovieClip.Animation( 6, false ); + die.frames( frames, 7,8,9,10,11,12 ); + + play( idle ); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java index bfa972848..6c78f1f4a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MimicSprite.java @@ -27,7 +27,7 @@ import com.watabou.noosa.TextureFilm; public class MimicSprite extends MobSprite { - private Animation hiding; + private static Animation hiding; { //adjust shadow slightly to account for 1 empty bottom pixel (used for border while hiding) @@ -102,6 +102,13 @@ public class MimicSprite extends MobSprite { } } + public static class Black extends MimicSprite{ + @Override + protected int texOffset() { + return 48; + } + } + public static class Dimand extends MimicSprite{ @Override protected int texOffset() { @@ -109,5 +116,48 @@ public class MimicSprite extends MobSprite { } } + public static class HollowWall extends MimicSprite{ + @Override + protected int texOffset() { + return 80; + } + + @Override + public void link(Char ch) { + super.link(ch); + ch.sprite.add(CharSprite.State.ILLUMINATED); + } + + public HollowWall() { + super(); + + int c = texOffset(); + + texture( Assets.Sprites.MIMIC ); + + TextureFilm frames = new TextureFilm( texture, 16, 16 ); + + hiding = new Animation( 1, true ); + hiding.frames( frames, 0+c, 1+c, 2+c, 3+c); + + idle = new Animation( 5, true ); + idle.frames( frames, 0+c,1+c,2+c,3+c ); + + run = new Animation( 10, true ); + run.frames( frames, 0+c,1+c,2+c,3+c ); + + attack = new Animation( 10, false ); + attack.frames( frames, 4+c, 5+c, 6+c ); + + die = new Animation( 5, false ); + die.frames( frames, 7+c,8+c, 9+c,10+c,11+c,12+c ); + + play( idle ); + } + + + + } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MorpheusSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MorpheusSprite.java new file mode 100644 index 000000000..f0968f2dd --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/MorpheusSprite.java @@ -0,0 +1,33 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.MovieClip; +import com.watabou.noosa.TextureFilm; + +public class MorpheusSprite extends MobSprite { + + public MorpheusSprite() { + super(); + + texture( Assets.Sprites.MPHON ); + + TextureFilm frames = new TextureFilm( texture, 32, 32 ); + + idle = new MovieClip.Animation( 6, true ); + idle.frames( frames, 0, 1, 2, 3 ); + + run = new MovieClip.Animation( 12, true ); + run.frames( frames, 14,15,16,17 ); + + attack = new MovieClip.Animation( 18, false ); + attack.frames( frames, 4,5,6,7,8,9,0 ); + + die = new MovieClip.Animation( 18, false ); + die.frames( frames, 10, 12, 13 ); + + play( idle ); + } + +} + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingMobSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingMobSprites.java new file mode 100644 index 000000000..b6ecc0e3c --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingMobSprites.java @@ -0,0 +1,71 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical.SlimeKingMob; +import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; +import com.watabou.noosa.TextureFilm; +import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Callback; +import com.watabou.utils.GameMath; + +public class SlimeKingMobSprites extends GolemSprite { + public SlimeKingMobSprites() { + this.texture("sprites/boss/SlimeKing.png"); + TextureFilm var1 = new TextureFilm(this.texture, 18, 18); + Integer var2 = 2; + Integer var3 = 1; + this.idle = new Animation(2, true); + Animation var4 = this.idle; + Integer var5 = 0; + var4.frames(var1, var5, var5, var5, var3, var5, var5, var3, var3); + this.run = new Animation(12, true); + this.run.frames(var1, var2, 1, 2, 3, var2); + this.attack = new Animation(12, false); + this.attack.frames(var1, 3, 4, 5); + this.die = new Animation(12, false); + this.die.frames(var1, 6, 7); + this.play(this.idle); + } + + private static final int[] tierFrames = {0, 21, 32, 43, 54, 65}; + + public void setArmor( int tier ){ + int c = tierFrames[(int) GameMath.gate(0, tier, 5)]; + + TextureFilm frames = new TextureFilm( texture, 12, 15 ); + + idle.frames( frames, c, c, c, c, c, 1+c, 1+c ); + run.frames( frames, 2+c, 3+c, 4+c, 5+c, 6+c, 7+c ); + attack.frames( frames, 8+c, 9+c, 10+c ); + //death animation is always armorless + + play( idle, true ); + + } + + public void zap( int cell ) { + + turnTo( ch.pos , cell ); + play( zap ); + + MagicMissile.boltFromChar( parent, + MagicMissile.FROST, + this, + cell, + new Callback() { + @Override + public void call() { + ((SlimeKingMob)ch).onZapComplete(); + } + } ); + Sample.INSTANCE.play( Assets.Sounds.ZAP ); + } + + @Override + public int blood() { + return 0xFFcdcdb7; + } +} + + + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java index 71573d58f..ab007c3d8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java @@ -6,7 +6,7 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites; import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ColdMagicRat; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.SlimeKing; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.watabou.noosa.TextureFilm; import com.watabou.noosa.audio.Sample; @@ -22,24 +22,24 @@ public class SlimeKingSprite extends GolemSprite { this.idle = new Animation(2, true); Animation var4 = this.idle; Integer var5 = 0; - var4.frames(var1, new Object[]{var5, var5, var5, var3, var5, var5, var3, var3}); + var4.frames(var1, var5, var5, var5, var3, var5, var5, var3, var3); this.run = new Animation(12, true); - this.run.frames(var1, new Object[]{var2, 1, 2, 3, var2}); + this.run.frames(var1, var2, 1, 2, 3, var2); this.attack = new Animation(12, false); - this.attack.frames(var1, new Object[]{3, 4, 5}); + this.attack.frames(var1, 3, 4, 5); this.die = new Animation(12, false); - this.die.frames(var1, new Object[]{6, 7,}); + this.die.frames(var1, 6, 7); this.play(this.idle); } - private static int[] tierFrames = {0, 21, 32, 43, 54, 65}; + private static final int[] tierFrames = {0, 21, 32, 43, 54, 65}; public void setArmor( int tier ){ int c = tierFrames[(int) GameMath.gate(0, tier, 5)]; TextureFilm frames = new TextureFilm( texture, 12, 15 ); - idle.frames( frames, 0+c, 0+c, 0+c, 0+c, 0+c, 1+c, 1+c ); + idle.frames( frames, c, c, c, c, c, 1+c, 1+c ); run.frames( frames, 2+c, 3+c, 4+c, 5+c, 6+c, 7+c ); attack.frames( frames, 8+c, 9+c, 10+c ); //death animation is always armorless @@ -60,7 +60,7 @@ public class SlimeKingSprite extends GolemSprite { new Callback() { @Override public void call() { - ((ColdMagicRat)ch).onZapComplete(); + ((SlimeKing)ch).onZapComplete(); } } ); Sample.INSTANCE.play( Assets.Sounds.ZAP ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TyphonSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TyphonSprite.java new file mode 100644 index 000000000..476f584e2 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/TyphonSprite.java @@ -0,0 +1,31 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.TextureFilm; + +public class TyphonSprite extends MobSprite { + + public TyphonSprite() { + super(); + + texture( Assets.Sprites.TYPHON ); + + TextureFilm frames = new TextureFilm( texture, 16, 21 ); + + idle = new Animation( 6, true ); + idle.frames( frames, 0, 1, 2, 3, 4 ); + + run = new Animation( 12, true ); + run.frames( frames, 14,15,16,17 ); + + attack = new Animation( 18, false ); + attack.frames( frames, 4,5,6,7,8,9,0 ); + + die = new Animation( 18, false ); + die.frames( frames, 10, 12, 13 ); + + play( idle ); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTerrainTilemap.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTerrainTilemap.java index a113dcd48..93e4fd405 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTerrainTilemap.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTerrainTilemap.java @@ -66,7 +66,7 @@ public class DungeonTerrainTilemap extends DungeonTilemap { pos + mapWidth < size ? map[pos + mapWidth] : -1, pos % mapWidth != 0 ? map[pos - 1] : -1 ); - } else if (tile == Terrain.SIGN) { + } else if (tile == Terrain.SIGN ||tile == Terrain.SIGN_SP) { return DungeonTileSheet.RAISED_SIGN; } else if (tile == Terrain.STATUE) { return DungeonTileSheet.RAISED_STATUE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java index 734a89872..951f2a4d7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/tiles/DungeonTileSheet.java @@ -82,7 +82,7 @@ public class DungeonTileSheet { Terrain.ENTRANCE, Terrain.EXIT, Terrain.EMBERS, Terrain.BARRICADE, Terrain.HIGH_GRASS, Terrain.FURROWED_GRASS, Terrain.SECRET_TRAP, Terrain.TRAP, Terrain.INACTIVE_TRAP, Terrain.EMPTY_DECO, - Terrain.SIGN, Terrain.WELL, Terrain.STATUE, Terrain.ALCHEMY, + Terrain.SIGN,Terrain.SIGN_SP, Terrain.WELL, Terrain.STATUE, Terrain.ALCHEMY, Terrain.DOOR, Terrain.OPEN_DOOR, Terrain.LOCKED_DOOR, Terrain.CRYSTAL_DOOR )); @@ -188,6 +188,8 @@ public class DungeonTileSheet { public static final int FLAT_HIGH_GRASS_ALT = FLAT_OTHER+8; public static final int FLAT_FURROWED_ALT = FLAT_OTHER+9; + public static final int FLAT_FURROWED_TREE = FLAT_OTHER+11; + /********************************************************************** * Raised Tiles, Lower Layer @@ -279,6 +281,8 @@ public class DungeonTileSheet { public static final int RAISED_HIGH_GRASS_ALT = RAISED_OTHER+9; public static final int RAISED_FURROWED_ALT = RAISED_OTHER+10; + public static final int RAISED_TREE = RAISED_OTHER+14; + /********************************************************************** @@ -381,14 +385,18 @@ public class DungeonTileSheet { directFlatVisuals.put(Terrain.CRYSTAL_DOOR, FLAT_DOOR_CRYSTAL); directFlatVisuals.put(Terrain.WALL_DECO, FLAT_WALL_DECO); directFlatVisuals.put(Terrain.BOOKSHELF, FLAT_BOOKSHELF); + directFlatVisuals.put(Terrain.SIGN, FLAT_SIGN); + directFlatVisuals.put(Terrain.SIGN_SP, FLAT_SIGN); + + directFlatVisuals.put(Terrain.STATUE, FLAT_STATUE); directFlatVisuals.put(Terrain.STATUE_SP, FLAT_STATUE_SP); directFlatVisuals.put(Terrain.ALCHEMY, FLAT_ALCHEMY_POT); directFlatVisuals.put(Terrain.BARRICADE, FLAT_BARRICADE); directFlatVisuals.put(Terrain.HIGH_GRASS, FLAT_HIGH_GRASS); directFlatVisuals.put(Terrain.FURROWED_GRASS, FLAT_FURROWED_GRASS); - + //directFlatVisuals.put(Terrain.TREE, FLAT_FURROWED_TREE); directFlatVisuals.put(Terrain.SECRET_DOOR, directFlatVisuals.get(Terrain.WALL)); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java index b19fb8df0..1f6ed9f4c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Archs.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.watabou.gltextures.TextureCache; import com.watabou.glwrap.Blending; import com.watabou.noosa.Game; @@ -64,7 +65,7 @@ public class Archs extends Component { arcsBg.offsetTo( 0, offsB ); add( arcsBg ); - arcsFg = new SkinnedBlock( 1, 1, Assets.Interfaces.ARCS_FG ){ + arcsFg = new SkinnedBlock( 1, 1, Dungeon.whiteDaymode ? Assets.Interfaces.ARCS_FG : Assets.Interfaces.ARCS_FGN ){ @Override protected NoosaScript script() { return NoosaScriptNoLighting.get(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java index d03ad7619..71df5c7ff 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/Icons.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.levels.Level; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -102,10 +103,21 @@ public enum Icons { DEPTH_LARGE, DEPTH_TRAPS, DEPTH_SECRETS, + + DEPTH_BTRAPS, + + DEPTH_WELLS, + + DEPTH_LINK_ROOM, + + DEPTH_DIED, + CHAL_COUNT, HAPPY_ICON, + LOVE, + //icons that appear in the about screen, variable spacing LIBGDX, ALEKS, @@ -125,7 +137,7 @@ public enum Icons { } public static Image get( Icons type ) { - Image icon = new Image( Assets.Interfaces.ICONS ); + Image icon = new Image(SPDSettings.ClassUI() ? Assets.Interfaces.ICONS : Assets.Interfaces.ICONS_NORMAL ); switch (type) { case ENTER: @@ -333,12 +345,27 @@ public enum Icons { case DEPTH_SECRETS: icon.frame( icon.texture.uvRectBySize( 104, 64, 7, 7 ) ); break; + case DEPTH_BTRAPS: + icon.frame( icon.texture.uvRectBySize( 112, 64, 7, 7 ) ); + break; + case DEPTH_WELLS: + icon.frame( icon.texture.uvRectBySize( 120, 64, 7, 7 ) ); + break; + case DEPTH_LINK_ROOM: + icon.frame( icon.texture.uvRectBySize( 128, 64, 7, 7 ) ); + break; + case DEPTH_DIED: + icon.frame( icon.texture.uvRectBySize( 136, 64, 7, 7 ) ); + break; case CHAL_COUNT: icon.frame( icon.texture.uvRectBySize( 48, 72, 7, 7 ) ); break; case HAPPY_ICON: icon.frame( icon.texture.uvRectBySize( 56, 72, 7, 5 ) ); break; + case LOVE: + icon.frame( icon.texture.uvRectBySize( 65, 72, 10, 6 ) ); + break; case LIBGDX: icon.frame( icon.texture.uvRectBySize( 0, 96, 16, 13 ) ); @@ -409,6 +436,14 @@ public enum Icons { return get(DEPTH_LARGE); case TRAPS: return get(DEPTH_TRAPS); + case BIGTRAP: + return get(DEPTH_BTRAPS); + case THREEWELL: + return get(DEPTH_WELLS); + case DIEDROOM: + return get(DEPTH_DIED); + case LINKROOM: + return get(DEPTH_LINK_ROOM); case SECRETS: return get(DEPTH_SECRETS); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java index a237e43ab..9ce2d3ec7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO; import static com.shatteredpixel.shatteredpixeldungeon.ui.Window.CYELLOW; import static com.shatteredpixel.shatteredpixeldungeon.ui.Window.GREEN_COLOR; import static com.shatteredpixel.shatteredpixeldungeon.ui.Window.RED_COLOR; @@ -102,6 +103,7 @@ public class MenuPane extends Component { case DARK: return Messages.get(GameScene.class, "dark"); case LARGE: return Messages.get(GameScene.class, "large"); case TRAPS: return Messages.get(GameScene.class, "traps"); + case BIGTRAP: return Messages.get(GameScene.class, "moretraps"); case SECRETS: return Messages.get(GameScene.class, "secrets"); } return null; @@ -175,7 +177,8 @@ public class MenuPane extends Component { btnMenu = new MenuButton(); add( btnMenu ); - version = new BitmapText( "v" + Game.version, PixelScene.pixelFont); + version = new BitmapText( "v" + Game.version + (Dungeon.isChallenged(PRO)?"-DEV_MODE":""), + PixelScene.pixelFont); version.alpha( 0.5f ); add(version); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java index 6bc82cd24..66a9f0b22 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java @@ -166,6 +166,16 @@ public class QuickSlotButton extends Button { return SPDAction.QUICKSLOT_3; case 3: return SPDAction.QUICKSLOT_4; + case 4: + return SPDAction.QUICKSLOT_5; + case 5: + return SPDAction.QUICKSLOT_6; + case 6: + return SPDAction.QUICKSLOT_7; + case 7: + return SPDAction.QUICKSLOT_8; + case 8: + return SPDAction.QUICKSLOT_9; default: return super.keyAction(); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java index 2ff9dcc0e..3b4f3a452 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/RenderedTextBlock.java @@ -126,7 +126,7 @@ public class RenderedTextBlock extends Component { /* { = 红色 } = 绿色 - Θ = 蓝色 + * = 蓝色 [ = 粉色 ] = 紫色 | = 黑色 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index 604d1fd06..a302bcdd8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -396,7 +396,7 @@ public class StatusPane extends Component { } int maxHunger = (int) Hunger.STARVING; - int maxPureSole = Dungeon.hero.lanterfire; + float maxPureSole = Dungeon.hero.lanterfire; int mtPureSole = 100; //冰血聪明 x diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ToobarV.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ToobarV.java index 046e70b71..cb07bcdfc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ToobarV.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/ToobarV.java @@ -417,11 +417,6 @@ public class ToobarV extends Component { super.onPointerDown(); } - @Override - public GameAction keyAction() { - return SPDAction.SLPD; - } - }; fill = new ColorBlock[9]; for (int i = 0; i < fill.length; i ++) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java index e62ce5190..1e7c2a69e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java @@ -335,7 +335,7 @@ public class S_Changes { "史莱姆守卫者 10层BOSS用!")); Image a = new SlimeKingSprite(); - a.scale.set(PixelScene.align(0.42f)); + a.scale.set(PixelScene.align(0.82f)); changes.addButton(new ChangeButton(a, "史莱姆王", "10层BOSS!")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_4_P_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_4_P_Changes.java new file mode 100644 index 000000000..622c121c3 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_4_P_Changes.java @@ -0,0 +1,651 @@ +package com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Badges; +import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkLingSprite; +import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner; +import com.shatteredpixel.shatteredpixeldungeon.effects.PasswordBadgeBanner; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.ChangesScene; +import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ApprenticeWitchSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CerberusSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300AttackSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FireDragonSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FlowerSlimeSprites; +import com.shatteredpixel.shatteredpixeldungeon.sprites.FrankensteinSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.IceSlowGirlSprites; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.sprites.MorpheusSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.RedNecromancerSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.SakaFishBossSprites; +import com.shatteredpixel.shatteredpixeldungeon.sprites.SalamanderSprites; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkeeperSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.SlimeKingSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.TyphonSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.Icons; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeButton; +import com.shatteredpixel.shatteredpixeldungeon.ui.changelist.ChangeInfo; +import com.watabou.noosa.Image; + +import java.util.ArrayList; + +public class vM0_6_4_P_Changes { + public static void addAllChanges(ArrayList changeInfos) { + add_v0_6_56_Changes(changeInfos); + add_v0_6_55_Changes(changeInfos); + add_v0_6_54_Changes(changeInfos); + } + public static void add_v0_6_56_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("Coming Soon V0.6.6.0", true, ""); + changes.hardlight(Window.CBLACK); + changeInfos.add(changes); + + changes = new ChangeInfo("计划", false, null); + changes.hardlight(Window.CBLACK); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new RedNecromancerSprite(), ("BossRush2.0"), + ("地牢发生了翻天覆地的改变,一切的矛头指向了死灵军团……"))); + + changes.addButton(new ChangeButton(new Image(Assets.Interfaces.HAICONS, 16, 16, 16, 16), ("黄金时代改动预告"), + ("黄金沉入黄沙,化为金水流入地下。\n" + + "黑暗的地牢就此发出了金色的光芒。\n" + + "树影融入黑夜,\n" + + "财富在此长眠,\n" + + "流沙,黄金与鲜血交织着,\n" + + "正如一首金色的华尔兹。\n" + + "冒险家,地牢与财富正在等着你。\n" + + "当然,你的舞伴可并不友好......\n" + + "黄金时代即将重做。\n" + + "策划by QinYue 不接入游戏主线剧情"))); + + Image i = new Image("sprites/boss/fireDragon.png", 0, 0, 24, 24); + i.scale.set(PixelScene.align(0.74f)); + changes.addButton(new ChangeButton(i, ("熔岩火龙"), + ("丛林暴乱的真相"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_14), ("寒冷系统V3.0"), + ("寒冷系统将会彻底实装,敬请期待冬季版本"))); + + changes = new ChangeInfo("改进", false, null); + changes.hardlight(Window.CBLACK); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new CrivusFruitsSprite(), ("克里弗斯之果重做"), + ("作为MLPD替代Goo的Boss,它还有很长的路要走。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHANGES), ("底层迭代"), + ("魔绫的底层版本现在是1.2.3,然而经过一年的维护,我们必须再一次进行底层同步。\n\n" + + "至于迭代哪个破碎,敬请期待冬季版本。"))); + + + Image s = new DM300AttackSprite(); + s.scale.set(PixelScene.align(0.74f)); + changes.addButton(new ChangeButton(s, ("DM-ZERO"), + ("时间在这里停止流动,与DMZERO正面对决的即将到来"))); + + Image c = new IceSlowGirlSprites(); + c.scale.set(PixelScene.align(0.74f)); + changes.addButton(new ChangeButton(c, ("冰雪魔女重做"), + ("石碑上记录了有关于她的一切,她的过去,她的现在,她的未来。而当你与她对峙时,你是否能够看清她的真实面目?"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha6-Patch7", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("预载", false, null); + changes.hardlight(Window.CBLACK); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new TyphonSprite(), ("万妖之祖"), + ("虽然这个世界不在我的管理范围之内,但古堡的一切都不应该存在于这里。\n\n该数据已预载,将在万圣节活动启用"))); + + Image mp = new MorpheusSprite(); + mp.scale.set(PixelScene.align(0.7f)); + changes.addButton(new ChangeButton(mp, ("影境之主"), + ("那么,盛大的剧目即将开演。\n\n该数据已预载,将在万圣节活动启用"))); + + Image cr = new CerberusSprite(); + cr.scale.set(PixelScene.align(0.7f)); + changes.addButton(new ChangeButton(cr, ("地狱噩梦"), + ("……\n\n该数据已预载,将在万圣节活动启用"))); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_13), ("绝命头目大整改"), + ( "1.古神二阶段将额外召唤两个拳头,分别是寒冰和鬼磷之拳。\n\n" + + "2.矮人国王在绝命头目中魔像替换为冰魔像,额外追加重甲豺狼。\n\n" + + "3.天狗在二阶段额外获得护盾且火焰墙替换为鬼磷墙,战斗也更加频繁致命。"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项改动"), + ("1.优化了油瓶可以被巨魔铁匠合成从而无限使用的问题\n" + + "2.开发者模式v0.8:修复了一些问题\n" + + "3.致谢名单优化,新增迪泠,Yinura-犬羅,秦月,设寄师,罐装狐腻(部分人没有给我图标,所以里面直接是文字)\n" + + "4.灯火已支持小数扣减。" ))); + + 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_06X89"))); + + + changes = new ChangeInfo("v0.6.5.0-Alpha6-Patch6", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("预载", false, null); + changes.hardlight(Window.CBLACK); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ApprenticeWitchSprite(), ("新中立怪物:见习魔女"), + ("魔法学院的劣等生,见习中的魔女。\n\n该数据已预载,将在万圣节活动启用。"))); + + changes.addButton(new ChangeButton(new FrankensteinSprite(), ("新怪物:未尽梦偶"), + ("它在寻找它的创造者,以及,撕碎所有拥有生命的气息。\n\n该数据已预载,将在万圣节活动启用。"))); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("灯火前路:v3.2"), + ("1.现在灯火在超过6挑后相当于一个强制挑战,\n\n" + + "2.你的灯火和提灯在开局就会有扣减,但并不会影响你在第一大层。\n\n" + + "3.修复了怪物不扣减灯火的严重问题,这是自灯火系统来一直尚未修复的问题"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.INFO), ("分数对照表"), + ("以下告诉你分数在何时会变蓝,在变蓝即为获得最高评价标准乃至以上:\n\n" + + "游戏得分:50000分以上\n\n" + + "寻宝得分:20000分以上\n\n" + + "探索得分:20000分以上\n\n" + + "Boss得分:18000分以上\n\n" + + "任务得分:14000分以上。\n\n" + + "SSS+评价:240000*挑战倍率*(通关 ? 1 : 5)\n\n" + + "如果通关是1倍,没通关是5倍--(也就是基本无法获得)。" ))); + + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG25), ("开发者模式v0.7"), + ("在开发模式中,支离破碎第1层是测试怪组。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.BloodDied), "嗜血荆棘", + "1.修复在特殊情况下献祭的问题,现在最多献祭到+10\n\n" + + "2.如果仍然在卡荆棘的问题,你将会在+14以上后(不包括+14)看见0伤害,且力量x5的下水道版本荆棘的处罚机制。")); + + + changes = new ChangeInfo("v0.6.5.0-Alpha6-Patch5", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("灯火前路:v3.1"), + ("现在灯火最大值为100%,且有益BuffRoll的时候最多同时存在一个。\n\n" + + "高挑可能会更加困难,但低挑来说正常。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG25), ("开发者模式v0.6"), + ("修复了一些Bug"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_16), ("变幻莫测v0.4"), + ("1.修复了部分情况下无法传送的问题\n\n" + + "2.修复灵视在特定MINIBOSS层无法使用的问题\n\n" + + "3.改动界面迭代优化"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"), + ("1.修复了部分文案问题\n\n" + + "2.修复了一些错误\n\n" + + "3.部分素材优化" ))); + + changes.addButton(new ChangeButton(new FlowerSlimeSprites(), ("丛林繁花史莱姆"), + ("掉落种子的概率从25%改为5%。"))); + + + changes = new ChangeInfo("v0.6.5.0-Alpha6-Patch4", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG25), ("开发者模式v0.5"), + ("新增武器生成秘卷,感谢潘多拉的代码制作和注解版的代码支持。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战:变幻莫测V0.3"), + ("修复了一堆问题,并改善了部分体验"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"), + ("1.修复了部分文案问题\n\n" + + "2.调整了一些底层代码" ))); + + changes = new ChangeInfo("v0.6.5.0-Alpha6.9-6.93-LAST", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton((new Image("Ling.png", 0, 0, 16, 16)), ("开发者的话"), + ("v0.6.5.0-Alpha6.9-LAST--完成于2023-10-6\n\n" + + "今天对我来说是一个特别的日子,因为今天是我21岁生日。\n\n" + + "回想MLPD的两年,我也从一名曾经的准大学生变成了即将毕业的大学生\n\n" + + "生活的忙碌,社会的考验,实习的困难比比皆是。但好在我有一批非常爱我和这个游戏的玩家\n\n" + + "Alpha6.9,是MLPD的近期的最终版本。接下来,她(代指魔绫)将进入休整期阶段,\n\n" + + "但游戏的内容足够玩家游玩,当然,如果有bug,我会来修复。\n\n" + + "最近只是没有大版本更新了。最后,近期是我的生日,我在游戏中为各位玩家准备了水晶项链。\n\n" + + "她应该可以帮助你们更好的游玩游戏,希望水晶项链能给你们带来不错的体验。\n\n" + + "最后,让我们在冬季版本大更新中相见,再会!!!\n\n" + + "---MLPD主要开发者:JDSALing" ))); + + changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY_LAND), ("农历计算系统"), + ("现在MLPD支持农历计算系统,中秋节,端午节,以及作者的生日,均使用此系统计算。\n" + + "Ling的生日:农历8.22\n\n有效时间范围:8.22-8.25\n\n" + + "中秋节:农历8.15\n\n有效时间范围:中秋节前10天到中秋节后12天\n\n" + + "端午节:农历5.5\n\n有效时间范围:端午节前3天到端午节后7天\n\n注意:如果与西方节日冲突,优先将用中国传统节日!"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.AUDIO), ("新主题BGM"), + ("在玩家在新版本胜利一次后,有机会在主界面播放新BGM和下半段暗示。"))); + + changes.addButton(new ChangeButton(new FlowerSlimeSprites(), ("新生物:丛林繁花史莱姆"), + ("替代普通老鼠,老鼠现在只会在丛林边缘(第一层生成),后面都是这个新生物。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.REDWHITEROSE), ("一种载体彻底实装"), + ("效果:力量+2,移速+10%,每5回合回复1HP"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CRYSTAL_LING), ("新开发者物品:水晶项链"), + ("在每年绫的生日有效活得时间直接在开局就能获得,自带韧性之戒效果,治疗效果小幅度提升。"))); + + changes.addButton(new ChangeButton(PasswordBadgeBanner.image(PaswordBadges.Badge.NIGHT_CAT.image), ( + "新隐藏徽章:不眠之夜"), + ("解密片段:月黑风高,古神陨落。"))); + + changes.addButton(new ChangeButton(BadgeBanner.image(Badges.Badge.HIDEEN_BADAGEX.image), ("新徽章:隐秘探索"), + ("获得方式:发现隐藏徽章的位置"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + Image xax = new SakaFishBossSprites(); + xax.scale.set(PixelScene.align(0.72f)); + changes.addButton(new ChangeButton(xax, "萨卡班甲鱼", + "现在免疫恐惧!")); + + changes.addButton(new ChangeButton(new CrivusFruitsSprite(), ("克里弗斯之果"), + ("现在净化药剂有特定版,且绝命头目地形改变。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("开发者模式V0.4"), + ("开发者模式进行一些小型优化,追加新怪物:丛林繁花史莱姆"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战:变幻莫测V0.2"), + ("修复了一堆问题:\n\n" + + "1.可能导致钥匙丢失\n\n2.重复Boss警报\n\n3.看见人不传送\n\n4.改善了Goo和DM300原型机的属性与地形。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项改动-1"), + ("1.优化了主题背景界面,并且植入夜间状态,在晚上22点到早上7点前是夜间状态。因此是夜间背景。反之则是白天背景。\n\n" + + "2.圣境密林层改善了几个地块,部分敌人素材迭代\n\n" + + "3.上个版本的一些FB-bug修复"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项改动-2"), + ("1.修复了提灯环境下火把能量无法被保存的相关问题\n" + + "2.修复了变幻莫测挑战相关问题\n" + + "3.修复了DM300原型机无限护盾问题\n" + + "4.修复了徽章界面可能闪退的问题\n" + + "5.修复了沉沦效果动画丢失问题\n" + + "6.优化了部分地块贴图\n" + + "7.修复了DM300 DM720进入即过关的问题\n" + + "8.修复了隐藏徽章-不眠之夜,无法被获得的问题\n" + + "9.新增夜晚文本提醒"))); + + + changes = new ChangeInfo("v0.6.5.0-Alpha6-6.8-国庆", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("新挑战:变幻莫测V0.1"), + ("追加两个随机地形感觉,整体战斗全面处于大地型,怪物生成变多,追加两个迷你Boss战。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改2"), + ("1.修复三井协定的三井重复生成问题\n" + + "2.改善变幻莫测迷你Boss地形以及战利品\n" + + "3.种子现在分为A类,B类,BossRush类\n" + + "4.部分界面UI迭代,变幻莫测挑战平衡\n" + + "5.修复鼠王可以改造特定护甲,例如板鳖甲"))); + + + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"), + ("1.迭代了UI材质\n\n2.优化了一些代码"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.DEPTH_WELLS), ("更多地形认知"), + ("在变幻莫测中加入了更多地形认知!"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("基因突变"), + ("现在蝇群和重甲豺狼无法获得基因突变效果"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("灯火平衡"), + ("灯火进行了一波平衡,使之游玩起来更好玩。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_9), ("梦魇领袖"), + ("梦魇领袖进行了一些调整,并改名为绝命头目"))); + + 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_06X88"))); + + 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_06X87"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha5.2-国庆", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + 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_06X86"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha5-中秋", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new GhostSprite.PinkGhostSprites(), ("新限时任务:映月离合之殇"), + ("在中秋和国庆节这个期间一起探索悲伤幽灵它们的故事……"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.INFO), ("修复"), + ("修复上个版本的一些错误"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha4.5", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton( new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSWORD, + new ItemSprite.Glowing( 0xcc7770 )), "新附魔:爆破", + "这个附魔会让使用者陷入癫狂,能使爆炸的能量从武器中喷薄而出,能够使敌人目标处受到一次范围伤害亦或者给造成敌人短暂的残废效果。(PS:爆炸效果不会摧毁物品)\n")); + + changes.addButton(new ChangeButton(PasswordBadgeBanner.image(PaswordBadges.Badge.ZQJ_GHOST.image), ("两个隐藏徽章资源预载"), + ("两个隐藏徽章资源预载,将在后续版本更新。"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + Image isa = new SlimeKingSprite(); + isa.scale.set(PixelScene.align(0.89f)); + changes.addButton( new ChangeButton(isa, "史莱姆王子", + "修复错误的继承类导致的Cast Exception错误")); + + changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("界面修复"), + ("修复部分界面在新版的异常布局"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("药水癔症v0.2"), + ("现在全肉大饼在英雄低于12力量前必定加力量,且整体加力量的幸运度提升。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("其他改动"), + ("1.鬼磷和爆破现在是稀有附魔\n\n" + + "2.修复了吸血鬼刀的异常吸血-贡献者:\nzxcPandora\n\n"+ + "3.修复了药水癔症描述问题,纯洁的祝福-守护护盾描述异常,以及开发者升降器追加探查功能-\n贡献者:zxcPandora"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha4", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("电子斗蛐蛐v0.2"), + ("开发者模式怪物放置器拥有更多功能,欢迎尝试!另追加黏咕,史莱姆王,豺狼炼药长老,豺狼萨满长老,Flame-C01"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("信息栏滚动"), + ("在游戏缩放较大或者拥有较多词条时,该项会很有用。"))); + + changes.addButton(new ChangeButton(BadgeBanner.image(Badges.Badge.BOMBBOW_DIED.image), ("新徽章:碎片飞溅"), + ("又是一个死亡徽章,新人:悲鸣 因为意味着另类死亡爱好者多了一个新徽章(未解锁该徽章的就更麻烦了)"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new SalamanderSprites(), ("深蓝蝾螈"), + ("修复被深蓝蝾螈击败不会记录在排行榜的问题。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("重型弩炮"), + ("修复使用还会扣减飞镖的问题。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WAND_KCX), ("共生法杖"), + ("修复共生法杖可能能被永续的问题。"))); + + 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_06X85"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha3", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("开发者模式更新"), + ("添加了更多开发者选项,优化了一些问题,怪物放置器支持电子斗蛐蛐"))); + + Image dragonSprite = new FireDragonSprite(); + dragonSprite.scale.set(PixelScene.align(0.72f)); + changes.addButton(new ChangeButton(dragonSprite, ("熔岩火龙资源预载"), + ("丛林额外Boss-熔岩火龙资源预载,预计将在Alpha7加入。"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("重型弩炮"), + ("现在不需要飞镖作为弹药,但有装填时间。"))); + + Image xa = new SakaFishBossSprites(); + xa.scale.set(PixelScene.align(0.72f)); + changes.addButton(new ChangeButton(xa, "萨卡班甲鱼", + "初始防御调为35,常规伤害降低。")); + + 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_06X84"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha1-2", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("传奇武器"), + ("新类别传奇武器测试已经开始。在后续版本中需要通过货币解锁。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("加密徽章"), + ("添加了加密徽章,长按徽章按钮进入。记录一些隐藏成就。\n\n_注意:_这些成就不会在获取之前不会显示出来"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项改动"), + ("1.添加了暂停更新界面的功能\n\n" + + "2.少量bug修复"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + Image a = new SakaFishBossSprites(); + a.scale.set(PixelScene.align(0.72f)); + changes.addButton(new ChangeButton(a, "萨卡班甲鱼", + "数值方面进行了一定平衡。")); + + 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_06X83"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项调整"), + ("1.书籍现在不可堆积,且成就有一些变化\n\n" + + "2.其它bug修复"))); + } + + public static void add_v0_6_55_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("v0.6.4.0-BetaI-XIII", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton((new Image("Ling.png", 0, 0, 16, 16)), ("开发者的话"), + ("你好,我应该有很久没有写开发者的话了。近期,真的很忙。\n" + + "我只有晚上更新一会魔绫,但总会熬夜到很晚。\n" + + "再这样下去,不清楚还能如此坚持多久。\n" + + "我想,我需要休息一下。\n" + + "并且降低更新频率,我想现在魔绫的更新速度已经太快了\n"+ + "所以后面的更新,可能会慢一点。\n"+ + "还是希望各位能玩的愉快吧,毕竟,人总是不能在虚拟世界里生活的。\n" + + "现实仍然有很多东西,我是时候调节一下了。\n"+ + "那么还是祝各位游戏中冒险愉快吧!"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("快捷栏V1/V2"), + ("快捷栏降至9个,并且V1是魔绫原版快捷栏,V2是碳素那边借鉴优化的快捷栏。任君挑选。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ALCH_PAGE), ("炼金界面优化"), + ("炼金指南进行优化。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.TORCH), ("火把调整"), + ("现在火把会在灯火中成为燃料。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ARMOR_ANCITY), ("板鳖甲"), + ("来自远古的护甲,你是想现在使用,亦或者是收入囊中等待合适的时机?"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.RING_DIAMOND), ("财富之戒"), + ("财富戒指同步为破碎。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.FIREFISHSWORD), ("尚方宝剑"), + ("尚方宝剑属性重新优化,并且拥有两个形态的弱切换。具体怎么切换,看你们自己探索了"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("深度调查"), + ("娱乐模式改名为深度调查,并且追加黄金时代新娱乐模式。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SCROLL_LAGUZ), ("升级卷轴"), + ("现在追加一个使用全部升级卷轴的按钮"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("游戏内区域文本"), + ("现在每个大区有区域文本,给各位更加身临其境的感觉。"))); + + Image a = new SakaFishBossSprites(); + a.scale.set(PixelScene.align(0.72f)); + changes.addButton(new ChangeButton(a, "新Boss:萨卡班甲鱼", + "远古遗迹的领袖级Boss,欢迎前来挑战。")); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta13"), + ("修复了一些吸血权重问题。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WRALIPS), ("暗金宝石护符"), + ("现在最高上限+10,并调整优化了一些问题"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SCROLL_ODAL), ("升级卷轴"), + ("现在修复升级卷轴可能丢失的问题,并且采用平衡算法。例如,你在1区摸到了4个升级,在监狱只有两个。总量不变。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WAND_KCX), ("再生法杖"), + ("修复一些问题,并且可以持续使用。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_15), ("挑战加成"), + ("在高挑中,提灯的容量更多,商店售卖更多灯油,但灯火的每次减少可能会加剧!"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("支离破碎"), + ("支离破碎进行了一些怪组优化,并且调整了巨魔铁匠任务(如果在支离破碎遇到巨魔的蝙蝠任务确实有突变buff)"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"), + ("添加Boss专武保底机制,连续三局未获得,下次必定获得"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSHIELD), ("5阶武器"), + ("现在5阶武器生成平均化"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta12"), + ("优化数值,调整吸血权重。"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG3), ("归溯钥剑"), + ("现在只能在怪物那里获得极少经验,更多经验应该通过装备此武器后拾取钥匙吸收能量。"))); + + 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_06X82"))); + + } + + public static void add_v0_6_54_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("v0.6.4.0-Beta1", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton( new ChangeButton(new Image(Assets.Environment.TILES_SEWERS, 48, 48, 16 + , 16), "房间改动", + "全新房间:慧眼墓碑房/太极八卦房加入")); + + changes.addButton(new ChangeButton(new ShopkeeperSprite(), ("回购系统"), + ("商店追加回购系统,除了商人领主和奈亚子均可原价退回商品"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new PinkLingSprite(), ("杂项改动"), + ("优化地牢部分数据,并且为即将更新的每日狩猎等设好底层。"))); + + 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_06X81"))); + + } +} 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 252b90a2e..378356945 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 @@ -13,18 +13,15 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ClearElementalSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdGuardSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdRatSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300AttackSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300SpiderSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300Sprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DM720Sprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DiedMonkLoaderSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.DimandKingSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.FireCrystalSprites; -import com.shatteredpixel.shatteredpixeldungeon.sprites.FireDragonSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.FlameBoiSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.IceFireScorpioSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.IceSlowGirlSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.IceStalSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; @@ -37,13 +34,10 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.MurdererSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.NxhySprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.NyzSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.OGPDNQHZTT; -import com.shatteredpixel.shatteredpixeldungeon.sprites.RedNecromancerSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.RedSwarmSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.SRPDHBLRTT; -import com.shatteredpixel.shatteredpixeldungeon.sprites.SakaFishBossSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.SalamanderSprites; import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkKingSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkeeperSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.SlimeKingSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.SnakeSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.WFSprite; @@ -60,9 +54,9 @@ import java.util.ArrayList; public class vM0_6_7_X_Changes { public static void addAllChanges(ArrayList changeInfos) { - add_v0_6_56_Changes(changeInfos); - add_v0_6_55_Changes(changeInfos); - add_v0_6_54_Changes(changeInfos); +// add_v0_6_56_Changes(changeInfos); +// add_v0_6_55_Changes(changeInfos); +// add_v0_6_54_Changes(changeInfos); add_v0_6_53_Changes(changeInfos); add_v0_6_52_Changes(changeInfos); add_v0_6_51_Changes(changeInfos); @@ -119,247 +113,6 @@ public class vM0_6_7_X_Changes { add_v0_6_0_Changes(changeInfos); } - public static void add_v0_6_56_Changes( ArrayList changeInfos ) { - ChangeInfo changes = new ChangeInfo("Coming Soon V0.6.5.0-Alpha7", true, ""); - changes.hardlight(Window.CBLACK); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new RedNecromancerSprite(), ("BossRush2.0"), - ("地牢发生了翻天覆地的改变,一切的矛头指向了死灵军团……"))); - - Image s = new DM300AttackSprite(); - s.scale.set(PixelScene.align(0.74f)); - changes.addButton(new ChangeButton(s, ("DM-ZERO"), - ("时间在这里停止流动,与DMZERO正面对决的即将到来"))); - - Image c = new IceSlowGirlSprites(); - c.scale.set(PixelScene.align(0.74f)); - changes.addButton(new ChangeButton(c, ("冰雪魔女重做"), - ("石碑上记录了有关于她的一切,她的过去,她的现在,她的未来。而当你与她对峙时,你是否能够看清她的真实面目?"))); - - Image i = new Image("sprites/boss/fireDragon.png", 0, 0, 24, 24); - i.scale.set(PixelScene.align(0.74f)); - changes.addButton(new ChangeButton(i, ("熔岩火龙"), - ("丛林暴乱的真相"))); - - changes = new ChangeInfo("v0.6.5.0-Alpha4", true, ""); - changes.hardlight(Window.TITLE_COLOR); - changeInfos.add(changes); - - changes = new ChangeInfo("新内容", false, null); - changes.hardlight(Window.GREEN_COLOR); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("电子斗蛐蛐v0.2"), - ("开发者模式怪物放置器拥有更多功能,欢迎尝试!另追加黏咕,史莱姆王,豺狼炼药长老,豺狼萨满长老,Flame-C01"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("信息栏滚动"), - ("在游戏缩放较大或者拥有较多词条时,该项会很有用。"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("新徽章:碎片飞溅"), - ("又是一个死亡徽章,新人:悲鸣 因为意味着另类死亡爱好者多了一个新徽章(未解锁该徽章的就更麻烦了)"))); - - changes = new ChangeInfo("改动", false, null); - changes.hardlight(Window.CYELLOW); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new SalamanderSprites(), ("深蓝蝾螈"), - ("修复被深蓝蝾螈击败不会记录在排行榜的问题。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("重型弩炮"), - ("修复使用还会扣减飞镖的问题。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WAND_KCX), ("共生法杖"), - ("修复共生法杖可能能被永续的问题。"))); - - 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_06X85"))); - - changes = new ChangeInfo("v0.6.5.0-Alpha3", true, ""); - changes.hardlight(Window.TITLE_COLOR); - changeInfos.add(changes); - - changes = new ChangeInfo("新内容", false, null); - changes.hardlight(Window.GREEN_COLOR); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("开发者模式更新"), - ("添加了更多开发者选项,优化了一些问题,怪物放置器支持电子斗蛐蛐"))); - - Image dragonSprite = new FireDragonSprite(); - dragonSprite.scale.set(PixelScene.align(0.72f)); - changes.addButton(new ChangeButton(dragonSprite, ("熔岩火龙资源预载"), - ("丛林额外Boss-熔岩火龙资源预载,预计将在Alpha7加入。"))); - - changes = new ChangeInfo("改动", false, null); - changes.hardlight(Window.CYELLOW); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("重型弩炮"), - ("现在不需要飞镖作为弹药,但有装填时间。"))); - - Image xa = new SakaFishBossSprites(); - xa.scale.set(PixelScene.align(0.72f)); - changes.addButton(new ChangeButton(xa, "萨卡班甲鱼", - "初始防御调为35,常规伤害降低。")); - - 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_06X84"))); - - changes = new ChangeInfo("v0.6.5.0-Alpha1-2", true, ""); - changes.hardlight(Window.TITLE_COLOR); - changeInfos.add(changes); - - changes = new ChangeInfo("新内容", false, null); - changes.hardlight(Window.GREEN_COLOR); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIEDCROSSBOW), ("传奇武器"), - ("新类别传奇武器测试已经开始。在后续版本中需要通过货币解锁。"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("加密徽章"), - ("添加了加密徽章,长按徽章按钮进入。记录一些隐藏成就。\n\n_注意:_这些成就不会在获取之前不会显示出来"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项改动"), - ("1.添加了暂停更新界面的功能\n\n" + - "2.少量bug修复"))); - - changes = new ChangeInfo("改动", false, null); - changes.hardlight(Window.CYELLOW); - changeInfos.add(changes); - - Image a = new SakaFishBossSprites(); - a.scale.set(PixelScene.align(0.72f)); - changes.addButton(new ChangeButton(a, "萨卡班甲鱼", - "数值方面进行了一定平衡。")); - - 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_06X83"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项调整"), - ("1.书籍现在不可堆积,且成就有一些变化\n\n" + - "2.其它bug修复"))); - } - - public static void add_v0_6_55_Changes( ArrayList changeInfos ) { - ChangeInfo changes = new ChangeInfo("v0.6.4.0-BetaI-XIII", true, ""); - changes.hardlight(Window.TITLE_COLOR); - changeInfos.add(changes); - - changes = new ChangeInfo("新内容", false, null); - changes.hardlight(Window.GREEN_COLOR); - changeInfos.add(changes); - - changes.addButton(new ChangeButton((new Image("Ling.png", 0, 0, 16, 16)), ("开发者的话"), - ("你好,我应该有很久没有写开发者的话了。近期,真的很忙。\n" + - "我只有晚上更新一会魔绫,但总会熬夜到很晚。\n" + - "再这样下去,不清楚还能如此坚持多久。\n" + - "我想,我需要休息一下。\n" + - "并且降低更新频率,我想现在魔绫的更新速度已经太快了\n"+ - "所以后面的更新,可能会慢一点。\n"+ - "还是希望各位能玩的愉快吧,毕竟,人总是不能在虚拟世界里生活的。\n" + - "现实仍然有很多东西,我是时候调节一下了。\n"+ - "那么还是祝各位游戏中冒险愉快吧!"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("快捷栏V1/V2"), - ("快捷栏降至9个,并且V1是魔绫原版快捷栏,V2是碳素那边借鉴优化的快捷栏。任君挑选。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ALCH_PAGE), ("炼金界面优化"), - ("炼金指南进行优化。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.TORCH), ("火把调整"), - ("现在火把会在灯火中成为燃料。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ARMOR_ANCITY), ("板鳖甲"), - ("来自远古的护甲,你是想现在使用,亦或者是收入囊中等待合适的时机?"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.RING_DIAMOND), ("财富之戒"), - ("财富戒指同步为破碎。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.FIREFISHSWORD), ("尚方宝剑"), - ("尚方宝剑属性重新优化,并且拥有两个形态的弱切换。具体怎么切换,看你们自己探索了"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), ("深度调查"), - ("娱乐模式改名为深度调查,并且追加黄金时代新娱乐模式。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SCROLL_LAGUZ), ("升级卷轴"), - ("现在追加一个使用全部升级卷轴的按钮"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("游戏内区域文本"), - ("现在每个大区有区域文本,给各位更加身临其境的感觉。"))); - - Image a = new SakaFishBossSprites(); - a.scale.set(PixelScene.align(0.72f)); - changes.addButton(new ChangeButton(a, "新Boss:萨卡班甲鱼", - "远古遗迹的领袖级Boss,欢迎前来挑战。")); - - changes = new ChangeInfo("改动", false, null); - changes.hardlight(Window.CYELLOW); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta13"), - ("修复了一些吸血权重问题。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WRALIPS), ("暗金宝石护符"), - ("现在最高上限+10,并调整优化了一些问题"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SCROLL_ODAL), ("升级卷轴"), - ("现在修复升级卷轴可能丢失的问题,并且采用平衡算法。例如,你在1区摸到了4个升级,在监狱只有两个。总量不变。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WAND_KCX), ("再生法杖"), - ("修复一些问题,并且可以持续使用。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_15), ("挑战加成"), - ("在高挑中,提灯的容量更多,商店售卖更多灯油,但灯火的每次减少可能会加剧!"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("支离破碎"), - ("支离破碎进行了一些怪组优化,并且调整了巨魔铁匠任务"))); - - changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"), - ("添加Boss专武保底机制,连续三局未获得,下次必定获得"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSHIELD), ("5阶武器"), - ("现在5阶武器生成平均化"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta12"), - ("优化数值,调整吸血权重。"))); - - changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG3), ("归溯钥剑"), - ("现在只能在怪物那里获得极少经验,更多经验应该通过装备此武器后拾取钥匙吸收能量。"))); - - 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_06X82"))); - - } - - public static void add_v0_6_54_Changes( ArrayList changeInfos ) { - ChangeInfo changes = new ChangeInfo("v0.6.4.0-Beta1", true, ""); - changes.hardlight(Window.TITLE_COLOR); - changeInfos.add(changes); - - changes = new ChangeInfo("新内容", false, null); - changes.hardlight(Window.GREEN_COLOR); - changeInfos.add(changes); - - changes.addButton( new ChangeButton(new Image(Assets.Environment.TILES_SEWERS, 48, 48, 16 - , 16), "房间改动", - "全新房间:慧眼墓碑房/太极八卦房加入")); - - changes.addButton(new ChangeButton(new ShopkeeperSprite(), ("回购系统"), - ("商店追加回购系统,除了商人领主和奈亚子均可原价退回商品"))); - - changes = new ChangeInfo("改动", false, null); - changes.hardlight(Window.CYELLOW); - changeInfos.add(changes); - - changes.addButton(new ChangeButton(new PinkLingSprite(), ("杂项改动"), - ("优化地牢部分数据,并且为即将更新的每日狩猎等设好底层。"))); - - 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_06X81"))); - - } - public static void add_v0_6_53_Changes( ArrayList changeInfos ) { ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta5-5.1", true, ""); changes.hardlight(Window.TITLE_COLOR); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/WndTextNumberInput.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/WndTextNumberInput.java new file mode 100644 index 000000000..8bd339ed4 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/utils/WndTextNumberInput.java @@ -0,0 +1,190 @@ +package com.shatteredpixel.shatteredpixeldungeon.utils; + +import com.badlogic.gdx.Gdx; +import com.shatteredpixel.shatteredpixeldungeon.Chrome; +import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; +import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton; +import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; +import com.watabou.noosa.TextInput; +import com.watabou.utils.DeviceCompat; + +public class WndTextNumberInput extends Window { + + private static final int WIDTH = 130; + private static final int W_LAND_EXTRA = 200; //extra width is sometimes used in landscape + private static final int MARGIN = 2; + private static final int BUTTON_HEIGHT = 16; + + protected TextInput textBox; + + protected RedButton btnNumber; + + public WndTextNumberInput(final String title, final String body, final String initialValue, final int maxLength, + final boolean multiLine, final String posTxt, final String negTxt) { + super(); + + //need to offset to give space for the soft keyboard + if (!DeviceCompat.isDesktop()) { + if (PixelScene.landscape()) { + offset(0, -45); + } else { + offset(0, multiLine ? -60 : -45); + } + } + + final int width; + if (PixelScene.landscape() && (multiLine || body != null)) { + width = W_LAND_EXTRA; //more space for landscape users + } else { + width = WIDTH; + } + + float pos = 2; + + if (title != null) { + final RenderedTextBlock txtTitle = PixelScene.renderTextBlock(title, 9); + txtTitle.maxWidth(width); + txtTitle.hardlight(Window.TITLE_COLOR); + txtTitle.setPos((width - txtTitle.width()) / 2, 2); + add(txtTitle); + + pos = txtTitle.bottom() + 2 * MARGIN; + } + + if (body != null) { + final RenderedTextBlock txtBody = PixelScene.renderTextBlock(body, 6); + txtBody.maxWidth(width); + txtBody.setPos(0, pos); + add(txtBody); + + pos = txtBody.bottom() + 2 * MARGIN; + } + + int textSize = (int)PixelScene.uiCamera.zoom * (multiLine ? 6 : 9); + textBox = new TextInput(Chrome.get(Chrome.Type.TOAST_WHITE), multiLine, textSize){ + @Override + public void enterPressed() { + //triggers positive action on enter pressed, only with non-multiline though. + onSelect(true, getText()); + hide(); + } + }; + if (initialValue != null) textBox.setText(initialValue); + textBox.setMaxLength(maxLength); + + //sets different height depending on whether this is a single or multi line input. + final float inputHeight; + if (multiLine) { + inputHeight = 64; //~8 lines of text + } else { + inputHeight = 16; + } + add(textBox); + textBox.setRect(MARGIN, pos, width-2*MARGIN, inputHeight); + + pos += inputHeight + MARGIN; + + // 创建确认按钮 + final RedButton positiveBtn = new RedButton(posTxt) { + @Override + protected void onClick() { + onSelect(true, textBox.getText()); + hide(); + } + }; + + // 计算数字按钮区域的高度 + float numberAreaHeight = BUTTON_HEIGHT * 4 + MARGIN * 3; + + // 计算每行按钮的宽度 + float btnWidth = (width - MARGIN * 9) / 2.79f; + + // 创建数字按钮 + for (int i = 1; i <= 9; i++) { + final int number = i; + btnNumber = new RedButton(String.valueOf(number)) { + @Override + protected void onClick() { + textBox.setText(textBox.getText() + number); + } + }; + + int row = (i - 1) / 3; // 计算按钮所在的行数 + + btnNumber.setRect((MARGIN + btnWidth * ((i - 1) % 3)), pos + row * (BUTTON_HEIGHT + MARGIN), + btnWidth, BUTTON_HEIGHT); + + add(btnNumber); + } + + // 创建最后一行的0按钮 + btnNumber = new RedButton("0") { + @Override + protected void onClick() { + textBox.setText(textBox.getText() + "0"); + } + }; + btnNumber.setRect(MARGIN, pos + 3 * (BUTTON_HEIGHT + MARGIN), + btnWidth*3, BUTTON_HEIGHT); + add(btnNumber); + + // 更新pos变量,确保按钮区域在确认按钮上方 + pos += numberAreaHeight + MARGIN; + +// // 设置确认按钮的位置 +// positiveBtn.setRect(MARGIN, pos, width - MARGIN * 2, BUTTON_HEIGHT); +// add(positiveBtn); + + + final RedButton negativeBtn; + // 如果有取消按钮,创建取消按钮并设置位置 + if (negTxt != null) { + negativeBtn = new RedButton(negTxt) { + @Override + protected void onClick() { + onSelect(false, textBox.getText()); + hide(); + } + }; + negativeBtn.setRect(positiveBtn.right() + MARGIN, pos, (width - MARGIN * 3) / 2f, BUTTON_HEIGHT); + add(negativeBtn); + } else { + negativeBtn = null; + } + + if (negTxt != null) { + positiveBtn.setRect(MARGIN, pos, (width - MARGIN * 3) / 2, BUTTON_HEIGHT); + add(positiveBtn); + negativeBtn.setRect(positiveBtn.right() + MARGIN, pos, (width - MARGIN * 3) / 2, BUTTON_HEIGHT); + add(negativeBtn); + } else { + positiveBtn.setRect(MARGIN, pos, width - MARGIN * 2, BUTTON_HEIGHT); + add(positiveBtn); + } + + pos += BUTTON_HEIGHT + MARGIN; + + //need to resize first before laying out the text box, as it depends on the window's camera + resize(width, (int) pos); + + textBox.setRect(MARGIN, textBox.top(), width-2*MARGIN, inputHeight); + + } + + @Override + public void offset(int xOffset, int yOffset) { + super.offset(xOffset, yOffset); + if (textBox != null){ + textBox.setRect(textBox.left(), textBox.top(), textBox.width(), textBox.height()); + Gdx.input.setOnscreenKeyboardVisible(false); + } + } + + public void onSelect(boolean positive, String text){ } + + @Override + public void onBackPressed() { + //Do nothing, prevents accidentally losing writing + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/LevelChecker.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/LevelChecker.java index 1d70c4000..6c6fe89df 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/LevelChecker.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/LevelChecker.java @@ -4,7 +4,7 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics; public class LevelChecker { - public static final int SSSP_SCORE = 250000; + public static final int SSSP_SCORE = 240000; public static final int SSS_SCORE = 200000; public static final int SS_SCORE = 100000; private static final int S_SCORE = 50000; @@ -20,7 +20,7 @@ public class LevelChecker { boolean amuletObtained = Statistics.amuletObtained; String level; - if (totalScore >= SSSP_SCORE * chalMultiplier * (amuletObtained ? 1.5 : 5)) { + if (totalScore >= SSSP_SCORE * chalMultiplier * (amuletObtained ? 1 : 5)) { level = "_SSS+_"; } else if (totalScore >= SSS_SCORE * chalMultiplier/2 * (amuletObtained ? 1 : 4)) { level = "SSS"; 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 f6ec2e610..1dca7e7f3 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndChallenges.java @@ -252,11 +252,20 @@ public class WndChallenges extends Window { info = new IconButton(Icons.get(Icons.INFO)){ @Override protected void onClick() { - ShatteredPixelDungeon.scene().add( - new WndTitledMessage(new Image(ChallengeInfo.this.icon), - Messages.titleCase(Messages.get(Challenges.class, challenge)), - Messages.get(Challenges.class, challenge+"_desc")) - ); + if(challenge.equals("stronger_bosses")){ + ShatteredPixelDungeon.scene().add(new WndHardNotification( new ItemSprite(ItemSpriteSheet.CHALLANEESICON_13, new ItemSprite.Glowing(0xff0000)), + Messages.get(WndChallenges.class, "boss_title"), + Messages.get(WndChallenges.class, "boss_desc"), + Messages.get(WndChallenges.class, "ok"), + 0){ + }); + } else { + ShatteredPixelDungeon.scene().add( + new WndTitledMessage(new Image(ChallengeInfo.this.icon), + Messages.titleCase(Messages.get(Challenges.class, challenge)), + Messages.get(Challenges.class, challenge+"_desc")) + ); + } } }; add( info ); @@ -330,6 +339,8 @@ public class WndChallenges extends Window { return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_14, new ItemSprite.Glowing(0x009999)); case "dhxd": return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_15, new ItemSprite.Glowing(0x384976)); + case "morelevel": + return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_16, new ItemSprite.Glowing(0x98bc76)); case "cs": return Icons.get(Icons.WARNING); default: diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java index e1c29dffa..3b8cbb2db 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java @@ -21,10 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; -import static com.shatteredpixel.shatteredpixeldungeon.Challenges.NO_ARMOR; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO; -import static com.shatteredpixel.shatteredpixeldungeon.Challenges.RLPT; -import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.HelpSettings; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive; @@ -223,7 +221,7 @@ public class WndHero extends WndTabbed { if(lanterfireactive){ - RestatSlot( Messages.get(this, "lanterfire"), (hero.lanterfire) + "/" + 100 ); + RestatSlot( Messages.get(this, "lanterfire"), (double)(hero.lanterfire) + "/" + 100 ); } IcestatSlot( Messages.get(this, "icehp"), (hero.icehp) + "/" + 100 ); @@ -292,10 +290,8 @@ public class WndHero extends WndTabbed { String seed; if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { seed = "BossRush"; - }else if(Dungeon.isChallenged(NO_ARMOR)){ + }else if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ seed = "B"; - } else if (Dungeon.isChallenged(RLPT)&&Dungeon.isChallenged(SBSG)) { - seed = "C"; } else { seed = "A"; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java index 70b363064..f2e9a3646 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java @@ -25,33 +25,35 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; -import com.watabou.noosa.Image; import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.function.Function; public class WndInfoArmorAbility extends WndTitledMessage { - public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability){ + public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability, Function> initializeArmorTalents){ super( new HeroIcon(ability), Messages.titleCase(ability.name()), ability.desc()); - ArrayList> talentList = new ArrayList<>(); - Talent.initArmorTalents(ability, talentList); - + @SuppressWarnings("NewApi") + LinkedHashMap talents = initializeArmorTalents.apply(ability); + if(talents.isEmpty()) return; Ratmogrify.useRatroicEnergy = ability instanceof Ratmogrify; - TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(3), 4, TalentButton.Mode.INFO); - talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); - talentPane.setRect(0, height + 5, width, talentPane.height()); - add(talentPane); - resize(width, (int) talentPane.bottom()); + TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talents, 4, TalentButton.Mode.INFO); + talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); + addToBottom(talentPane, 5, 0); + } + public WndInfoArmorAbility(HeroClass cls,ArmorAbility ability) { + this(cls,ability, WndInfoArmorAbility::initializeTalents); } -} + public static LinkedHashMap initializeTalents(ArmorAbility ability) { + ArrayList> talentList = Talent.initArmorTalents(ability); + return talentList.size() < 4 ? new LinkedHashMap<>() : talentList.get(3); + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java index 3098b7e02..a692a6b5b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java @@ -39,7 +39,7 @@ import com.watabou.noosa.Image; import com.watabou.noosa.ui.Component; public class WndInfoMob extends WndTitledMessage { - + public static boolean reload = false; public WndInfoMob( Mob mob ) { super( new MobTitle( mob ), mob.info() ); @@ -81,6 +81,8 @@ public class WndInfoMob extends WndTitledMessage { String level; if(mob.speed() == 1){ level = "C"; + } else if (mob.speed() >= 2.5) { + level = "S+"; } else if (mob.speed() >= 2) { level = "S"; } else if (mob.speed() >= 1.5) { @@ -149,21 +151,25 @@ public class WndInfoMob extends WndTitledMessage { private String ProName(Mob mob) { String level; if (mob.properties.contains(Char.Property.BOSS)){ - level = "领袖"; + level = Messages.get(WndInfoMob.class,"boss"); } else if (mob.properties.contains(Char.Property.MINIBOSS)){ - level = "精英"; + level = Messages.get(WndInfoMob.class,"miniboss"); + } else if (mob.properties.contains(Char.Property.HOLLOW)){ + level = Messages.get(WndInfoMob.class,"hollow"); + } else if (mob.properties.contains(Char.Property.HUNTER)){ + level = Messages.get(WndInfoMob.class,"hunter"); } else if (mob.properties.contains(Char.Property.ABYSS)){ - level = "深渊"; + level = Messages.get(WndInfoMob.class,"abyss"); } else if (mob.properties.contains(Char.Property.UNDEAD)){ - level = "亡灵"; + level = Messages.get(WndInfoMob.class,"undied"); } else if (mob.properties.contains(Char.Property.DEMONIC)){ - level = "恶魔"; + level = Messages.get(WndInfoMob.class,"demon"); } else if (mob.properties.contains(Char.Property.NPC)){ - level = "中立"; + level = "NPC"; } else if (mob.properties.contains(Char.Property.FIERY) || mob.properties.contains(Char.Property.ICY) || mob.properties.contains(Char.Property.ELECTRIC)){ - level = "元素"; + level = Messages.get(WndInfoMob.class,"ling"); } else { - level = "普通"; + level = Messages.get(WndInfoMob.class,"normal"); } return level; } @@ -172,13 +178,15 @@ public class WndInfoMob extends WndTitledMessage { String level; if(Dungeon.hero.lvl <= mob.maxLvl || mob.properties.contains(Char.Property.BOSS) || mob.properties.contains(Char.Property.MINIBOSS)){ - level = "可掉落"; + level = Messages.get(WndInfoMob.class,"canroll"); } else { - level = "不掉落"; + level = Messages.get(WndInfoMob.class,"noroll"); } return level; } + + public MobTitle( Mob mob ) { name = PixelScene.renderTextBlock( Messages.titleCase( mob.name() ), 9 ); @@ -221,6 +229,12 @@ public class WndInfoMob extends WndTitledMessage { add(mobSixInfo.info6); add(mobSixInfo.info7); add(mobSixInfo.info8); + + if ((mob.alignment == Char.Alignment.NEUTRAL) && mob.properties.contains(Char.Property.HOLLOW)) { + reload = true; + } else { + reload = false; + } } @Override @@ -242,12 +256,36 @@ public class WndInfoMob extends WndTitledMessage { name.bottom() - BuffIndicator.SIZE_SMALL-2 ); - height = health.bottom(); - mobSixInfo.setPos(-5,Math.max(health.bottom(),image.height()+5)); - mobSixInfo.layout(); - height = mobSixInfo.bottom(); + if(reload){ + height = health.bottom(); + mobSixInfo.info1.visible = false; mobSixInfo.info2.visible = false; + mobSixInfo.info3.visible = false; mobSixInfo.info4.visible = false; + mobSixInfo.info5.visible = false; mobSixInfo.info6.visible = false; + mobSixInfo.info7.visible = false; mobSixInfo.info8.visible = false; + mobSixInfo.image1.visible = false; mobSixInfo.image2.visible = false; + mobSixInfo.image3.visible = false; mobSixInfo.image4.visible = false; + mobSixInfo.image5.visible = false; mobSixInfo.image6.visible = false; + mobSixInfo.image7.visible = false; mobSixInfo.image8.visible = false; + health.visible = false; + } else { + mobSixInfo.setPos(-5,Math.max(health.bottom(),image.height()+5)); + mobSixInfo.layout(); + height = mobSixInfo.bottom(); + mobSixInfo.info1.visible = true; mobSixInfo.info2.visible = true; + mobSixInfo.info3.visible = true; mobSixInfo.info4.visible = true; + mobSixInfo.info5.visible = true; mobSixInfo.info6.visible = true; + mobSixInfo.info7.visible = true; mobSixInfo.info8.visible = true; + mobSixInfo.image1.visible = true; mobSixInfo.image2.visible = true; + mobSixInfo.image3.visible = true; mobSixInfo.image4.visible = true; + mobSixInfo.image5.visible = true; mobSixInfo.image6.visible = true; + mobSixInfo.image7.visible = true; mobSixInfo.image8.visible = true; + health.visible = true; + } + + + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java index ce30275cd..7774f8b1c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java @@ -21,15 +21,14 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import static com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton.Mode.INFO; + import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -import com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndHeroInfo; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndTitledMessage; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -37,18 +36,16 @@ import java.util.LinkedHashMap; public class WndInfoSubclass extends WndTitledMessage { public WndInfoSubclass(HeroClass cls, HeroSubClass subCls){ - super( new HeroIcon(subCls), Messages.titleCase(subCls.title()), subCls.desc()); + super( new HeroIcon(subCls), Messages.titleCase(subCls.title()), subCls.desc(), WIDTH_MIN); ArrayList> talentList = new ArrayList<>(); Talent.initClassTalents(cls, talentList); Talent.initSubclassTalents(subCls, talentList); - TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(2), 3, TalentButton.Mode.INFO); + TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(2), 3, INFO); talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); - talentPane.setRect(0, height + 5, width, talentPane.height()); - add(talentPane); - resize(width, (int) talentPane.bottom()); + addToBottom(talentPane, 5, 0); } -} +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java index e077fecdf..16457e428 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java @@ -21,8 +21,11 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; +import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.QuickSlot; import com.shatteredpixel.shatteredpixeldungeon.Rankings; @@ -37,6 +40,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.HeroSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.text.HeroStat; import com.shatteredpixel.shatteredpixeldungeon.ui.BadgesGrid; import com.shatteredpixel.shatteredpixeldungeon.ui.BadgesList; import com.shatteredpixel.shatteredpixeldungeon.ui.Button; @@ -166,6 +170,18 @@ public class WndRanking extends WndTabbed { } } + private String seedType(){ + String seed; + if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { + seed = "BossRush"; + }else if(Dungeon.isChallenged(MOREROOM) && !(Dungeon.isDLC(Conducts.Conduct.BOSSRUSH))){ + seed = "B"; + } else { + seed = "A"; + } + return seed; + } + private class StatsTab extends Group { private int GAP = 4; @@ -302,7 +318,7 @@ public class WndRanking extends WndTabbed { } pos += GAP; - + pos = statSlot(this, Messages.get(HeroStat.class, "seed_type"), seedType(), pos); pos = statSlot(this, Messages.get(this, "enemies"), num.format(Statistics.enemiesSlain), pos); pos = statSlot(this, Messages.get(this, "gold"), num.format(Statistics.goldCollected), pos); pos = statSlot(this, Messages.get(this, "food"), num.format(Statistics.foodEaten), pos); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java index 374b740ef..736fa633d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSadGhost.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import static com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost.Quest.food; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Chrome; @@ -29,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost; import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -46,7 +49,7 @@ import com.watabou.noosa.ui.Component; public class WndSadGhost extends Window { - private static final int WIDTH = 120; + private static final int WIDTH = RegularLevel.holiday == RegularLevel.Holiday.ZQJ ? 150 : 120; private static final int BTN_SIZE = 32; private static final int BTN_GAP = 5; private static final int GAP = 2; @@ -54,7 +57,7 @@ public class WndSadGhost extends Window { Ghost ghost; public WndSadGhost( final Ghost ghost, final int type ) { - + super(); this.ghost = ghost; @@ -65,19 +68,21 @@ public class WndSadGhost extends Window { case 1:default: titlebar.icon( new FetidRatSprite() ); titlebar.label( Messages.get(this, "rat_title") ); - message = PixelScene.renderTextBlock( Messages.get(this, "rat")+"\n\n"+Messages.get(this, "give_item"), 6 ); + message = PixelScene.renderTextBlock( Messages.get(this, "rat")+"\n\n"+(RegularLevel.holiday == RegularLevel.Holiday.ZQJ ? Messages.get(this, "ask") :Messages.get(this, + "give_item")),6 ); break; case 2: titlebar.icon( new GnollTricksterSprite() ); titlebar.label( Messages.get(this, "gnoll_title") ); - message = PixelScene.renderTextBlock( Messages.get(this, "gnoll")+"\n\n"+Messages.get(this, "give_item"), 6 ); + message = PixelScene.renderTextBlock( Messages.get(this, "gnoll")+"\n\n"+(RegularLevel.holiday == RegularLevel.Holiday.ZQJ ? Messages.get(this, "ask") :Messages.get(this, + "give_item")),6 ); break; case 3: titlebar.icon( new GreatCrabSprite()); titlebar.label( Messages.get(this, "crab_title") ); - message = PixelScene.renderTextBlock( Messages.get(this, "crab")+"\n\n"+Messages.get(this, "give_item"), 6 ); + message = PixelScene.renderTextBlock( Messages.get(this, "crab")+"\n\n"+(RegularLevel.holiday == RegularLevel.Holiday.ZQJ ? Messages.get(this, "ask") :Messages.get(this, + "give_item")),6 ); break; - } titlebar.setRect( 0, 0, WIDTH, 0 ); @@ -87,15 +92,32 @@ public class WndSadGhost extends Window { message.setPos(0, titlebar.bottom() + GAP); add( message ); - RewardButton btnWeapon = new RewardButton( Ghost.Quest.weapon ); - btnWeapon.setRect( (WIDTH - BTN_GAP) / 2 - BTN_SIZE, message.top() + message.height() + BTN_GAP, BTN_SIZE, BTN_SIZE ); - add( btnWeapon ); + /** 中秋节布局变成三栏*/ + RewardButton btnWeapon = new RewardButton(Ghost.Quest.weapon); + if(RegularLevel.holiday == RegularLevel.Holiday.ZQJ){ + btnWeapon.setRect((WIDTH - BTN_GAP) / 3f - BTN_SIZE, message.top() + message.height() + BTN_GAP, BTN_SIZE, BTN_SIZE); + add(btnWeapon); - RewardButton btnArmor = new RewardButton( Ghost.Quest.armor ); - btnArmor.setRect( btnWeapon.right() + BTN_GAP, btnWeapon.top(), BTN_SIZE, BTN_SIZE ); - add(btnArmor); + RewardButtonDouble btnFood = new RewardButtonDouble(food); + btnFood.setRect((WIDTH - BTN_GAP) / 3f * 1.5f - BTN_SIZE/2f, message.top() + message.height() + BTN_GAP, + BTN_SIZE, BTN_SIZE); + add(btnFood); - resize(WIDTH, (int) btnArmor.bottom() + BTN_GAP); + RewardButton btnArmor = new RewardButton(Ghost.Quest.armor); + btnArmor.setRect((WIDTH - BTN_GAP) / 3f * 2.3f - BTN_SIZE/2f, message.top() + message.height() + BTN_GAP, + BTN_SIZE, BTN_SIZE); + add(btnArmor); + resize(WIDTH, (int) btnArmor.bottom() + BTN_GAP); + } else { + btnWeapon.setRect( (WIDTH - BTN_GAP) / 2f - BTN_SIZE, message.top() + message.height() + BTN_GAP, + BTN_SIZE, BTN_SIZE ); + add( btnWeapon ); + + RewardButton btnArmor = new RewardButton( Ghost.Quest.armor ); + btnArmor.setRect( btnWeapon.right() + BTN_GAP, btnWeapon.top(), BTN_SIZE, BTN_SIZE ); + add(btnArmor); + resize(WIDTH, (int) btnArmor.bottom() + BTN_GAP); + } } private void selectReward( Item reward ) { @@ -119,6 +141,11 @@ public class WndSadGhost extends Window { } else { Dungeon.level.drop( reward, ghost.pos ).sprite.drop(); } + + //准备作为奖励区域 + if(RegularLevel.holiday == RegularLevel.Holiday.ZQJ){ + Dungeon.level.drop( food, ghost.pos ).sprite.drop(); + } ghost.yell( Messages.get(this, "farewell") ); ghost.die( null ); @@ -165,6 +192,63 @@ public class WndSadGhost extends Window { } } + private class RewardButtonDouble extends Component { + + protected NinePatch bg; + protected ItemSlot slot; + + public RewardButtonDouble( Item item ){ + bg = Chrome.get( Chrome.Type.WINDOW); + add( bg ); + + slot = new ItemSlot( item ){ + @Override + protected void onPointerDown() { + bg.brightness( 1.2f ); + Sample.INSTANCE.play( Assets.Sounds.CLICK ); + } + @Override + protected void onPointerUp() { + bg.resetColor(); + } + @Override + protected void onClick() { + GameScene.show(new RewardWindowDouble(item)); + } + }; + add(slot); + } + + @Override + protected void layout() { + super.layout(); + + bg.x = x; + bg.y = y; + bg.size( width, height ); + + slot.setRect( x + 2, y + 2, width - 4, height - 4 ); + } + } + + private class RewardWindowDouble extends WndInfoItem { + + public RewardWindowDouble( Item item ) { + super(item); + + RedButton btnCancel = new RedButton(Messages.get(WndSadGhost.class, "look")){ + @Override + protected void onClick() { + RewardWindowDouble.this.hide(); + } + }; + btnCancel.setRect(0, height+2, width, 16); + add(btnCancel); + + resize(width, (int)btnCancel.bottom()); + } + } + private class RewardWindow extends WndInfoItem { public RewardWindow( Item item ) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java index 683cc8ddc..7da21bdfa 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java @@ -1,6 +1,8 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; -import static com.shatteredpixel.shatteredpixeldungeon.Challenges.STRONGER_BOSSES; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.DHXD; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.MOREROOM; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO; import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; @@ -60,7 +62,9 @@ public class WndScoreBreakdown extends Window { int chCount = 0; for (int ch : Challenges.MASKS){ - if ((Dungeon.challenges & ch) != 0 && ch <= STRONGER_BOSSES) chCount++; + if ((Dungeon.challenges & ch) != 0 && ch <= MOREROOM && ch != PRO && ch != DHXD) { + chCount++; + } } //评分系统 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index 9cc76abf2..4db7db6a6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; import static com.watabou.utils.DeviceCompat.isAndroid; +import static com.watabou.utils.DeviceCompat.isDesktop; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Chrome; @@ -408,6 +409,7 @@ public class WndSettings extends WndTabbed { ColorBlock sep1; OptionSlider optUIMode; + RedButton btnKeyBindings; OptionSlider optUIScale; RedButton btnToolbarSettings; CheckBox chkFlipTags; @@ -640,6 +642,17 @@ public class WndSettings extends WndTabbed { }; chkFont.checked(SPDSettings.systemFont()); add(chkFont); + + btnKeyBindings = new RedButton(Messages.get(this, "key_bindings")){ + @Override + protected void onClick() { + super.onClick(); + ShatteredPixelDungeon.scene().addToFront(new WndKeyBindings()); + } + }; + + add(btnKeyBindings); + } @Override @@ -666,6 +679,8 @@ public class WndSettings extends WndTabbed { } } + + if (btnToolbarSettings != null) { btnToolbarSettings.setRect(0, height + GAP, width, BTN_HEIGHT); height = btnToolbarSettings.bottom(); @@ -679,6 +694,14 @@ public class WndSettings extends WndTabbed { chkFont.setRect(0, sep2.y + 1 + GAP, width, BTN_HEIGHT); height = chkFont.bottom(); + + if (!isDesktop()) { + btnKeyBindings.active = false; + btnKeyBindings.alpha(0.3f); + } + btnKeyBindings.setRect(0, height + GAP, width, BTN_HEIGHT); + height = btnKeyBindings.bottom(); + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java index 80abaa0f4..359e489b7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndStartGame.java @@ -177,6 +177,7 @@ public class WndStartGame extends Window { + @Override protected void layout() { super.layout(); @@ -299,9 +300,10 @@ public class WndStartGame extends Window { if( !visible && GamesInProgress.selectedClass != null){ visible = true; } - if (parent != null) { - icon(Icons.get(SPDSettings.challenges() > 0 ? - Icons.CHALLENGE_ON : Icons.CHALLENGE_OFF)); + if (SPDSettings.challenges() > 0) { + icon(Icons.get( Icons.CHALLENGE_ON)); + } else { + icon(Icons.get( Icons.CHALLENGE_OFF)); } super.update(); } @@ -332,6 +334,8 @@ public class WndStartGame extends Window { } + + private static class HeroBtn extends IconButton { private HeroClass cl; diff --git a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java index d3170a9ba..430fa75bc 100644 --- a/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java +++ b/desktop/src/main/java/com/shatteredpixel/shatteredpixeldungeon/desktop/DesktopPlatformSupport.java @@ -123,11 +123,9 @@ public class DesktopPlatformSupport extends PlatformSupport { resetGenerators(false); fonts = new HashMap<>(); - - basicFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/pixel_font.ttf")); - asianFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/fusion_pixel.ttf")); - fallbackFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/droid_sans.ttf")); - + basicFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/pixel_font.ttf")); + asianFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/fusion_pixel.ttf")); + fallbackFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/droid_sans.ttf")); fonts.put(basicFontGenerator, new HashMap<>()); fonts.put(asianFontGenerator, new HashMap<>());