Update Beta3.6-V0630

This commit is contained in:
LingASDJ 2023-06-21 00:57:38 +08:00
parent 2c4f570e36
commit 89d9690c24
27 changed files with 406 additions and 202 deletions

View File

@ -33,7 +33,6 @@ import com.badlogic.gdx.backends.android.AndroidApplication;
import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration;
import com.badlogic.gdx.backends.android.AndroidAudio; import com.badlogic.gdx.backends.android.AndroidAudio;
import com.badlogic.gdx.backends.android.AsynchronousAndroidAudio; import com.badlogic.gdx.backends.android.AsynchronousAndroidAudio;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.services.news.GameNesImpl; import com.shatteredpixel.shatteredpixeldungeon.services.news.GameNesImpl;

View File

@ -17,8 +17,8 @@ allprojects {
appName = 'Magic Ling Pixel Dungeon' appName = 'Magic Ling Pixel Dungeon'
appPackageName = 'com.ansdomagiclingpixeldungeon.ling' appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
appVersionCode =900904 appVersionCode =900906
appVersionName = '0.6.3.0-Beta3.1' appVersionName = '0.6.3.0-Beta3.6'
appJavaCompatibility = JavaVersion.VERSION_11 appJavaCompatibility = JavaVersion.VERSION_11

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -996,6 +996,9 @@ actors.buffs.championenemy$big.desc=攻击力提升20%,攻击有20%概率造成
actors.buffs.championenemy$longsider.name=突变烟雾体 actors.buffs.championenemy$longsider.name=突变烟雾体
actors.buffs.championenemy$longsider.desc=攻击力减少10%,攻击范围+2攻击敌人10%概率造成眩晕……\n\n突变烟雾体喜好在远处骚扰敌人他就像烟雾一样来无影去无踪…… 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.charm.name=魅惑 actors.buffs.charm.name=魅惑
actors.buffs.charm.heromsg=你被魅惑了! actors.buffs.charm.heromsg=你被魅惑了!
@ -1349,10 +1352,14 @@ actors.hero.heroclass.warrior_desc_item=蕾零安洁初始携带一枚可以贴
actors.hero.heroclass.warrior_desc_loadout=蕾零安洁初始携带一把_破损的短剑。_这把武器的直接近战伤害是所有初始武器中最高的。\n\n蕾零安洁初始携带_三块石子。_石子可以扔出攻击远处造成一定的少量伤害。\n\n蕾零安洁初始携带一个可以收纳各种药水并保护药水瓶不被冻碎的_药水架。_\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_ actors.hero.heroclass.warrior_desc_loadout=蕾零安洁初始携带一把_破损的短剑。_这把武器的直接近战伤害是所有初始武器中最高的。\n\n蕾零安洁初始携带_三块石子。_石子可以扔出攻击远处造成一定的少量伤害。\n\n蕾零安洁初始携带一个可以收纳各种药水并保护药水瓶不被冻碎的_药水架。_\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_
actors.hero.heroclass.warrior_desc_misc=蕾零安洁每次食用食物时都能恢复少量生命值。\n\n蕾零安洁开局鉴定的物品有\n- 鉴定卷轴\n- 治疗药水\n- 盛怒卷轴\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_ actors.hero.heroclass.warrior_desc_misc=蕾零安洁每次食用食物时都能恢复少量生命值。\n\n蕾零安洁开局鉴定的物品有\n- 鉴定卷轴\n- 治疗药水\n- 盛怒卷轴\n\n蕾零安洁初始携带一个不会被消耗的_唤魔晶柱_
actors.hero.heroclass.warrior_desc_subclasses=在击杀第二个Boss后可以选择一种专精。蕾零安洁可以在两种专精中二选一 actors.hero.heroclass.warrior_desc_subclasses=在击杀第二个Boss后可以选择一种专精。蕾零安洁可以在两种专精中二选一
actors.hero.heroclass.warrior_story=....
actors.hero.heroclass.huntress_story=剧情故事待补充-456 actors.hero.heroclass.warrior_story=蕾蕶安洁--战术策略\n\n她出生于霜落帝国这里常年都是寒风刺骨的状态。蕾蕶安洁是毕业于战术高等学府的优秀学员。她不主张使用魔法而是在于攻防兼备。她的家族世世代代都以战术策略为主她的家族是霜落帝国中为数不多的仍然未使用魔法或者特殊能力的家族。\n如今由于地表三巨头的诱人悬赏加上她自己也有来地牢的一些调查她就此来到了这里。
actors.hero.heroclass.rogue_story=剧情故事待补充-789
actors.hero.heroclass.mage_story=剧情故事待补充-101112 actors.hero.heroclass.huntress_story=颐莲梅錵--精灵血裔\n\n颐莲梅錵诞生于绿林圣境这里是精灵的聚集地。她的母亲是这里的最高管理者然而她向往外面的世界不希望自己就一直在母亲的保护和圣境的结界中过完一生。为此她私自开启了结界这带来了一场重大的变故。最后还是她母亲发现异常后重新修补了结界但她本人从此在圣境中消失了。最高管理者其实什么都知道为此也没有派人寻找她....\n\n多年后她为了提升自己的力量前往了这里。地牢深处的宝物是她此行的目的而她不知道的是她已是最后一位精灵血裔...
actors.hero.heroclass.rogue_story=极影铃虹--迷离少女\n\n极影铃虹出生于深渊魔都是拥有皇家血脉的人。然而她在每次外出的时候都会看见底层的人们深受生活的折磨并且遭到贵族的歧视。这些现象都给纯洁无知的她带来了很多影响自那以后皇室中总有一个黑影盗窃东西都是由于这个黑影每次盗窃的都是食物方面。为此皇室高层是搁置不管此事。皇室高层在外巡游的时候听到底层的人们谈论有一个蒙着面纱的女性将食物送给他们。皇室高层自然联想到了那个黑影......\n但是并没有人知道是她。而她听说地牢最深处的东西可以实现愿望便说服自己的父亲来到了这里父亲在她的斗篷中植入了一颗暗黑的种子必要时刻它会保护她前行。
actors.hero.heroclass.mage_story=茉莉伊洛--渊初少女\n\n茉莉伊洛的出生地并不是这片国土而是远在天边的神秘之境。那里魔力满溢每个人都是这里的顶尖魔法师。她因为一些变故离开了自己的家乡来到了地表三巨头管辖的区域并且在法师学府毕业。懂得强大的冰与火的魔力能在战斗中随机应变。但由于她并不属于这里这里的魔力束缚了她为此她的真正力量从未显现。她为了调查有关于水晶之心的谜团便前往来到这地牢的面前....
actors.hero.heroclass.mage=茉莉伊洛 actors.hero.heroclass.mage=茉莉伊洛
actors.hero.heroclass.mage_unlock=茉莉伊洛精通各类法杖并在开局时持有一根_独特的魔杖_。\n\n_在一局游戏中使用两张升级卷轴_以解锁茉莉伊洛。 actors.hero.heroclass.mage_unlock=茉莉伊洛精通各类法杖并在开局时持有一根_独特的魔杖_。\n\n_在一局游戏中使用两张升级卷轴_以解锁茉莉伊洛。

View File

@ -2145,7 +2145,7 @@ items.weapon.weapon.identify=你对手中的武器已经足够熟悉并将其完
items.weapon.weapon.too_heavy=因为你的力量不足,该武器会降低你的攻速和精准,并让你无法偷袭。 items.weapon.weapon.too_heavy=因为你的力量不足,该武器会降低你的攻速和精准,并让你无法偷袭。
items.weapon.weapon.excess_str=你的额外力量让你在使用这件武器时最多能够造成_%d点额外伤害_。 items.weapon.weapon.excess_str=你的额外力量让你在使用这件武器时最多能够造成_%d点额外伤害_。
items.weapon.weapon.incompatible=不同属性的魔法相冲突,消除了武器上的附魔! items.weapon.weapon.incompatible=不同属性的魔法相冲突,消除了武器上的附魔!
items.weapon.weapon.cursed_worn=由于这件武器被诅咒,你无法将其放下。 items.weapon.weapon.cursed_worn=由于这件武器被诅咒,你无f法将其放下。
items.weapon.weapon.cursed=你能感觉到这件武器里潜伏着一股充满恶意的魔力。 items.weapon.weapon.cursed=你能感觉到这件武器里潜伏着一股充满恶意的魔力。
items.weapon.weapon.not_cursed=这件武器没有被诅咒。 items.weapon.weapon.not_cursed=这件武器没有被诅咒。
items.weapon.weapon.faster=这件武器强化了_攻速_。 items.weapon.weapon.faster=这件武器强化了_攻速_。

View File

@ -317,7 +317,7 @@ challenges.rlpt = ]支离破碎]
challenges.rlpt_desc=地下涌动的神秘力量正在渐渐腐蚀这里,这里不过是而言是另一场噩梦。\n\n从第六层开始怪物必定有几个不是本大层的怪物但不会超过两级。一般来说在监狱遇到矮人层的怪物几率很小。通常遇到矿洞层的怪物。 challenges.rlpt_desc=地下涌动的神秘力量正在渐渐腐蚀这里,这里不过是而言是另一场噩梦。\n\n从第六层开始怪物必定有几个不是本大层的怪物但不会超过两级。一般来说在监狱遇到矮人层的怪物几率很小。通常遇到矿洞层的怪物。
challenges.sbsg = ]基因突变] challenges.sbsg = ]基因突变]
challenges.sbsg_desc=地牢中的神秘魔力让一些生物发生了重大的变化\n-所有生物都会因为突变激素变得各不相同,给探索地牢的脚步带来更大的困难。\n-敌人有5种突变类型\n突变失败体_(30%概率)_:近战伤害减少35%,移速提高到1.3。\n突变爆炸体_(25%概率)_:移速减少50%,攻击力降低30%,但死亡时拥有爆炸伤害。\n突变完全体_(20%概率)_:移速和攻击力各提高25%,且拥有30%伤害减免。\n突变危险体_(15%概率)_:攻击力提升20%,攻击有10%概率造成流血。死亡时有5%概率立刻向本层发出警报。\n突变烟雾体_(10%概率)_:攻击力减少10%,攻击范围+2攻击敌人10%概率造成眩晕……\n\n_特别说明如果开启精英强敌词条会和精英词条共存_ challenges.sbsg_desc=地牢中的神秘魔力让一些生物发生了重大的变化\n-所有生物都会因为突变激素变得各不相同,给探索地牢的脚步带来更大的困难。\n-敌人有6种突变类型,且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.exsg = ]药水癔症] challenges.exsg = ]药水癔症]
challenges.exsg_desc=药水癔症详细规则:\n力量药水--60%概率力量-1\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\n灵视药剂--60%概率喝后失明5回合\n隐形药剂--60%概率喝后立刻怒吼\n极速药剂--60%概率喝后立刻残废8回合\n==========================\n小型口粮-吃后立刻获得极速4回合\n冷冻生肉片-吃后获得奥术护盾\n全肉大饼-吃后立刻获得8回合极速,且有大概率+1力量(_随着力量的追加获得力量的概率会渐渐变低_)\n\n高级药水_(合剂/魔药)_不受影响\n不知道何种原因大部分正面药水你都感觉有毒\n你的臆想会导致药水有毒,但食物却会很有用!而且地牢里面还会追加自动售货机,会售卖一些更加高级的东西。

View File

@ -535,4 +535,8 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x73=-V0.6.3-Beta1.5\n1.修复时光
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x74=-V0.6.3-Beta2.0\n1.修复BossRush的一些问题\n2.改善部分代码 ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x74=-V0.6.3-Beta2.0\n1.修复BossRush的一些问题\n2.改善部分代码
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x75=-V0.6.3-Beta3.5\n1.修复一些错误,修复DM720概率为40%而非20%的问题。\n2.PC端音乐崩溃属于正常现象后续更新会优化如果崩溃重启即可。
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x76=-V0.6.3-Beta3.6\n1.修复PC端音乐偶尔崩溃的问题\n2.修复一些文案错误
//ui.changelist.mlpd.vm0_5_x_changes.xxx// //ui.changelist.mlpd.vm0_5_x_changes.xxx//

View File

@ -154,6 +154,9 @@ windows.bosssettingwindows.bossgold=在游戏中,随着你探索的深度,
windows.bosssettingwindows.bug=购买通行证 windows.bosssettingwindows.bug=购买通行证
windows.bosssettingwindows.not_yet=取消 windows.bosssettingwindows.not_yet=取消
windows.bosssettingwindows.no_money=ERROR:你的金币不够,无法购买通行证。 windows.bosssettingwindows.no_money=ERROR:你的金币不够,无法购买通行证。
windows.bosssettingwindows.no_level=ERROR:不能在交界处退还金币。
windows.bosssettingwindows.getboss=染血金币控制终端已经为你打开一条秘密通道,其路径通往: windows.bosssettingwindows.getboss=染血金币控制终端已经为你打开一条秘密通道,其路径通往:
windows.bosssettingwindows.takenotapplic=你已取消挑战此领袖,已返还金币: windows.bosssettingwindows.takenotapplic=你已取消挑战此领袖,已返还金币:
windows.bosssettingwindows.cancal=ERROR:用户取消购买,已自动关闭。 windows.bosssettingwindows.cancal=ERROR:用户取消购买,已自动关闭。

View File

@ -3,9 +3,22 @@ package com.shatteredpixel.shatteredpixeldungeon;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.depth; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.depth;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music; import com.watabou.noosa.audio.Music;
import com.watabou.utils.Callback;
public class BGMPlayer { public class BGMPlayer {
public static void playBGM(String name, boolean loop) {
Game.runOnRenderThread(new Callback() {
@Override
public void call() {
Music.INSTANCE.play(name, loop);
}
});
}
public static void playBGMWithDepth() { public static void playBGMWithDepth() {
if (Dungeon.hero != null) { if (Dungeon.hero != null) {
if (Dungeon.hero.buff(LockedFloor.class) != null) { if (Dungeon.hero.buff(LockedFloor.class) != null) {
@ -18,44 +31,44 @@ public class BGMPlayer {
if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) {
if (d == -1) { if (d == -1) {
Music.INSTANCE.play(Assets.SNOWCYON, true); playBGM(Assets.SNOWCYON, true);
}else if (d == 0||d==27) { }else if (d == 0||d==27) {
Music.INSTANCE.play(Assets.SNOWCYON, true); playBGM(Assets.SNOWCYON, true);
} else if (d > 0 && d <= 5) { } else if (d > 0 && d <= 5) {
Music.INSTANCE.play(Assets.BGM_1, true); playBGM(Assets.BGM_1, true);
} else if (d > 5 && d <= 10) { } else if (d > 5 && d <= 10) {
Music.INSTANCE.play(Assets.BGM_2, true); playBGM(Assets.BGM_2, true);
} else if (d > 10 && d <= 15) { } else if (d > 10 && d <= 15) {
Music.INSTANCE.play(Assets.BGM_3, true); playBGM(Assets.BGM_3, true);
} else if (d > 15 && d <= 20) { } else if (d > 15 && d <= 20) {
Music.INSTANCE.play(Assets.BGM_4, true); playBGM(Assets.BGM_4, true);
} else if (d > 20 && d <= 26) { } else if (d > 20 && d <= 26) {
Music.INSTANCE.play(Assets.BGM_5, true); playBGM(Assets.BGM_5, true);
} else if (d ==-5||d ==-15) { } else if (d ==-5||d ==-15) {
Music.INSTANCE.play(Assets.SNOWCYON, true); playBGM(Assets.SNOWCYON, true);
} else } else
//default //default
Music.INSTANCE.play(Assets.Music.THEME, true); playBGM(Assets.Music.THEME, true);
} else { } else {
if (d == -1) { if (d == -1) {
Music.INSTANCE.play(Assets.TOWN, true); playBGM(Assets.TOWN, true);
}else if (d == 0) { }else if (d == 0) {
Music.INSTANCE.play(Assets.TOWN, true); playBGM(Assets.TOWN, true);
} else if (d > 0 && d <= 5) { } else if (d > 0 && d <= 5) {
Music.INSTANCE.play(Assets.BGM_1, true); playBGM(Assets.BGM_1, true);
} else if (d > 5 && d <= 10) { } else if (d > 5 && d <= 10) {
Music.INSTANCE.play(Assets.BGM_2, true); playBGM(Assets.BGM_2, true);
} else if (d > 10 && d <= 15) { } else if (d > 10 && d <= 15) {
Music.INSTANCE.play(Assets.BGM_3, true); playBGM(Assets.BGM_3, true);
} else if (d > 15 && d <= 20) { } else if (d > 15 && d <= 20) {
Music.INSTANCE.play(Assets.BGM_4, true); playBGM(Assets.BGM_4, true);
} else if (d > 20 && d <= 26) { } else if (d > 20 && d <= 26) {
Music.INSTANCE.play(Assets.BGM_5, true); playBGM(Assets.BGM_5, true);
} else if (d ==-5||d ==-15) { } else if (d ==-5||d ==-15) {
Music.INSTANCE.play(Assets.SNOWCYON, true); playBGM(Assets.SNOWCYON, true);
} else } else
//default //default
Music.INSTANCE.play(Assets.Music.THEME, true); playBGM(Assets.Music.THEME, true);
} }
@ -105,57 +118,54 @@ public class BGMPlayer {
if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) { if (Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)) {
switch (depth){ switch (depth){
case 2: case 2:
Music.INSTANCE.play(Assets.BGM_BOSSA, true); playBGM(Assets.BGM_BOSSA, true);
break; break;
case 4:case 5: case 4:case 5:
Music.INSTANCE.play(Assets.BGM_BOSSB, true); playBGM(Assets.BGM_BOSSB, true);
break; break;
case 8: case 10: case 8: case 10:
Music.INSTANCE.play(Assets.BGM_BOSSC, true); playBGM(Assets.BGM_BOSSC, true);
break; break;
case 12: case 14: case 12: case 14:
Music.INSTANCE.play(Assets.BGM_BOSSD, true); playBGM(Assets.BGM_BOSSD, true);
break; break;
case 16: case 16:
Music.INSTANCE.play(Assets.BGM_BOSSC3, true); playBGM(Assets.BGM_BOSSC3, true);
break; break;
case 19: case 21: case 19: case 21:
Music.INSTANCE.play(Assets.BGM_BOSSD2, true); playBGM(Assets.BGM_BOSSD2, true);
break; break;
case 25: case 25:
Music.INSTANCE.play(Assets.BGM_FRBOSS, true); playBGM(Assets.BGM_FRBOSS, true);
break; break;
case 26: case 26:
Music.INSTANCE.play(Assets.BGM_BOSSE3, true); playBGM(Assets.BGM_BOSSE3, true);
break; break;
case 28: case 28:
Music.INSTANCE.play( Assets.BGM_0, true ); playBGM( Assets.BGM_0, true );
break; break;
} }
} else { } else {
if (Dungeon.bossLevel() && t == 5) { if (Dungeon.bossLevel() && t == 5) {
Music.INSTANCE.play(Assets.BGM_BOSSA, true); playBGM(Assets.BGM_BOSSA, true);
} else if (Dungeon.bossLevel() && t == 10) { } else if (Dungeon.bossLevel() && t == 10) {
Music.INSTANCE.play(Assets.BGM_BOSSB, true); playBGM(Assets.BGM_BOSSB, true);
} else if (Dungeon.bossLevel() && t == 15 && Statistics.spawnersIce > 0) { } else if (Dungeon.bossLevel() && t == 15 && Statistics.spawnersIce > 0) {
Music.INSTANCE.play(Assets.BGM_BOSSC3, true); playBGM(Assets.BGM_BOSSC3, true);
} else if (Dungeon.bossLevel() && t == 15) { } else if (Dungeon.bossLevel() && t == 15) {
if((Statistics.boss_enhance & 0x4) != 0) Music.INSTANCE.play(Assets.BGM_BOSSC3, true); if((Statistics.boss_enhance & 0x4) != 0) playBGM(Assets.BGM_BOSSC3, true);
else Music.INSTANCE.play(Assets.BGM_BOSSC, true); else playBGM(Assets.BGM_BOSSC, true);
} else if (Dungeon.bossLevel() && t == 20) { } else if (Dungeon.bossLevel() && t == 20) {
if((Statistics.boss_enhance & 0x8) != 0) Music.INSTANCE.play(Assets.BGM_BOSSD2, true); if((Statistics.boss_enhance & 0x8) != 0) playBGM(Assets.BGM_BOSSD2, true);
else Music.INSTANCE.play(Assets.BGM_BOSSD, true); else playBGM(Assets.BGM_BOSSD, true);
} else if (Dungeon.bossLevel() && t == 25 && (Statistics.spawnersAlive > 0)) { } else if (Dungeon.bossLevel() && t == 25 && (Statistics.spawnersAlive > 0)) {
Music.INSTANCE.play(Assets.BGM_BOSSE3, true); playBGM(Assets.BGM_BOSSE3, true);
}else if (Dungeon.bossLevel() && t == 25){ }else if (Dungeon.bossLevel() && t == 25){
Music.INSTANCE.play(Assets.BGM_BOSSE, true); playBGM(Assets.BGM_BOSSE, true);
} else if (Dungeon.bossLevel() && t == -15) { } else if (Dungeon.bossLevel() && t == -15) {
Music.INSTANCE.play(Assets.BGM_FRBOSS, true); playBGM(Assets.BGM_FRBOSS, true);
} }
} }
} }
} }

View File

@ -21,11 +21,16 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char; import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ConfusionGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap;
@ -33,7 +38,9 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder; import com.watabou.utils.PathFinder;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@ -107,21 +114,25 @@ public abstract class ChampionEnemy extends Buff {
Class<?extends ChampionEnemy> buffCls; Class<?extends ChampionEnemy> buffCls;
if (Random.Float() < 0.3f) { switch (Random.NormalIntRange(0,6)){
//30% case 0: default:
buffCls = ChampionEnemy.Small.class; buffCls = ChampionEnemy.Small.class;
} else if (Random.Float() < 0.25f) { break;
//25% case 1:
buffCls = ChampionEnemy.Bomber.class; buffCls = ChampionEnemy.Bomber.class;
} else if (Random.Float() < 0.2f) { break;
//20% case 2:
buffCls = ChampionEnemy.Middle.class; buffCls = ChampionEnemy.Middle.class;
} else if (Random.Float() < 0.15f) { break;
//15% case 3:
buffCls = ChampionEnemy.Big.class; buffCls = ChampionEnemy.Big.class;
} else { break;
//10% case 4:
buffCls = ChampionEnemy.LongSider.class; buffCls = ChampionEnemy.Sider.class;
break;
case 5:
buffCls = ChampionEnemy.LongSider.class;
break;
} }
if (Dungeon.mobsToStateLing <= 0 && Dungeon.isChallenged(Challenges.SBSG)) { if (Dungeon.mobsToStateLing <= 0 && Dungeon.isChallenged(Challenges.SBSG)) {
@ -158,6 +169,56 @@ public abstract class ChampionEnemy extends Buff {
} }
}
public static class Sider extends ChampionEnemy implements Callback {
{
color = 0xe59d9d;
}
public static class DarkBolt{}
public void onZapComplete() {
next();
}
@Override
public void call() {
next();
}
@Override
public boolean canAttackWithExtraReach(Char enemy) {
//attack range of 2
/** 实现效果此外还要关联CharSprite.java和Mob.java以实现远程效果*/
if(Random.Float()<0.1f) {
switch (Random.NormalIntRange(0,5)){
//默认为毒雾
case 1:default:
GameScene.add(Blob.seed(enemy.pos, 45, ToxicGas.class));
break;
case 2:
GameScene.add(Blob.seed(enemy.pos, 45, CorrosiveGas.class));
break;
case 3:
GameScene.add(Blob.seed(enemy.pos, 45, ConfusionGas.class));
break;
case 4:
GameScene.add(Blob.seed(enemy.pos, 45, StormCloud.class));
break;
}
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
}
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;
}
} }
public static class Small extends ChampionEnemy { public static class Small extends ChampionEnemy {

View File

@ -45,7 +45,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Corruption;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Preparation;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
@ -92,10 +91,14 @@ import java.util.HashSet;
public abstract class Mob extends Char { public abstract class Mob extends Char {
public void onZapComplete() {
next();
}
public float scaleFactor = 1f; public float scaleFactor = 1f;
{ {
actPriority = MOB_PRIO; actPriority = MOB_PRIO;
alignment = Alignment.ENEMY; alignment = Alignment.ENEMY;
} }
public ArrayList<Item> items; public ArrayList<Item> items;
@ -107,11 +110,11 @@ public abstract class Mob extends Char {
public void updateHT(boolean boostHP) { public void updateHT(boolean boostHP) {
if(Dungeon.isDIFFICULTY(EASY)){ if(Dungeon.isDIFFICULTY(EASY)){
HP = HT = (int) (0.8f * HP); HP = HT = (int) (0.8f * HP);
} else if(Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.NORMAL)){ } else if(Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.NORMAL)){
HP=HT *= 1f; HP=HT *= 1f;
} else if(Dungeon.isDIFFICULTY(HARD)){ } else if(Dungeon.isDIFFICULTY(HARD)){
HP=HT *= 1.25f; HP=HT *= 1.25f;
if (properties().contains(Property.BOSS)) { if (properties().contains(Property.BOSS)) {
HP = HT *= 5f; HP = HT *= 5f;
} else if (properties().contains(Property.MINIBOSS)) { } else if (properties().contains(Property.MINIBOSS)) {
@ -160,30 +163,30 @@ public abstract class Mob extends Char {
public AiState FLEEING = new Fleeing(); public AiState FLEEING = new Fleeing();
public AiState PASSIVE = new Passive(); public AiState PASSIVE = new Passive();
public AiState state = SLEEPING; public AiState state = SLEEPING;
public Class<? extends CharSprite> spriteClass; public Class<? extends CharSprite> spriteClass;
protected int target = -1; protected int target = -1;
public int defenseSkill = 0; public int defenseSkill = 0;
public int EXP = 1; public int EXP = 1;
public int maxLvl = Hero.MAX_LEVEL; public int maxLvl = Hero.MAX_LEVEL;
protected Char enemy; protected Char enemy;
protected boolean enemySeen; protected boolean enemySeen;
protected boolean alerted = false; protected boolean alerted = false;
protected static final float TIME_TO_WAKE_UP = 1f; protected static final float TIME_TO_WAKE_UP = 1f;
private static final String STATE = "state"; private static final String STATE = "state";
private static final String SEEN = "seen"; private static final String SEEN = "seen";
private static final String TARGET = "target"; private static final String TARGET = "target";
private static final String MAX_LVL = "max_lvl"; private static final String MAX_LVL = "max_lvl";
@Override @Override
public void storeInBundle( Bundle bundle ) { public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle ); super.storeInBundle( bundle );
if (state == SLEEPING) { if (state == SLEEPING) {
@ -201,10 +204,10 @@ public abstract class Mob extends Char {
bundle.put( TARGET, target ); bundle.put( TARGET, target );
bundle.put( MAX_LVL, maxLvl ); bundle.put( MAX_LVL, maxLvl );
} }
@Override @Override
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle ); super.restoreFromBundle( bundle );
String state = bundle.getString( STATE ); String state = bundle.getString( STATE );
@ -226,26 +229,26 @@ public abstract class Mob extends Char {
if (bundle.contains(MAX_LVL)) maxLvl = bundle.getInt(MAX_LVL); if (bundle.contains(MAX_LVL)) maxLvl = bundle.getInt(MAX_LVL);
} }
public CharSprite sprite() { public CharSprite sprite() {
return Reflection.newInstance(spriteClass); return Reflection.newInstance(spriteClass);
} }
@Override @Override
protected boolean act() { protected boolean act() {
super.act(); super.act();
boolean justAlerted = alerted; boolean justAlerted = alerted;
alerted = false; alerted = false;
if (justAlerted){ if (justAlerted){
sprite.showAlert(); sprite.showAlert();
} else { } else {
sprite.hideAlert(); sprite.hideAlert();
sprite.hideLost(); sprite.hideLost();
} }
if (paralysed > 0) { if (paralysed > 0) {
enemySeen = false; enemySeen = false;
spend( TICK ); spend( TICK );
@ -257,18 +260,18 @@ public abstract class Mob extends Char {
} }
enemy = chooseEnemy(); enemy = chooseEnemy();
boolean enemyInFOV = enemy != null && enemy.isAlive() && fieldOfView[enemy.pos] && enemy.invisible <= 0; boolean enemyInFOV = enemy != null && enemy.isAlive() && fieldOfView[enemy.pos] && enemy.invisible <= 0;
return state.act( enemyInFOV, justAlerted ); return state.act( enemyInFOV, justAlerted );
} }
//FIXME this is sort of a band-aid correction for allies needing more intelligent behaviour //FIXME this is sort of a band-aid correction for allies needing more intelligent behaviour
protected boolean intelligentAlly = false; protected boolean intelligentAlly = false;
protected Char chooseEnemy() { protected Char chooseEnemy() {
Dread dread = buff( Dread.class ); Dread dread = buff( Dread.class );
@ -286,7 +289,7 @@ public abstract class Mob extends Char {
return source; return source;
} }
} }
//if we are an alert enemy, auto-hunt a target that is affected by aggression, even another enemy //if we are an alert enemy, auto-hunt a target that is affected by aggression, even another enemy
if (alignment == Alignment.ENEMY && state != PASSIVE && state != SLEEPING) { if (alignment == Alignment.ENEMY && state != PASSIVE && state != SLEEPING) {
if (enemy != null && enemy.buff(StoneOfAggression.Aggression.class) != null){ if (enemy != null && enemy.buff(StoneOfAggression.Aggression.class) != null){
@ -307,10 +310,10 @@ public abstract class Mob extends Char {
//we have no enemy, or the current one is dead/missing //we have no enemy, or the current one is dead/missing
if ( enemy == null || !enemy.isAlive() || !Actor.chars().contains(enemy) || state == WANDERING) { if ( enemy == null || !enemy.isAlive() || !Actor.chars().contains(enemy) || state == WANDERING) {
newEnemy = true; newEnemy = true;
//We are amoked and current enemy is the hero //We are amoked and current enemy is the hero
} else if (buff( Amok.class ) != null && enemy == Dungeon.hero) { } else if (buff( Amok.class ) != null && enemy == Dungeon.hero) {
newEnemy = true; newEnemy = true;
//We are charmed and current enemy is what charmed us //We are charmed and current enemy is what charmed us
} else if (buff(Charm.class) != null && buff(Charm.class).object == enemy.id()) { } else if (buff(Charm.class) != null && buff(Charm.class).object == enemy.id()) {
newEnemy = true; newEnemy = true;
} }
@ -320,7 +323,7 @@ public abstract class Mob extends Char {
//current enemy is also an ally //current enemy is also an ally
if (enemy.alignment == Alignment.ALLY){ if (enemy.alignment == Alignment.ALLY){
newEnemy = true; newEnemy = true;
//current enemy is invulnerable //current enemy is invulnerable
} else if (enemy.isInvulnerable(getClass())){ } else if (enemy.isInvulnerable(getClass())){
newEnemy = true; newEnemy = true;
} }
@ -338,7 +341,7 @@ public abstract class Mob extends Char {
&& fieldOfView[mob.pos] && mob.invisible <= 0) { && fieldOfView[mob.pos] && mob.invisible <= 0) {
enemies.add(mob); enemies.add(mob);
} }
if (enemies.isEmpty()) { if (enemies.isEmpty()) {
//try to find ally mobs to attack second. //try to find ally mobs to attack second.
for (Mob mob : Dungeon.level.mobs) for (Mob mob : Dungeon.level.mobs)
@ -346,7 +349,7 @@ public abstract class Mob extends Char {
&& fieldOfView[mob.pos] && mob.invisible <= 0) { && fieldOfView[mob.pos] && mob.invisible <= 0) {
enemies.add(mob); enemies.add(mob);
} }
if (enemies.isEmpty()) { if (enemies.isEmpty()) {
//try to find the hero third //try to find the hero third
if (fieldOfView[Dungeon.hero.pos] && Dungeon.hero.invisible <= 0) { if (fieldOfView[Dungeon.hero.pos] && Dungeon.hero.invisible <= 0) {
@ -354,8 +357,8 @@ public abstract class Mob extends Char {
} }
} }
} }
//if we are an ally... //if we are an ally...
} else if ( alignment == Alignment.ALLY ) { } else if ( alignment == Alignment.ALLY ) {
//look for hostile mobs to attack //look for hostile mobs to attack
for (Mob mob : Dungeon.level.mobs) for (Mob mob : Dungeon.level.mobs)
@ -366,8 +369,8 @@ public abstract class Mob extends Char {
(mob.state != mob.SLEEPING && mob.state != mob.PASSIVE && mob.state != mob.WANDERING)) { (mob.state != mob.SLEEPING && mob.state != mob.PASSIVE && mob.state != mob.WANDERING)) {
enemies.add(mob); enemies.add(mob);
} }
//if we are an enemy... //if we are an enemy...
} else if (alignment == Alignment.ENEMY) { } else if (alignment == Alignment.ENEMY) {
//look for ally mobs to attack //look for ally mobs to attack
for (Mob mob : Dungeon.level.mobs) for (Mob mob : Dungeon.level.mobs)
@ -378,7 +381,7 @@ public abstract class Mob extends Char {
if (fieldOfView[Dungeon.hero.pos] && Dungeon.hero.invisible <= 0) { if (fieldOfView[Dungeon.hero.pos] && Dungeon.hero.invisible <= 0) {
enemies.add(Dungeon.hero); enemies.add(Dungeon.hero);
} }
} }
//do not target anything that's charming us //do not target anything that's charming us
@ -409,7 +412,7 @@ public abstract class Mob extends Char {
} else } else
return enemy; return enemy;
} }
@Override @Override
public void add( Buff buff ) { public void add( Buff buff ) {
super.add( buff ); super.add( buff );
@ -422,7 +425,7 @@ public abstract class Mob extends Char {
postpone( Sleep.SWS ); postpone( Sleep.SWS );
} }
} }
@Override @Override
public void remove( Buff buff ) { public void remove( Buff buff ) {
super.remove( buff ); super.remove( buff );
@ -436,7 +439,7 @@ public abstract class Mob extends Char {
} }
} }
} }
protected boolean canAttack( Char enemy ) { protected boolean canAttack( Char enemy ) {
if (Dungeon.level.adjacent( pos, enemy.pos )){ if (Dungeon.level.adjacent( pos, enemy.pos )){
return true; return true;
@ -448,9 +451,9 @@ public abstract class Mob extends Char {
} }
return false; return false;
} }
protected boolean getCloser( int target ) { protected boolean getCloser( int target ) {
if (rooted || target == pos) { if (rooted || target == pos) {
return false; return false;
} }
@ -487,7 +490,7 @@ public abstract class Mob extends Char {
//shorten for a closer one //shorten for a closer one
if (Dungeon.level.adjacent(target, pos)) { if (Dungeon.level.adjacent(target, pos)) {
path.add(target); path.add(target);
//extend the path for a further target //extend the path for a further target
} else { } else {
path.add(last); path.add(last);
path.add(target); path.add(target);
@ -497,11 +500,11 @@ public abstract class Mob extends Char {
//if the new target is simply 1 earlier in the path shorten the path //if the new target is simply 1 earlier in the path shorten the path
if (path.getLast() == target) { if (path.getLast() == target) {
//if the new target is closer/same, need to modify end of path //if the new target is closer/same, need to modify end of path
} else if (Dungeon.level.adjacent(target, path.getLast())) { } else if (Dungeon.level.adjacent(target, path.getLast())) {
path.add(target); path.add(target);
//if the new target is further away, need to extend the path //if the new target is further away, need to extend the path
} else { } else {
path.add(last); path.add(last);
path.add(target); path.add(target);
@ -581,12 +584,12 @@ public abstract class Mob extends Char {
return false; return false;
} }
} }
protected boolean getFurther( int target ) { protected boolean getFurther( int target ) {
if (rooted || target == pos) { if (rooted || target == pos) {
return false; return false;
} }
int step = Dungeon.flee( this, target, Dungeon.level.passable, fieldOfView, true ); int step = Dungeon.flee( this, target, Dungeon.level.passable, fieldOfView, true );
if (step != -1) { if (step != -1) {
move( step ); move( step );
@ -619,6 +622,10 @@ public abstract class Mob extends Char {
delay = 1f; delay = 1f;
} }
if(buff(ChampionEnemy.Sider.class) != null){
delay = 4.0f;
}
return super.attackDelay()*(delay); return super.attackDelay()*(delay);
} }
@ -672,18 +679,18 @@ public abstract class Mob extends Char {
protected boolean doAttack( Char enemy ) { protected boolean doAttack( Char enemy ) {
if (sprite != null && (sprite.visible || enemy.sprite.visible)) { if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
sprite.attack( enemy.pos ); sprite.attack( enemy.pos );
return false; return false;
} else { } else {
attack( enemy ); attack( enemy );
spend( attackDelay() ); spend( attackDelay() );
return true; return true;
} }
} }
@Override @Override
public void onAttackComplete() { public void onAttackComplete() {
attack( enemy ); attack( enemy );
@ -716,12 +723,12 @@ public abstract class Mob extends Char {
return 0; return 0;
} }
} }
protected boolean hitWithRanged = false; protected boolean hitWithRanged = false;
@Override @Override
public int defenseProc( Char enemy, int damage ) { public int defenseProc( Char enemy, int damage ) {
if (enemy instanceof Hero if (enemy instanceof Hero
&& ((Hero) enemy).belongings.weapon() instanceof MissileWeapon && ((Hero) enemy).belongings.weapon() instanceof MissileWeapon
&& !hitWithRanged){ && !hitWithRanged){
@ -729,14 +736,14 @@ public abstract class Mob extends Char {
Statistics.thrownAssists++; Statistics.thrownAssists++;
Badges.validateHuntressUnlock(); Badges.validateHuntressUnlock();
} }
if (surprisedBy(enemy)) { if (surprisedBy(enemy)) {
Statistics.sneakAttacks++; Statistics.sneakAttacks++;
Badges.validateRogueUnlock(); Badges.validateRogueUnlock();
//TODO this is somewhat messy, it would be nicer to not have to manually handle delays here //TODO this is somewhat messy, it would be nicer to not have to manually handle delays here
// playing the strong hit sound might work best as another property of weapon? // playing the strong hit sound might work best as another property of weapon?
if (Dungeon.hero.belongings.weapon() instanceof SpiritBow.SpiritArrow if (Dungeon.hero.belongings.weapon() instanceof SpiritBow.SpiritArrow
|| Dungeon.hero.belongings.weapon() instanceof Dart){ || Dungeon.hero.belongings.weapon() instanceof Dart){
Sample.INSTANCE.playDelayed(Assets.Sounds.HIT_STRONG, 0.125f); Sample.INSTANCE.playDelayed(Assets.Sounds.HIT_STRONG, 0.125f);
} else { } else {
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG); Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG);
@ -757,7 +764,7 @@ public abstract class Mob extends Char {
if (buff(SoulMark.class) != null) { if (buff(SoulMark.class) != null) {
int restoration = Math.min(damage, HP+shielding()); int restoration = Math.min(damage, HP+shielding());
//physical damage that doesn't come from the hero is less effective //physical damage that doesn't come from the hero is less effective
if (enemy != Dungeon.hero){ if (enemy != Dungeon.hero){
restoration = Math.round(restoration * 0.4f*Dungeon.hero.pointsInTalent(Talent.SOUL_SIPHON)/3f); restoration = Math.round(restoration * 0.4f*Dungeon.hero.pointsInTalent(Talent.SOUL_SIPHON)/3f);
@ -788,7 +795,7 @@ public abstract class Mob extends Char {
state = HUNTING; state = HUNTING;
} }
} }
public boolean isTargeting( Char ch){ public boolean isTargeting( Char ch){
return enemy == ch; return enemy == ch;
} }
@ -808,25 +815,25 @@ public abstract class Mob extends Char {
deferred.prolong( dmg ); deferred.prolong( dmg );
} }
super.damage( dmg, src ); super.damage( dmg, src );
} }
@Override @Override
public void destroy() { public void destroy() {
super.destroy(); super.destroy();
Dungeon.level.mobs.remove( this ); Dungeon.level.mobs.remove( this );
if (Dungeon.hero.isAlive()) { if (Dungeon.hero.isAlive()) {
if (alignment == Alignment.ENEMY) { if (alignment == Alignment.ENEMY) {
Statistics.enemiesSlain++; Statistics.enemiesSlain++;
Badges.validateMonstersSlain(); Badges.validateMonstersSlain();
Statistics.qualifiedForNoKilling = false; Statistics.qualifiedForNoKilling = false;
int exp = Dungeon.hero.lvl <= maxLvl ? EXP : 0; int exp = Dungeon.hero.lvl <= maxLvl ? EXP : 0;
//难度系统 英雄获得的经验 //难度系统 英雄获得的经验
@ -848,7 +855,7 @@ public abstract class Mob extends Char {
} }
} }
} }
@Override @Override
public void die( Object cause ) { public void die( Object cause ) {
@ -897,7 +904,7 @@ public abstract class Mob extends Char {
return lootChance; return lootChance;
} }
public void rollToDropLoot(){ public void rollToDropLoot(){
if (Dungeon.hero.lvl > maxLvl + 2) return; if (Dungeon.hero.lvl > maxLvl + 2) return;
@ -910,7 +917,7 @@ public abstract class Mob extends Char {
} }
} }
} }
//ring of wealth logic //ring of wealth logic
if (Ring.getBuffedBonus(Dungeon.hero, RingOfWealth.Wealth.class) > 0) { if (Ring.getBuffedBonus(Dungeon.hero, RingOfWealth.Wealth.class) > 0) {
int rolls = 1; int rolls = 1;
@ -922,7 +929,7 @@ public abstract class Mob extends Char {
RingOfWealth.showFlareForBonusDrop(sprite); RingOfWealth.showFlareForBonusDrop(sprite);
} }
} }
//lucky enchant logic //lucky enchant logic
if (buff(Lucky.LuckProc.class) != null){ if (buff(Lucky.LuckProc.class) != null){
Dungeon.level.drop(Lucky.genLoot(), pos).sprite.drop(); Dungeon.level.drop(Lucky.genLoot(), pos).sprite.drop();
@ -944,10 +951,10 @@ public abstract class Mob extends Char {
} }
} }
protected Object loot = null; protected Object loot = null;
protected float lootChance = 0; protected float lootChance = 0;
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public Item createLoot() { public Item createLoot() {
Item item; Item item;
@ -971,21 +978,21 @@ public abstract class Mob extends Char {
public float spawningWeight(){ public float spawningWeight(){
return 1; return 1;
} }
public boolean reset() { public boolean reset() {
return false; return false;
} }
public void beckon( int cell ) { public void beckon( int cell ) {
notice(); notice();
if (state != HUNTING && state != FLEEING) { if (state != HUNTING && state != FLEEING) {
state = WANDERING; state = WANDERING;
} }
target = cell; target = cell;
} }
public String description() { public String description() {
return Messages.get(this, "desc"); return Messages.get(this, "desc");
} }
@ -1001,11 +1008,11 @@ public abstract class Mob extends Char {
} }
public void notice() { public void notice() {
if (Dungeon.hero.buff(LockedFloor.class) != null) { if (Dungeon.level.locked) {
BGMPlayer.playBoss(); BGMPlayer.playBoss();
} }
} }
public void yell( String str ) { public void yell( String str ) {
GLog.newLine(); GLog.newLine();
GLog.n( "%s: \"%s\" ", Messages.titleCase(name()), str ); GLog.n( "%s: \"%s\" ", Messages.titleCase(name()), str );
@ -1099,15 +1106,15 @@ public abstract class Mob extends Char {
} }
} }
protected boolean noticeEnemy(){ protected boolean noticeEnemy(){
enemySeen = true; enemySeen = true;
notice(); notice();
alerted = true; alerted = true;
state = HUNTING; state = HUNTING;
target = enemy.pos; target = enemy.pos;
if (alignment == Alignment.ENEMY && Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) { if (alignment == Alignment.ENEMY && Dungeon.isChallenged( Challenges.SWARM_INTELLIGENCE )) {
for (Mob mob : Dungeon.level.mobs) { for (Mob mob : Dungeon.level.mobs) {
if (mob.paralysed <= 0 if (mob.paralysed <= 0
@ -1117,13 +1124,13 @@ public abstract class Mob extends Char {
} }
} }
} }
return true; return true;
} }
protected boolean continueWandering(){ protected boolean continueWandering(){
enemySeen = false; enemySeen = false;
int oldPos = pos; int oldPos = pos;
if (target != -1 && getCloser( target )) { if (target != -1 && getCloser( target )) {
spend( 1 / speed() ); spend( 1 / speed() );
@ -1132,10 +1139,10 @@ public abstract class Mob extends Char {
target = Dungeon.level.randomDestination( Mob.this ); target = Dungeon.level.randomDestination( Mob.this );
spend( TICK ); spend( TICK );
} }
return true; return true;
} }
} }
protected class Hunting implements AiState { protected class Hunting implements AiState {
@ -1164,10 +1171,10 @@ public abstract class Mob extends Char {
spend( TICK ); spend( TICK );
return true; return true;
} }
int oldPos = pos; int oldPos = pos;
if (target != -1 && getCloser( target )) { if (target != -1 && getCloser( target )) {
spend( 1 / speed() ); spend( 1 / speed() );
return moveSprite( oldPos, pos ); return moveSprite( oldPos, pos );
@ -1210,8 +1217,8 @@ public abstract class Mob extends Char {
//loses target when 0-dist rolls a 6 or greater. //loses target when 0-dist rolls a 6 or greater.
if (enemy == null || !enemyInFOV && 1 + Random.Int(Dungeon.level.distance(pos, target)) >= 6){ if (enemy == null || !enemyInFOV && 1 + Random.Int(Dungeon.level.distance(pos, target)) >= 6){
target = -1; target = -1;
//if enemy isn't in FOV, keep running from their previous position. //if enemy isn't in FOV, keep running from their previous position.
} else if (enemyInFOV) { } else if (enemyInFOV) {
target = enemy.pos; target = enemy.pos;
} }
@ -1246,8 +1253,8 @@ public abstract class Mob extends Char {
return true; return true;
} }
} }
private static ArrayList<Mob> heldAllies = new ArrayList<>(); private static ArrayList<Mob> heldAllies = new ArrayList<>();
public static void holdAllies( Level level ){ public static void holdAllies( Level level ){
@ -1262,8 +1269,8 @@ public abstract class Mob extends Char {
((DirectableAlly) mob).clearDefensingPos(); ((DirectableAlly) mob).clearDefensingPos();
level.mobs.remove( mob ); level.mobs.remove( mob );
heldAllies.add(mob); heldAllies.add(mob);
//preserve intelligent allies if they are near the hero //preserve intelligent allies if they are near the hero
} else if (mob.alignment == Alignment.ALLY } else if (mob.alignment == Alignment.ALLY
&& mob.intelligentAlly && mob.intelligentAlly
&& Dungeon.level.distance(holdFromPos, mob.pos) <= 5){ && Dungeon.level.distance(holdFromPos, mob.pos) <= 5){
@ -1279,7 +1286,7 @@ public abstract class Mob extends Char {
public static void restoreAllies( Level level, int pos, int gravitatePos ){ public static void restoreAllies( Level level, int pos, int gravitatePos ){
if (!heldAllies.isEmpty()){ if (!heldAllies.isEmpty()){
ArrayList<Integer> candidatePositions = new ArrayList<>(); ArrayList<Integer> candidatePositions = new ArrayList<>();
for (int i : PathFinder.NEIGHBOURS8) { for (int i : PathFinder.NEIGHBOURS8) {
if (!Dungeon.level.solid[i+pos] && level.findMob(i+pos) == null){ if (!Dungeon.level.solid[i+pos] && level.findMob(i+pos) == null){
@ -1299,11 +1306,11 @@ public abstract class Mob extends Char {
} }
}); });
} }
for (Mob ally : heldAllies) { for (Mob ally : heldAllies) {
level.mobs.add(ally); level.mobs.add(ally);
ally.state = ally.WANDERING; ally.state = ally.WANDERING;
if (!candidatePositions.isEmpty()){ if (!candidatePositions.isEmpty()){
ally.pos = candidatePositions.remove(0); ally.pos = candidatePositions.remove(0);
} else { } else {
@ -1315,12 +1322,12 @@ public abstract class Mob extends Char {
ally.fieldOfView = new boolean[level.length()]; ally.fieldOfView = new boolean[level.length()];
} }
Dungeon.level.updateFieldOfView( ally, ally.fieldOfView ); Dungeon.level.updateFieldOfView( ally, ally.fieldOfView );
} }
} }
heldAllies.clear(); heldAllies.clear();
} }
public static void clearHeldAllies(){ public static void clearHeldAllies(){
heldAllies.clear(); heldAllies.clear();
} }

View File

@ -41,7 +41,7 @@ public class DCrystal extends Mob {
return super.act(); return super.act();
} }
private void onZapComplete(){ public void onZapComplete(){
for (Mob boss : Dungeon.level.mobs.toArray(new Mob[0])) { for (Mob boss : Dungeon.level.mobs.toArray(new Mob[0])) {
//如果宝箱王存在且在五格范围内给予它血量吧 //如果宝箱王存在且在五格范围内给予它血量吧
//困难模式治疗范围改为无限 //困难模式治疗范围改为无限

View File

@ -1,5 +1,6 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel.CryStalPosition; import static com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel.CryStalPosition;
import static com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel.FALSEPosition; import static com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel.FALSEPosition;
@ -65,7 +66,6 @@ import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
import com.watabou.noosa.audio.Music;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.particles.Emitter; import com.watabou.noosa.particles.Emitter;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
@ -773,7 +773,7 @@ public class FireMagicDied extends Mob implements Callback {
super.notice(); super.notice();
BossHealthBar.assignBoss(this); BossHealthBar.assignBoss(this);
Music.INSTANCE.play(Assets.BGM_FRBOSS, true); playBGM(Assets.BGM_FRBOSS, true);
yell( Messages.get(this, "notice") ); yell( Messages.get(this, "notice") );
//summon(); //summon();
} }

View File

@ -1,5 +1,6 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
@ -23,7 +24,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndAutoShop; import com.shatteredpixel.shatteredpixeldungeon.windows.WndAutoShop;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
@ -102,10 +102,10 @@ public class AutoShopReBot extends NPC {
GLog.p(Messages.get(this, "greetings", Dungeon.hero.name())); GLog.p(Messages.get(this, "greetings", Dungeon.hero.name()));
seenBefore = true; seenBefore = true;
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) { } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) {
Music.INSTANCE.play(Assets.TOWN, true); playBGM(Assets.TOWN, true);
seenBefore = false; seenBefore = false;
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) { } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) {
Music.INSTANCE.play(Assets.BGM_2,true); playBGM(Assets.BGM_2,true);
seenBefore = false; seenBefore = false;
} }
throwItem(); throwItem();

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Conducts;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -26,7 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndKingShop; import com.shatteredpixel.shatteredpixeldungeon.windows.WndKingShop;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
@ -70,7 +71,7 @@ public class NullDiedTO extends NTNPC {
public void flee() { public void flee() {
destroy(); destroy();
Dungeon.level.seal(); Dungeon.level.seal();
Music.INSTANCE.play(Assets.BGM_FRBOSS, true); playBGM(Assets.BGM_FRBOSS, true);
GameScene.flash(0x8000FFFF); GameScene.flash(0x8000FFFF);
sprite.killAndErase(); sprite.killAndErase();
CellEmitter.get( pos ).burst(SnowParticle.FACTORY, 6 ); CellEmitter.get( pos ).burst(SnowParticle.FACTORY, 6 );

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Conducts;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -25,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndNyzShop; import com.shatteredpixel.shatteredpixeldungeon.windows.WndNyzShop;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest; import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
import java.util.ArrayList; import java.util.ArrayList;
@ -53,14 +54,14 @@ public class Nyz extends NTNPC {
GLog.p(Messages.get(this, "greetings", Dungeon.hero.name())); GLog.p(Messages.get(this, "greetings", Dungeon.hero.name()));
//TODO 诡异奈亚子 早上好 中午好 晚上好 //TODO 诡异奈亚子 早上好 中午好 晚上好
if(!Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)){ if(!Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)){
Music.INSTANCE.play(Assets.NYZSHOP, true); playBGM(Assets.NYZSHOP, true);
} }
seenBefore = true; seenBefore = true;
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) { } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) {
Music.INSTANCE.play(Assets.TOWN, true); playBGM(Assets.TOWN, true);
seenBefore = false; seenBefore = false;
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) { } else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) {
Music.INSTANCE.play(Assets.BGM_2,true); playBGM(Assets.BGM_2,true);
seenBefore = false; seenBefore = false;
} }
throwItem(); throwItem();

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs; package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer; import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -18,7 +20,6 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem; import com.shatteredpixel.shatteredpixeldungeon.windows.WndTradeItem;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.Callback; import com.watabou.utils.Callback;
public class RenShop extends NPC { public class RenShop extends NPC {
@ -39,7 +40,7 @@ public class RenShop extends NPC {
if (!Dungeon.level.heroFOV[pos]) { if (!Dungeon.level.heroFOV[pos]) {
BGMPlayer.playBGMWithDepth(); BGMPlayer.playBGMWithDepth();
} else { } else {
Music.INSTANCE.play(Assets.Music.RENSHOP, true); playBGM(Assets.Music.RENSHOP, true);
} }
throwItem(); throwItem();

View File

@ -1,12 +1,13 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes; package com.shatteredpixel.shatteredpixeldungeon.scenes;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.ui.Archs; import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndFeedback; import com.shatteredpixel.shatteredpixeldungeon.windows.WndFeedback;
import com.watabou.input.KeyEvent; import com.watabou.input.KeyEvent;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
import com.watabou.noosa.audio.Music;
public class FeedBackScene extends PixelScene { public class FeedBackScene extends PixelScene {
@ -15,7 +16,7 @@ public class FeedBackScene extends PixelScene {
@Override @Override
public void create() { public void create() {
super.create(); super.create();
Music.INSTANCE.play( Assets.Music.SHOP, true ); playBGM( Assets.Music.SHOP, true );
wndFeedback = new WndFeedback(false) { wndFeedback = new WndFeedback(false) {
@Override @Override
public void onBackPressed() { public void onBackPressed() {

View File

@ -1,12 +1,13 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes; package com.shatteredpixel.shatteredpixeldungeon.scenes;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.GameMath; import com.watabou.utils.GameMath;
public class GoScene extends PixelScene { public class GoScene extends PixelScene {
@ -26,7 +27,7 @@ public class GoScene extends PixelScene {
@Override @Override
public void create() { public void create() {
super.create(); super.create();
Music.INSTANCE.play( Assets.Music.GO, true ); playBGM( Assets.Music.GO, true );
if (SPDSettings.splashScreen() < 1 || done) { if (SPDSettings.splashScreen() < 1 || done) {
ShatteredPixelDungeon.switchForceFade(WelcomeScene.class); ShatteredPixelDungeon.switchForceFade(WelcomeScene.class);
return; return;

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes; package com.shatteredpixel.shatteredpixeldungeon.scenes;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress; import com.shatteredpixel.shatteredpixeldungeon.GamesInProgress;
@ -11,7 +13,6 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.watabou.noosa.Camera; import com.watabou.noosa.Camera;
import com.watabou.noosa.Game; import com.watabou.noosa.Game;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Music;
import com.watabou.utils.Random; import com.watabou.utils.Random;
public class JAmuletScene extends PixelScene { public class JAmuletScene extends PixelScene {
@ -28,7 +29,7 @@ public class JAmuletScene extends PixelScene {
@Override @Override
public void create() { public void create() {
super.create(); super.create();
Music.INSTANCE.play( Assets.Music.NBPL, true ); playBGM( Assets.Music.NBPL, true );
RenderedTextBlock text = null; RenderedTextBlock text = null;
if (!noText) { if (!noText) {
text = renderTextBlock( Messages.get(this, "text"), 8 ); text = renderTextBlock( Messages.get(this, "text"), 8 );

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.scenes; package com.shatteredpixel.shatteredpixeldungeon.scenes;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Chrome; import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon; import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
@ -18,7 +20,6 @@ import com.watabou.noosa.Game;
import com.watabou.noosa.Image; import com.watabou.noosa.Image;
import com.watabou.noosa.NinePatch; import com.watabou.noosa.NinePatch;
import com.watabou.noosa.PointerArea; import com.watabou.noosa.PointerArea;
import com.watabou.noosa.audio.Music;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.ui.Component; import com.watabou.noosa.ui.Component;
@ -30,7 +31,7 @@ public class SPSLScene extends PixelScene {
@Override @Override
public void create() { public void create() {
super.create(); super.create();
Music.INSTANCE.play( Assets.Music.SHOP, true ); playBGM( Assets.Music.SHOP, true );
final float colWidth = Camera.main.width / (landscape() ? 2 : 1); final float colWidth = Camera.main.width / (landscape() ? 2 : 1);
final float colTop = (Camera.main.height / 2) - (landscape() ? 30 : 90); final float colTop = (Camera.main.height / 2) - (landscape() ? 30 : 90);
final float colOffset = landscape() ? colWidth : 0; final float colOffset = landscape() ? colWidth : 0;

View File

@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.EmoIcon;
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText; import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
import com.shatteredpixel.shatteredpixeldungeon.effects.IceBlock; import com.shatteredpixel.shatteredpixeldungeon.effects.IceBlock;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.effects.RoseHalo; import com.shatteredpixel.shatteredpixeldungeon.effects.RoseHalo;
import com.shatteredpixel.shatteredpixeldungeon.effects.ShieldHalo; import com.shatteredpixel.shatteredpixeldungeon.effects.ShieldHalo;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
@ -94,6 +95,24 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip
} }
private int stunStates = 0; private int stunStates = 0;
public void zaplink( int cell ) {
turnTo( ch.pos , cell );
play( attack );
MagicMissile.boltFromChar( parent,
MagicMissile.SHAMAN_BLUE,
this,
cell,
new Callback() {
@Override
public void call() {
((Mob)ch).onZapComplete();
}
} );
Sample.INSTANCE.play( Assets.Sounds.ZAP );
}
protected Animation idle; protected Animation idle;
protected Animation run; protected Animation run;
protected Animation attack; protected Animation attack;

View File

@ -104,6 +104,8 @@ public enum Icons {
DEPTH_SECRETS, DEPTH_SECRETS,
CHAL_COUNT, CHAL_COUNT,
HAPPY_ICON,
//icons that appear in the about screen, variable spacing //icons that appear in the about screen, variable spacing
LIBGDX, LIBGDX,
ALEKS, ALEKS,
@ -334,6 +336,9 @@ public enum Icons {
case CHAL_COUNT: case CHAL_COUNT:
icon.frame( icon.texture.uvRectBySize( 48, 72, 7, 7 ) ); icon.frame( icon.texture.uvRectBySize( 48, 72, 7, 7 ) );
break; break;
case HAPPY_ICON:
icon.frame( icon.texture.uvRectBySize( 56, 72, 7, 5 ) );
break;
case LIBGDX: case LIBGDX:
icon.frame( icon.texture.uvRectBySize( 0, 96, 16, 13 ) ); icon.frame( icon.texture.uvRectBySize( 0, 96, 16, 13 ) );

View File

@ -27,6 +27,7 @@ import static com.shatteredpixel.shatteredpixeldungeon.ui.Window.RED_COLOR;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Challenges; import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Conducts;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.SPDAction; import com.shatteredpixel.shatteredpixeldungeon.SPDAction;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
@ -57,8 +58,10 @@ public class MenuPane extends Component {
private Button depthButton; private Button depthButton;
private Image challengeIcon; private Image challengeIcon;
private Image gameHappyIcon;
private BitmapText challengeText; private BitmapText challengeText;
private Button challengeButton; private Button challengeButton;
private Button gameHappyIconButton;
private JournalButton btnJournal; private JournalButton btnJournal;
private MenuButton btnMenu; private MenuButton btnMenu;
@ -165,6 +168,18 @@ public class MenuPane extends Component {
add(challengeButton); add(challengeButton);
} }
if (!Dungeon.isDLC(Conducts.Conduct.NULL)){
gameHappyIcon = Icons.get(Icons.HAPPY_ICON);
add(gameHappyIcon);
gameHappyIconButton = new Button(){
@Override
protected void onClick() {
//
}
};
add(gameHappyIconButton);
}
btnJournal = new JournalButton(); btnJournal = new JournalButton();
add( btnJournal ); add( btnJournal );
@ -218,6 +233,15 @@ public class MenuPane extends Component {
challengeButton.setRect(challengeIcon.x, challengeIcon.y, challengeIcon.width(), challengeIcon.height() + challengeText.height()); challengeButton.setRect(challengeIcon.x, challengeIcon.y, challengeIcon.width(), challengeIcon.height() + challengeText.height());
} }
if (gameHappyIcon != null){
gameHappyIcon.x = btnJournal.left() - 20 + (7 - gameHappyIcon.width())/2f - 0.1f;
gameHappyIcon.y = y + 1;
if (SPDSettings.interfaceSize() == 0) gameHappyIcon.y++;
PixelScene.align(gameHappyIcon);
gameHappyIconButton.setRect(gameHappyIcon.x, gameHappyIcon.y, gameHappyIcon.width(), gameHappyIcon.height());
}
version.scale.set(PixelScene.align(0.5f)); version.scale.set(PixelScene.align(0.5f));
version.measure(); version.measure();
version.x = x + WIDTH - version.width(); version.x = x + WIDTH - version.width();

View File

@ -54,6 +54,8 @@ import java.util.ArrayList;
public class vM0_6_7_X_Changes { public class vM0_6_7_X_Changes {
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) { public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
add_v0_6_48_Changes(changeInfos);
add_v0_6_47_Changes(changeInfos);
add_v0_6_46_Changes(changeInfos); add_v0_6_46_Changes(changeInfos);
add_v0_6_45_Changes(changeInfos); add_v0_6_45_Changes(changeInfos);
add_v0_6_44_Changes(changeInfos); add_v0_6_44_Changes(changeInfos);
@ -103,6 +105,55 @@ public class vM0_6_7_X_Changes {
add_v0_6_0_Changes(changeInfos); add_v0_6_0_Changes(changeInfos);
} }
public static void add_v0_6_48_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.6", 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), ("基因突变改进"),
("现在所有特殊敌人刷新权重一致")));
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_06X76")));
}
public static void add_v0_6_47_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.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(Icons.get(Icons.CHALLENGE_ON), ("基因突变新种类"),
("突变酸液体,敌人获得远程攻击,并且更加危险。")));
changes = new ChangeInfo("平衡", false, null);
changes.hardlight(Window.RED_COLOR);
changeInfos.add(changes);
changes.addButton(new ChangeButton(new BruteBotSprite(), ("重甲豺狼"),
("削弱重甲豺狼的属性")));
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_06X75")));
}
public static void add_v0_6_46_Changes( ArrayList<ChangeInfo> changeInfos ) { public static void add_v0_6_46_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.0", true, ""); ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.0", true, "");
changes.hardlight(Window.TITLE_COLOR); changes.hardlight(Window.TITLE_COLOR);
@ -112,6 +163,9 @@ public class vM0_6_7_X_Changes {
changes.hardlight(Window.GREEN_COLOR); changes.hardlight(Window.GREEN_COLOR);
changeInfos.add(changes); changeInfos.add(changes);
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.BLACKBOOK), ("人物背景"),
("四大角色的人物背景已初步加入,后续会进行文案优化。")));
changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("新徽章:豺狼的复仇"), changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("新徽章:豺狼的复仇"),
("别惹它们,我是说真的-----已逝去的冒险者"))); ("别惹它们,我是说真的-----已逝去的冒险者")));
@ -478,21 +532,21 @@ public class vM0_6_7_X_Changes {
issxsaxs.scale.set(PixelScene.align(0.8f)); issxsaxs.scale.set(PixelScene.align(0.8f));
changes.addButton(new ChangeButton(issxsaxs, ("精英刷怪机制调整"), changes.addButton(new ChangeButton(issxsaxs, ("精英刷怪机制调整"),
("在原有基础上修改以下精英怪:\n" + ("在原有基础上修改以下精英怪:\n" +
"魔像---》冰魔像 精英\n" + "魔像---》冰魔像 精英\n" +
"监狱守卫---》赏金猎人 精英\n"+ "监狱守卫---》赏金猎人 精英\n"+
"洞穴蜘蛛---》豺狼炼药长老 精英\n" + "洞穴蜘蛛---》豺狼炼药长老 精英\n" +
"红色怨灵---》血月火把猎人 精英\n\n" + "红色怨灵---》血月火把猎人 精英\n\n" +
"同时现阶段有关于上面的正常刷怪被移除,也就是说冰魔像他们不再是常规刷新了。"))); "同时现阶段有关于上面的正常刷怪被移除,也就是说冰魔像他们不再是常规刷新了。")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.REDDRAGON), "核子可乐回归", changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.REDDRAGON), "核子可乐回归",
"核子可乐现在回归正常模式,且仅在困难难度前获得,并且效果有所减弱。")); "核子可乐现在回归正常模式,且仅在困难难度前获得,并且效果有所减弱。"));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), "部分灯火Buff调整", changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.LANTERNB), "部分灯火Buff调整",
"部分灯火buff都进行了一定的调整\n" + "部分灯火buff都进行了一定的调整\n" +
"1.纯洁的祝福--前路\n调整回血效果减半\n\n" + "1.纯洁的祝福--前路\n调整回血效果减半\n\n" +
"2.魔女的低语--无力\n调整效果持续期间力量从-3调整至-1\n\n" + "2.魔女的低语--无力\n调整效果持续期间力量从-3调整至-1\n\n" +
"3.纯洁的祝福--安息\n调整物理伤害从x2调整至x1.5\n\n" + "3.纯洁的祝福--安息\n调整物理伤害从x2调整至x1.5\n\n" +
"4.纯洁的祝福--守护\n调整效果持续期间每150回合获得一些护盾")); "4.纯洁的祝福--守护\n调整效果持续期间每150回合获得一些护盾"));
changes = new ChangeInfo("改动", false, null); changes = new ChangeInfo("改动", false, null);
changes.hardlight(Window.CYELLOW); changes.hardlight(Window.CYELLOW);
@ -756,7 +810,7 @@ public class vM0_6_7_X_Changes {
changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16), changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16),
Messages.get(ChangesScene.class, Messages.get(ChangesScene.class,
"bugfixes"), "bugfixes"),
("1.快捷栏翻转修复\n2.修复新生火元素无法被冰冻类buff秒杀的问题\n3.修复深蓝蝾螈会让幽灵任务错误完成的问题\n4.修复元素风暴特效错误问题"))); ("1.快捷栏翻转修复\n2.修复新生火元素无法被冰冻类buff秒杀的问题\n3.修复深蓝蝾螈会让幽灵任务错误完成的问题\n4.修复元素风暴特效错误问题")));
} }
@ -931,7 +985,7 @@ public class vM0_6_7_X_Changes {
Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X50"))); Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X50")));
} }
public static void add_v0_6_21_Changes( ArrayList<ChangeInfo> changeInfos ) { public static void add_v0_6_21_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.0.0-Beta21-p2.950", true, ""); ChangeInfo changes = new ChangeInfo("v0.6.0.0-Beta21-p2.950", true, "");
@ -943,8 +997,8 @@ public class vM0_6_7_X_Changes {
changeInfos.add(changes); changeInfos.add(changes);
changes.addButton(new ChangeButton(new Image("ADE.png", 0, 0, 32, 32), changes.addButton(new ChangeButton(new Image("ADE.png", 0, 0, 32, 32),
("ADE环境部署成功"), ("ADE环境部署成功"),
("AndroidIDE+AIDE综合部署现在作者可以手机/电脑协同开发也可以避免部分时候遇到一些重大bug没有代码而难以处理的问题"))); ("AndroidIDE+AIDE综合部署现在作者可以手机/电脑协同开发也可以避免部分时候遇到一些重大bug没有代码而难以处理的问题")));
changes = new ChangeInfo("调整", false, null); changes = new ChangeInfo("调整", false, null);
changes.hardlight(Window.CBLACK); changes.hardlight(Window.CBLACK);
@ -952,7 +1006,7 @@ public class vM0_6_7_X_Changes {
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ICEFISHSWORD), ("尚方宝剑"), changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ICEFISHSWORD), ("尚方宝剑"),
("尚方宝剑现在力量初始为16但是必定获得一个随机诅咒商人对它的价值提升" ))); ("尚方宝剑现在力量初始为16但是必定获得一个随机诅咒商人对它的价值提升" )));
} }
public static void add_v0_6_20_Changes(ArrayList<ChangeInfo> changeInfos) { public static void add_v0_6_20_Changes(ArrayList<ChangeInfo> changeInfos) {

View File

@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.windows; package com.shatteredpixel.shatteredpixeldungeon.windows;
import static com.shatteredpixel.shatteredpixeldungeon.BGMPlayer.playBGM;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.items.Generator.randomArtifact; import static com.shatteredpixel.shatteredpixeldungeon.items.Generator.randomArtifact;
@ -49,7 +50,6 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.NinePatch; import com.watabou.noosa.NinePatch;
import com.watabou.noosa.audio.Music;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.ui.Component; import com.watabou.noosa.ui.Component;
@ -202,7 +202,7 @@ public class WndRedDragon extends Window {
Buff.affect(hero, Bleeding.class).set(8); Buff.affect(hero, Bleeding.class).set(8);
Buff.prolong(hero, Blindness.class, Degrade.DURATION); Buff.prolong(hero, Blindness.class, Degrade.DURATION);
Buff.prolong(hero, Cripple.class, Cripple.DURATION); Buff.prolong(hero, Cripple.class, Cripple.DURATION);
Music.INSTANCE.play(Assets.RUN, true); playBGM(Assets.RUN, true);
} }
} }

View File

@ -0,0 +1,4 @@
package com.shatteredpixel.shatteredpixeldungeon.services.analytics;
public class Analytics {
}