update beta p2.9
This commit is contained in:
parent
5125f9032f
commit
73a4a79910
|
@ -84,7 +84,6 @@ public class AndroidGame extends AndroidApplication {
|
|||
// Note that we use a different prefs name on android for legacy purposes,
|
||||
// this is the default prefs filename given to an android app (.xml is automatically added to it)
|
||||
SPDSettings.set(instance.getPreferences("ShatteredPixelDungeon"));
|
||||
|
||||
//UCEHandler.Builder builder = new UCEHandler.Builder(this);
|
||||
//builder.build();
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ public class AndroidLauncher extends Activity {
|
|||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
try {
|
||||
GdxNativesLoader.load();
|
||||
FreeType.initFreeType();
|
||||
|
|
|
@ -16,8 +16,8 @@ allprojects {
|
|||
appName = 'Magic Ling Pixel Dungeon'
|
||||
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
|
||||
|
||||
appVersionCode =700723
|
||||
appVersionName = '0.6.0.0-Beta21-p2.880'
|
||||
appVersionCode =700726
|
||||
appVersionName = '0.6.0.0-Beta21-p2.900'
|
||||
|
||||
appJavaCompatibility = JavaVersion.VERSION_1_8
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 25 KiB |
|
@ -6,6 +6,14 @@ text.herostat.item_wnd_cursed = 诅咒的
|
|||
text.herostat.item_basic = 常规:
|
||||
text.herostat.item_enter = 查看物品生成
|
||||
|
||||
actors.buffs.autorandombuff.name=?
|
||||
actors.buffs.autorandombuff.desc=还有:%s回合。
|
||||
|
||||
actors.mobs.npcs.autoshoprebot.desc=一款可以售卖食物的自动售货机,但似乎已经年久失修,每次购买东西都会减少它的使用寿命。
|
||||
actors.mobs.npcs.autoshoprebot.greetings=自动食物售货机:侦测到附近有生命气息,系统开始初始化……
|
||||
actors.mobs.npcs.autoshoprebot.name=自动食物售货机
|
||||
|
||||
|
||||
actors.buffs.invisibilityring.name=
|
||||
actors.buffs.invisibilityring.desc=你和周围的地形完全融为一体,使你不可能被看到。同时,你将每10回合回复1滴血 \n\n当你在虚隐时敌人无法追踪或攻击你。大部分物理攻击和魔法(比如卷轴和法杖)会立即解除虚隐效果。 \n\n剩余的虚隐效果时长:%s回合
|
||||
|
||||
|
@ -639,6 +647,7 @@ actors.mobs.slimeking.arise=我的史莱姆守卫们,快点出来支援本王
|
|||
actors.mobs.slimeking.rankings_desc=在史莱姆王子面前屈服
|
||||
actors.mobs.slimeking.scorpion=朕叫你走了吗?
|
||||
actors.mobs.slimeking$hunting.cus=不自量力的小鬼,让你见识下绝对审判!
|
||||
actors.mobs.slimeking.fuck=你算什么东西?!
|
||||
|
||||
actors.mobs.xykl.name =红魔守卫
|
||||
actors.mobs.xykl.desc =这些若隐若现的傀儡是曾经的水晶之城的守卫,因为你的执着,他们现在与你并肩作战。\n现在你是他们的新主人,他们将誓死守卫你到消亡!
|
||||
|
@ -851,6 +860,24 @@ actors.buffs.championenemy$growing.desc=成长精英拥有会稳步增长的额
|
|||
actors.buffs.championenemy$halo.name=鬼磷精英
|
||||
actors.buffs.championenemy$halo.desc=鬼磷精英造成 15% 额外近战伤害,会使用更强大的磷火点燃攻击目标,免疫火焰,免疫磷火。
|
||||
|
||||
actors.buffs.championenemy.warn2=杀戮与不祥之意笼罩在整个地牢之中……
|
||||
|
||||
actors.buffs.championenemy$small.name=突变失败体
|
||||
actors.buffs.championenemy$small.desc=移速提升1.3倍,攻击降低35%。\n\n突变失败体的命运通常是很悲惨的,他们最后可能被同类相食,或者在再突变的道路中因为体力不支而彻底离开世界……
|
||||
|
||||
actors.buffs.championenemy$bomber.name=突变爆炸体
|
||||
actors.buffs.championenemy$bomber.desc=移速减少50%,攻击力降低30%,死亡造成大量爆炸伤害,需要小心应对。\n\n突变爆炸体生来就是为了爆炸,它们被神秘力量腐蚀,因此爆炸伤害极为强力。
|
||||
|
||||
actors.buffs.championenemy$middle.name=突变完全体
|
||||
actors.buffs.championenemy$middle.desc=移速和攻击力各提高25%,且拥有30%伤害减免\n\n突变完全体似乎看起来没有缺点,但问题在于,一些个体的成功并不意味着我们能与她抗衡……
|
||||
|
||||
actors.buffs.championenemy$big.name=突变危险体
|
||||
actors.buffs.championenemy$big.desc=攻击力提升20%,攻击有20%概率造成流血。死亡时有5%概率立刻向本层发出警报。\n\n突变危险体就和他的名字一样,充满了危机感,在这里遇到它必不是什么好事……。建议还是绕道而行吧。
|
||||
|
||||
actors.buffs.championenemy$longsider.name=突变烟雾体
|
||||
actors.buffs.championenemy$longsider.desc=攻击力减少10%,攻击范围+2,攻击敌人10%概率造成眩晕……\n\n突变烟雾体喜好在远处骚扰敌人,他就像烟雾一样来无影去无踪……
|
||||
|
||||
|
||||
actors.buffs.charm.name=魅惑
|
||||
actors.buffs.charm.heromsg=你被魅惑了!
|
||||
actors.buffs.charm.desc=魅惑是一种能让一对夙敌暂时陷入互相倾慕的控制类魔法。\n\n被魅惑的单位将无法对魅惑施行者进行直接攻击,但依然可以攻击其他敌人。伤痛会激醒被魅惑单位,减少魅惑状态的持续时间。\n\n魅惑剩余持续时间:%s回合。
|
||||
|
|
|
@ -44,6 +44,13 @@ items.food.lightfood.name=闪电饭团
|
|||
items.food.lightfood.eat_msg=这个食物的味道棒极了!
|
||||
items.food.lightfood.desc=闪电饭团是冻肉和闪电种子加上口粮的综合产物。不仅可以使英雄获得治疗,还能立刻回满饥饿值,同时还能获得饭团的雷霆祝福。
|
||||
|
||||
items.food.cake.name=草莓奶油蛋糕
|
||||
items.food.cake.eat_good=这个食物的能量激发了你的潜能,你的力量+1!
|
||||
items.food.cake.desc=蛋糕是地牢中最稀有的食物,吃掉它可以立刻清除所有负面效果,并且会让你充满活力,蛋糕还能有极小的概率激发你的潜能……
|
||||
|
||||
items.food.switch.name=魔法三明治
|
||||
items.food.switch.desc=三明治可以迅速让你横扫饥饿,并且获得一定的奥术护盾,缺点就是吃了它后再吃其他东西可能会感觉口味没它好。
|
||||
|
||||
items.weapon.missiles.darts.halodart.name=磷焰飞镖
|
||||
items.weapon.missiles.darts.halodart.desc=这些飞镖上涂着一种由磷焰花制成的药物,命中后会燃起磷焰。
|
||||
|
||||
|
@ -1780,7 +1787,7 @@ items.weapon.melee.flail.desc=铁链上附着的一个带刺的钢球。笨重
|
|||
items.weapon.melee.gauntlet.name=碧灰双刃
|
||||
items.weapon.melee.gauntlet.typical_stats_desc=这件武器通常能格挡0~%d点伤害。通过升级可以使格挡量增长。
|
||||
items.weapon.melee.gauntlet.stats_desc=这是一套极快的武器。\n\n这件武器通常能格挡0~%d点伤害。通过升级可以使格挡量增长。
|
||||
items.weapon.melee.gauntlet.desc=碧绿的宝石加上纯黑的宝石再加上Δ矮人工匠—Mr.LunRes的Δ鬼斧神工,造就了这个无与伦比的产物。它可以在攻击的时候有几率对敌人造成Γ燃烧Γ效果,但同时会让攻击者Γ获得5回合的残废Γ效果。不过,这个Δ武器的潜能Δ无比强大,因此它Δ需要的力量Δ也更加强大。
|
||||
items.weapon.melee.gauntlet.desc=碧绿的宝石加上纯黑的宝石再加上Δ矮人工匠—Mr.LunRes的Δ鬼斧神工,造就了这个无与伦比的产物。它可以在攻击的时候有几率对敌人造成Γ鬼磷燃烧Γ效果,但同时会让攻击者有概率Γ获得3回合的眩晕Γ效果。不过,这个Δ武器的潜能Δ无比强大,因此它Δ需要的力量Δ也更加强大。如果武器等级+3以上,则没有反噬效果。
|
||||
|
||||
items.weapon.melee.glaive.name=关刀
|
||||
items.weapon.melee.glaive.stats_desc=这是一件相当缓慢的武器。\n这把武器有额外的攻击距离。
|
||||
|
@ -1871,7 +1878,7 @@ items.weapon.melee.sword.desc=平衡性良好的剑。不算太大,但是依
|
|||
|
||||
items.weapon.melee.warhammer.name=白金真银战锤大剑
|
||||
items.weapon.melee.warhammer.stats_desc=这是一把十分精准的武器但攻速较慢。\n\n注意:_恐惧过程中再次攻击敌人会激怒敌人,从而失效_。
|
||||
items.weapon.melee.warhammer.desc=外表看起来像_大剑_,实质却是被Γ地牢的魔法Γ扭曲成这个样子。\n\n别看它看起来威力不大,实际上非常危险。\n\n它可以使在攻击的过程可能对Δ敌人造成恐惧+眩晕Δ效果。\n\n但同时,攻击方会被Γ战锤大剑Γ反噬,每次成功对敌人造成效果后Γ获得5回合易伤Γ效果。
|
||||
items.weapon.melee.warhammer.desc=外表看起来像_大剑_,实质却是被Γ地牢的魔法Γ扭曲成这个样子。\n\n别看它看起来威力不大,实际上非常危险。\n\n它可以使在攻击的过程可能对Δ敌人造成恐惧+眩晕+燃烧Δ效果。随着武器等级上升,效果会更强。\n\n但同时,攻击方会被Γ战锤大剑Γ有概率反噬,每次成功对敌人造成效果后Γ获得6回合易伤Γ效果。如果武器等级+3以上,则没有反噬效果。
|
||||
|
||||
items.weapon.melee.whip.name=冰霜长剑
|
||||
items.weapon.melee.whip.stats_desc=这把武器拥有_惊人的攻击距离_并且可能对_敌人造成冻伤效果_。
|
||||
|
|
|
@ -77,7 +77,7 @@ badges$badge.halofire_died=死于磷火烈焰
|
|||
badges$badge.happy_end=幸福结局
|
||||
badges$badge.champion_1x=开启1项挑战通关
|
||||
badges$badge.kill_slmking=击杀史莱姆王子
|
||||
badges$badge.big_x=巨人之殇\n\n突变巨兽开启通关!你已克服许多困难!!!\n\n_奖励:0层随机护甲(四大基座上)_
|
||||
badges$badge.big_x=突变风波\n\n基因突变开启通关!你见证了地牢的突变体,同时也看见了玩火必自焚的道理……\n\n_奖励:0层随机护甲(四大基座上)_
|
||||
badges$badge.exsg=大症若愚\n\n癔症只是一个假象,你仍然坚持过来了!\n\n_奖励:1500初始金币,两个经验药水_
|
||||
badges$badge.kill_dm720=击杀DM720\n\n矿洞的终极兵器\n\n_奖励:0层额外十字架(四大基座上,与冰雪魔女不叠加)_
|
||||
badges$badge.champion_2x=地牢勇者\n\n_开启3项以上挑战通关\n\n[不包含BR模式和开发者模式]_
|
||||
|
@ -117,7 +117,7 @@ challenges.aquaphobia_desc=你已经尝试了被水神祝福后的逍遥自在
|
|||
challenges.champion_enemies=_精英战场_
|
||||
challenges.champion_enemies_desc=会升级的不止你一个!\n\n・普通敌人刷出时有 1/8 \
|
||||
的机率拥有特殊的精英属性。\n・精英敌人刷出时会立即醒来。\n・精英敌人免疫腐化效果。\n\n精英敌人有七种:\n_烈焰(橙色):_ 近战伤害 \
|
||||
+25% 且带有点燃效果,免疫火焰,死亡时引燃周围。\n_索敌(紫色):_ 近战伤害 +25%,近战范围 +8。\n_敌法(绿色):_ 受到伤害 -25%,拥有魔法免疫。\n_巨型(蓝色):_ 受到伤害 -75%,近战范围 +1,无法进入门与过道。\n_祝福(黄色):_ 精准与躲避 +200%。\n_成长(红色):_ 精准、躲避、攻击伤害与有效生命值 +20%。每过 3 回合会再增长 1%。\n_鬼磷(天蓝色):_ 近战伤害 +15% 且带有磷火效果,免疫火焰与磷火。
|
||||
+25% 且带有点燃效果,免疫火焰,死亡时引燃周围。\n_索敌(紫色):_ 近战伤害 +25%,近战范围 +4。\n_敌法(绿色):_ 受到伤害 -25%,拥有魔法免疫。\n_巨型(蓝色):_ 受到伤害 -75%,近战范围 +1,无法进入门与过道。\n_祝福(黄色):_ 精准与躲避 +200%。\n_成长(红色):_ 精准、躲避、攻击伤害与有效生命值 +20%。每过 3 回合会再增长 1%。\n_鬼磷(天蓝色):_ 近战伤害 +15% 且带有磷火效果,免疫火焰与磷火。
|
||||
challenges.stronger_bosses=Π梦魇Boss
|
||||
challenges.stronger_bosses_desc=这项挑战让挑战 Boss 变得更有挑战性了!\n\n_粘咕:_生命值 +20%\n_-_ 水中恢复量增长,每回合恢复 3 点生命\n_-_ 爆发攻击蓄力时间由 2 回合缩短至 1 回合\n_天狗:_生命 +25%\n_-_ 第一阶段:陷阱更加致命\n_-_ 第二阶段:技能频率更高\n_钻石宝箱王_: 生命+20%\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=你受到了来自水的伤害!
|
||||
|
@ -128,11 +128,11 @@ challenges.hard = 梦境之声-T2挑战
|
|||
challenges.warning = 寻觅之声-T3挑战
|
||||
challenges.test = 测试时间-DEBUG
|
||||
challenges.rlpt = Π支离破碎Π
|
||||
challenges.rlpt_desc=地牢的魔力正在不断侵蚀这里,现实不过只是一场噩梦。\n\n击败第五层Boss后所有怪物楼层全部随机!!!Boss则固定刷新,并且不会出现冰女那些阴间Boss\n\n特殊说明:没有任务类型NPC!\n\n启用本挑战,你开局可以额外获得1个十字架。
|
||||
challenges.sbsg = Π突变巨兽Π
|
||||
challenges.sbsg_desc=人类回想起了,被怪物支配的恐惧\n-所有生物都会突变激素变得更大,但一些因为一些其他不良反应原因会变得更小。\n-生物的大小决定了他们的移动速度、防御、闪避和近战伤害。\n-同时,如果怪物失去了你的视野,他将变回去,属性也会和无挑一样。
|
||||
challenges.rlpt_desc=地下涌动的神秘力量正在渐渐腐蚀这里,这里不过是而言是另一场噩梦。\n\n从第六层开始,怪物必定有几个不是本大层的怪物,但不会超过两级。一般来说,在监狱遇到矮人层的怪物几率很小。通常遇到矿洞层的怪物。
|
||||
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_特别说明:如果开启精英强敌,则属于EX模式,词条会和精英词条共存_
|
||||
challenges.exsg = Π药水癔症Π
|
||||
challenges.exsg_desc=药水癔症详细规则:\n力量药水 力量-1\n灵视药剂 喝后失明5回合\n隐形药剂 喝后立刻怒吼\n经验药剂 喝后立刻流血6回合\n极速药剂 喝后立刻残废8回合\n==========================\n小型口粮 吃后立刻获得极速8回合\n炖肉 吃后立刻升级\n冷冻生肉片 吃后获得奥术护盾\n全肉大饼 吃后立刻获得8回合极速 且+1力量\n不知道何种原因,大部分正面药水你都感觉有毒!\n部分药水完全处于DeBuff,但食物却会很有用!\n恐药异症的效果同样存在
|
||||
challenges.exsg_desc=药水癔症详细规则:\n力量药水 力量-1\n灵视药剂 喝后失明5回合\n隐形药剂 喝后立刻怒吼\n经验药剂 喝后立刻流血6回合\n极速药剂 喝后立刻残废8回合\n==========================\n小型口粮 吃后立刻获得极速8回合\n炖肉 吃后立刻升级\n冷冻生肉片 吃后获得奥术护盾\n全肉大饼 吃后立刻获得8回合极速 且+1力量\n不知道何种原因,大部分正面药水你都感觉有毒!\n部分药水完全处于DeBuff,但食物却会很有用!而且地牢里面还会追加自动售货机,会售卖一些更加高级的东西。
|
||||
challenges.light&black = Π空洞旅程Π
|
||||
challenges.light&black_desc=\n_一次次的踏入地牢只会使自己更加的被恶毒的魔法侵蚀。_这一次,你已不知道是何时再来到这个地牢,但邪恶的诡异气氛扑面而来。一个神秘人给了你一个提灯。你却不知道何时会被这里的魔法吞噬。\n\n开启本挑战,将会获得在开局获得特殊理智Buff,并且追加一个新道具_提灯_,提灯的精神力量需要玩家击败敌人获得。\n\n_只有光芒中,你才能活下去。否则,你会被黑暗蚕食,一点点的丧失理智,成为怪物。_\n\n详情请看更新记录
|
||||
|
||||
|
@ -140,15 +140,8 @@ challenges.custom = 自定义功能
|
|||
challenges.dhxd =_灯火前路_
|
||||
challenges.dhxd_desc= 灯火指引着前进的道路,提灯引路,灯火前行![此为三挑以上的特殊机制,但你也可以直接开启它!]
|
||||
|
||||
challenges.fixed = 游戏维护
|
||||
challenges.bug =_BUG修复(实验功能)_
|
||||
challenges.bug_desc= 实验性功能,每次游戏更新后如果有旧存档需要同步的可修复型Bug将会自我修复(让英雄行走一回合即可)。
|
||||
|
||||
dlc.bossrush=首领对决
|
||||
dlc.bossrush_desc=被你击败过多次的首领们熟识了英雄的技能,并掌握了一定的对策。它们盘踞在地牢中,等待复仇的时机。\n你不知道这次又会有怎样的危机需要应对。\n但你感觉到这次的冒险绝对与其他时期有所不同。\n开启本挑战时支离破碎和缩餐节食将无法生成与使用。
|
||||
|
||||
dlc.back_go=逆流而上
|
||||
dlc.back_go_desc=颠倒的一次的冒险,你能顺利离开这里吗?5大固定Boss则是在最终楼层出现。
|
||||
|
||||
kill=\n_冰雪魔女:_\n_-_生命+25%\n_-_ 水中召唤的仆从更多\n-击败时必定掉落紫金宝石护符\n_矮人大师:_\n_-_ 致命技能更加频繁\n_-_ 生命值+50%\n-击败时必定掉落自然神圣护符\n_史莱姆王:_\n_-_ 生命值+100%\n_-_ 伤害更高,速度更快\n_-_ 在开局额外召唤豺狼诡术师,巨钳螃蟹,腐臭老鼠,蚀化史莱姆\n_-_ 击败时必定掉落凝胶手套\n_DM720:_\n_-_ 获得全新技能\n_-_ 击败时必定掉落DM150控制终端[尚未完成]
|
||||
|
||||
|
|
|
@ -479,4 +479,6 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x34=-P2.7\n1.修复了火焰特效遗
|
|||
|
||||
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x35=-P2.875\n1.修复了回溯之书的快捷使用错误\n2.修复了自定义名称的缓存问题\n3.删除不必要的赘余代码\n4.元素风暴现在可以工作,但特效有一些Bug,因此视觉效果不会出现\n5.删除WIP的东西\n6.英雄选择界面优化
|
||||
|
||||
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x36=-P2.9\n1.修复史莱姆王可能崩溃游戏的问题\n2.修复一些其他的弱性错误
|
||||
|
||||
//ui.changelist.mlpd.vm0_5_x_changes.xxx//
|
|
@ -2,6 +2,15 @@ windows.textchallenges.seed_custom_title = 种子
|
|||
windows.textchallenges.hint = 不输入即为随机种子
|
||||
windows.textchallenges.delete_seed_input = 清除
|
||||
|
||||
windows.wndsettings$extendtab.fpsdisplay=显示帧率
|
||||
|
||||
windows.wndautoshop.welcome=自动食品售货机
|
||||
windows.wndautoshop.xwelcome=欢迎……客人……,请……自行……挑选购买……,全场_200_金币。
|
||||
windows.wndautoshop.buy=购买物品
|
||||
windows.wndautoshop.cancel=取消购买
|
||||
windows.wndautoshop.nomoney=金钱……不足,购买……失败……
|
||||
windows.wndautoshop.maxbuy=程序……异常,自动……关机……
|
||||
|
||||
windows.wndstory.normoal=命运似乎不在你的掌控之中,魔女似乎也对你不是很感兴趣,风平浪静,一切如旧。
|
||||
windows.wndstory.bad=灯火摇摆不定,某位魔女的低语将影响你这一大层的旅途!
|
||||
windows.wndstory.good=灯火光彩夺目,提灯中的信仰诞生出一种纯洁的祝福!
|
||||
|
|
BIN
core/src/main/assets/sprites/npc/autoshop.png
Normal file
BIN
core/src/main/assets/sprites/npc/autoshop.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 618 B |
|
@ -279,6 +279,8 @@ public class Assets {
|
|||
//NPCS
|
||||
public static final String KEEPERKING = "sprites/npc/ShopKing.png";
|
||||
|
||||
public static final String KEEPERKINGBOT = "sprites/npc/autoshop.png";
|
||||
|
||||
//BOSS
|
||||
public static final String DIED = "sprites/items/died.png";
|
||||
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.RLPT;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass.ROGUE;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
|
@ -105,6 +104,7 @@ public class Dungeon {
|
|||
public static int nyzbuy;
|
||||
public static int boss;
|
||||
|
||||
|
||||
//雪凛峡谷A
|
||||
public static Level ColdFlowerCanyon(){
|
||||
|
||||
|
@ -236,6 +236,7 @@ public class Dungeon {
|
|||
|
||||
public static int challenges;
|
||||
public static int mobsToChampion;
|
||||
public static int mobsToStateLing;
|
||||
|
||||
public static Hero hero;
|
||||
public static Level level;
|
||||
|
@ -258,6 +259,7 @@ public class Dungeon {
|
|||
version = Game.versionCode;
|
||||
challenges = SPDSettings.challenges();
|
||||
mobsToChampion = -1;
|
||||
mobsToStateLing = -1;
|
||||
|
||||
String str = CustomGameSettings.getSeedString();
|
||||
seed = str.equals("")?DungeonSeed.randomSeed(): SeedUtil.directConvert(str, 'A', 26);//DungeonSeed.randomSeed();
|
||||
|
@ -384,105 +386,6 @@ public class Dungeon {
|
|||
// Statistics.deepestFloor--;
|
||||
// }
|
||||
//} else
|
||||
if (Dungeon.isChallenged(RLPT)) {
|
||||
switch (depth) {
|
||||
case 0:
|
||||
level = new ZeroLevel();
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
level = new SewerLevel();
|
||||
break;
|
||||
case 5:
|
||||
if((Statistics.boss_enhance & 0x1) != 0) level = new SLMKingLevel();
|
||||
else level = new SewerBossLevel();
|
||||
break;
|
||||
case 6:
|
||||
case 7:
|
||||
case 8:
|
||||
case 9:
|
||||
switch (Random.Int(2)) {
|
||||
case 0:
|
||||
default:
|
||||
level = new PrisonLevel();
|
||||
//Random
|
||||
break;
|
||||
case 1:
|
||||
//Random
|
||||
level = new CavesLevel();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 10:
|
||||
if((Statistics.boss_enhance & 0x2) != 0) level = new DimandKingLevel();
|
||||
else level = new PrisonBossLevel();
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case 14:
|
||||
switch (Random.Int(2)) {
|
||||
case 0:
|
||||
default:
|
||||
level = new CavesLevel();
|
||||
break;
|
||||
case 1:
|
||||
level = new CityLevel();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 15:
|
||||
if (SPDSettings.level3boss()==3){
|
||||
level = new CavesGirlDeadLevel();
|
||||
} else if (SPDSettings.level3boss()==2){
|
||||
level = new CaveTwoBossLevel();
|
||||
} else {
|
||||
level = new NewCavesBossLevel();
|
||||
}
|
||||
break;
|
||||
case 16:
|
||||
case 17:
|
||||
case 18:
|
||||
case 19:
|
||||
switch (Random.Int(2)) {
|
||||
case 0:
|
||||
default:
|
||||
level = new CityLevel();
|
||||
break;
|
||||
case 1:
|
||||
level = new CavesLevel();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case 20:
|
||||
if((Statistics.boss_enhance & 0x8) != 0) {
|
||||
Buff.affect(hero, TestDwarfMasterLock.class).set((1), 1);
|
||||
level = new DwarfMasterBossLevel();
|
||||
break;
|
||||
}
|
||||
else level = new NewCityBossLevel();
|
||||
break;
|
||||
case 21:
|
||||
case 22:
|
||||
case 23:
|
||||
case 24:
|
||||
level = new HallsLevel();
|
||||
break;
|
||||
case 25:
|
||||
if((Statistics.boss_enhance & 0x10) != 0) level = new YogGodHardBossLevel();
|
||||
else level = new NewHallsBossLevel();
|
||||
break;
|
||||
case 26:
|
||||
level = new LastLevel();
|
||||
break;
|
||||
default:
|
||||
level = new DeadEndLevel();
|
||||
Statistics.deepestFloor--;
|
||||
}
|
||||
} else
|
||||
//正常模式
|
||||
switch (depth) {
|
||||
case 0:
|
||||
level = new ZeroLevel();
|
||||
|
@ -593,6 +496,10 @@ public class Dungeon {
|
|||
return depth == 12;
|
||||
}
|
||||
|
||||
|
||||
public static boolean AutoShopLevel() {
|
||||
return depth == 7 || depth == 12 || depth == 17 || depth == 22;
|
||||
}
|
||||
//圣域保护
|
||||
public static boolean GodWaterLevel() {
|
||||
return depth == 1 ||depth == 2||depth == 3||depth == 4;
|
||||
|
@ -770,6 +677,8 @@ public class Dungeon {
|
|||
private static final String QUESTS = "quests";
|
||||
private static final String BADGES = "badges";
|
||||
|
||||
private static final String MOBS_TO_STATELING = "mobs_to_stateling";
|
||||
|
||||
public static void saveGame( int save ) {
|
||||
try {
|
||||
Bundle bundle = new Bundle();
|
||||
|
@ -779,6 +688,9 @@ public class Dungeon {
|
|||
bundle.put( SEED, seed );
|
||||
bundle.put( CHALLENGES, challenges );
|
||||
bundle.put( MOBS_TO_CHAMPION, mobsToChampion );
|
||||
|
||||
bundle.put( MOBS_TO_STATELING, mobsToStateLing );
|
||||
|
||||
bundle.put( HERO, hero );
|
||||
bundle.put( DEPTH, depth );
|
||||
|
||||
|
@ -879,6 +791,8 @@ public class Dungeon {
|
|||
Dungeon.challenges = bundle.getInt( CHALLENGES );
|
||||
Dungeon.mobsToChampion = bundle.getInt( MOBS_TO_CHAMPION );
|
||||
|
||||
Dungeon.mobsToStateLing = bundle.getInt( MOBS_TO_STATELING );
|
||||
|
||||
Dungeon.level = null;
|
||||
Dungeon.depth = -1;
|
||||
|
||||
|
|
|
@ -37,16 +37,6 @@ import java.util.Locale;
|
|||
public class SPDSettings extends GameSettings {
|
||||
|
||||
//Version info
|
||||
public static final String KEY_CUSTOM_SEED = "Your_Key";
|
||||
public static final String KEY_CUSTOM_LING = "Your_Key";
|
||||
|
||||
public static void customSeed( String value ){
|
||||
put( KEY_CUSTOM_SEED, value );
|
||||
}
|
||||
|
||||
public static String customSeed() {
|
||||
return getString( KEY_CUSTOM_SEED, KEY_CUSTOM_LING, 20);
|
||||
}
|
||||
|
||||
public static final String KEY_VERSION = "version";
|
||||
|
||||
|
@ -66,6 +56,14 @@ public class SPDSettings extends GameSettings {
|
|||
return getInt( KEY_L3BOSS, 1, 1, 3);
|
||||
}
|
||||
|
||||
public static void FPSLimit(boolean value) {
|
||||
put( KEY_FPS, value );
|
||||
}
|
||||
|
||||
public static boolean FPSLimit() {
|
||||
return getBoolean(KEY_FPS, true);
|
||||
}
|
||||
|
||||
private static final String DEBUG_REPORT = "debug_report";
|
||||
public static boolean debugReport() {
|
||||
return getBoolean(DEBUG_REPORT,false);
|
||||
|
@ -112,6 +110,7 @@ public class SPDSettings extends GameSettings {
|
|||
return getInt( KEY_SPLASH_SCREEN, 1 );
|
||||
}
|
||||
|
||||
private static final String KEY_FPS = "fps";
|
||||
|
||||
private static final String KEY_DARK = "dark_ui";
|
||||
//暗色系统
|
||||
|
@ -200,6 +199,8 @@ public class SPDSettings extends GameSettings {
|
|||
|
||||
//Interface
|
||||
|
||||
public static final String KEY_FPSLIMIT = "fpslimit";
|
||||
|
||||
public static final String KEY_UI_SIZE = "full_ui";
|
||||
public static final String KEY_QUICKSLOTS = "quickslots";
|
||||
public static final String KEY_L3BOSS = "bossl3";
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
public class AutoRandomBuff extends Buff {
|
||||
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
public static int level = 0;
|
||||
private int interval = 1;
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
if (target.isAlive()) {
|
||||
|
||||
spend(interval);
|
||||
if (level == 0) {
|
||||
detach();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 int icon() {
|
||||
// return BuffIndicator.CORRUPT;
|
||||
// }
|
||||
|
||||
}
|
||||
|
|
@ -27,6 +27,8 @@ 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.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.ExplosiveTrap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
@ -36,7 +38,7 @@ import com.watabou.utils.PathFinder;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public abstract class ChampionEnemy extends Buff {
|
||||
public static final float shopDURATION = 2000000000f;
|
||||
//public static final float shopDURATION = 2000000000f;
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
@ -89,10 +91,197 @@ public abstract class ChampionEnemy extends Buff {
|
|||
return 1f;
|
||||
}
|
||||
|
||||
public float speedFactor(){
|
||||
return 1f;
|
||||
}
|
||||
|
||||
{
|
||||
immunities.add(Corruption.class);
|
||||
}
|
||||
|
||||
public static void rollForStateLing(Mob m){
|
||||
if (Dungeon.mobsToStateLing <= 0) Dungeon.mobsToStateLing = 8;
|
||||
|
||||
Dungeon.mobsToStateLing--;
|
||||
|
||||
Class<?extends ChampionEnemy> buffCls;
|
||||
|
||||
|
||||
if (Random.Float() < 0.3f) {
|
||||
//30%
|
||||
buffCls = ChampionEnemy.Small.class;
|
||||
} else if (Random.Float() < 0.25f) {
|
||||
//25%
|
||||
buffCls = ChampionEnemy.Bomber.class;
|
||||
} else if (Random.Float() < 0.2f) {
|
||||
//20%
|
||||
buffCls = ChampionEnemy.Middle.class;
|
||||
} else if (Random.Float() < 0.15f) {
|
||||
//15%
|
||||
buffCls = ChampionEnemy.Big.class;
|
||||
} else {
|
||||
//10%
|
||||
buffCls = ChampionEnemy.LongSider.class;
|
||||
}
|
||||
|
||||
// switch ((int) Random.Float()){
|
||||
// case 0:case 1: case 2: case 3: default:
|
||||
// buffCls = ChampionEnemy.Small.class;
|
||||
// break;
|
||||
// case 4: case 5: case 6:
|
||||
// buffCls = ChampionEnemy.Bomber.class;
|
||||
// break;
|
||||
// case 7: case 8:
|
||||
// buffCls = ChampionEnemy.Middle.class;
|
||||
// break;
|
||||
// case 9: case 10: case 11:
|
||||
// buffCls = ChampionEnemy.Big.class;
|
||||
// break;
|
||||
// case 12: case 13:
|
||||
// buffCls = ChampionEnemy.LongSider.class;
|
||||
// break;
|
||||
// }
|
||||
|
||||
if (Dungeon.mobsToStateLing <= 0 && Dungeon.isChallenged(Challenges.SBSG)) {
|
||||
Buff.affect(m, buffCls);
|
||||
m.state = m.WANDERING;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public static class LongSider extends ChampionEnemy {
|
||||
|
||||
{
|
||||
color = 0xff00ff;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float meleeDamageFactor() {
|
||||
return 0.9f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canAttackWithExtraReach(Char enemy) {
|
||||
//attack range of 2
|
||||
return target.fieldOfView[enemy.pos] && Dungeon.level.distance(target.pos, enemy.pos) <= 2;
|
||||
}
|
||||
|
||||
private float resurrectChance = 0.1f;
|
||||
@Override
|
||||
public void onAttackProc(Char enemy) {
|
||||
if(Random.Float() <= resurrectChance) {
|
||||
Buff.prolong( enemy, Vertigo.class, 4f);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class Small extends ChampionEnemy {
|
||||
|
||||
{
|
||||
color = 0x8f8f8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float meleeDamageFactor() {
|
||||
return 0.75f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float speedFactor() {
|
||||
return 1.3f;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public static class Bomber extends ChampionEnemy {
|
||||
|
||||
{
|
||||
color = 0x00FF00;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float meleeDamageFactor() {
|
||||
return 0.7f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float speedFactor() {
|
||||
return 0.5f;
|
||||
}
|
||||
|
||||
public void detach() {
|
||||
for (int i : PathFinder.NEIGHBOURS1){
|
||||
if (!Dungeon.level.solid[target.pos+i]){
|
||||
ExplosiveTrap bomber = new ExplosiveTrap();
|
||||
bomber.pos = target.pos;
|
||||
bomber.activate();
|
||||
}
|
||||
}
|
||||
super.detach();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Middle extends ChampionEnemy {
|
||||
|
||||
{
|
||||
color = 0xFFFF00;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float meleeDamageFactor() {
|
||||
return 1.25f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float speedFactor() {
|
||||
return 1.25f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float damageTakenFactor() {
|
||||
return 0.3f;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public static class Big extends ChampionEnemy {
|
||||
|
||||
{
|
||||
color = 0xFF0000;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float meleeDamageFactor() {
|
||||
return 1.30f;
|
||||
}
|
||||
private float resurrectChance = 0.05f;
|
||||
@Override
|
||||
public void onAttackProc(Char enemy) {
|
||||
if(Random.Float() <= resurrectChance) {
|
||||
Buff.affect( enemy, Bleeding.class ).set( 5 );
|
||||
}
|
||||
}
|
||||
private float resurrectChanceB = 0.1f;
|
||||
@Override
|
||||
public void detach() {
|
||||
for (int i : PathFinder.NEIGHBOURS9){
|
||||
if (Random.Float() <= resurrectChanceB) {
|
||||
AlarmTrap xxx = new AlarmTrap();
|
||||
xxx.pos = target.pos;
|
||||
xxx.activate();
|
||||
|
||||
}
|
||||
}
|
||||
super.detach();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void rollForChampion(Mob m){
|
||||
if (Dungeon.mobsToChampion <= 0) Dungeon.mobsToChampion = 8;
|
||||
|
||||
|
@ -229,7 +418,7 @@ public abstract class ChampionEnemy extends Buff {
|
|||
@Override
|
||||
public boolean canAttackWithExtraReach(Char enemy) {
|
||||
//attack range of 2
|
||||
return target.fieldOfView[enemy.pos] && Dungeon.level.distance(target.pos, enemy.pos) <= 2;
|
||||
return target.fieldOfView[enemy.pos] && Dungeon.level.distance(target.pos, enemy.pos) <= 4;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -158,7 +158,6 @@ public enum HeroClass {
|
|||
|
||||
if ( Badges.isUnlocked(Badges.Badge.NYZ_SHOP)){
|
||||
Buff.affect(hero, RandomBuff.class).set( (5), 1 );
|
||||
System.out.println(RandomBuff.level);
|
||||
Dungeon.gold+=1200;
|
||||
}
|
||||
|
||||
|
@ -269,7 +268,7 @@ public enum HeroClass {
|
|||
|
||||
new HerbBag().quantity(1).identify().collect();
|
||||
new PotionOfHealing().quantity(3).identify().collect();
|
||||
|
||||
//Badges.ENDDIED();
|
||||
new ScrollOfUpgrade().quantity(1).identify().collect();
|
||||
//new IndexBooks().quantity(1).identify().collect();
|
||||
if (!Challenges.isItemBlocked(i)) i.collect();
|
||||
|
|
|
@ -75,22 +75,22 @@ public class Bestiary {
|
|||
case 10:
|
||||
switch (Random.Int(3)) {
|
||||
case 0:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, BlackHost.class,
|
||||
Thief.class,DM100.class,Necromancer.class));
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,BrownBat.class,
|
||||
Spinner.class,Shaman.random()));
|
||||
case 1:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,Thief.class,
|
||||
DM100.class,Necromancer.class,Necromancer.class,
|
||||
DM100.class,SRPDHBLR.class, BlackHost.class));
|
||||
DM100.class, BlackHost.class));
|
||||
case 2:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,BrownBat.class, DM100.class,
|
||||
Spinner.class, Necromancer.class,
|
||||
Necromancer.class,
|
||||
Brute.class,
|
||||
Shaman.random(), DM100.class,
|
||||
Spinner.class, Spinner.class,
|
||||
DM200.class, MolotovHuntsman.class,
|
||||
Brute.class,
|
||||
MolotovHuntsman.class,MolotovHuntsman.class,FireGhost.class));
|
||||
Bat.class));
|
||||
}
|
||||
case 11:
|
||||
case 12:
|
||||
|
@ -100,22 +100,21 @@ public class Bestiary {
|
|||
switch (Random.Int(4)) {
|
||||
case 0:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, BlackHost.class,
|
||||
Thief.class,DM100.class,Necromancer.class));
|
||||
Thief.class,DM100.class,Necromancer.class,IceGolem.class));
|
||||
case 1:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,Thief.class,
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class,
|
||||
Thief.class,
|
||||
DM100.class,Necromancer.class,Necromancer.class,
|
||||
DM100.class,SRPDHBLR.class, BlackHost.class));
|
||||
DM100.class, BlackHost.class));
|
||||
case 2:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(), Elemental.random(), Elemental.random(), Elemental.random(),
|
||||
Monk.class,FireGhost.class,FireGhost.class));
|
||||
Elemental.random(),
|
||||
Monk.class,FireGhost.class,FireGhost.class,Warlock.class));
|
||||
case 3:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Warlock.class, Warlock.class,
|
||||
Monk.class, Monk.class,
|
||||
Golem.class, Golem.class, Golem.class,ShieldHuntsman.class));
|
||||
Golem.class));
|
||||
}
|
||||
case 16:
|
||||
case 17:
|
||||
|
@ -134,13 +133,12 @@ public class Bestiary {
|
|||
case 1:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,Fire_Scorpio.class,
|
||||
DM200.class,SkullShaman.class,MolotovHuntsman.class,
|
||||
DM100.class,SRPDHBLR.class, Ice_Scorpio.class));
|
||||
DM200.class,SkullShaman.class,
|
||||
DM100.class, Ice_Scorpio.class));
|
||||
case 2:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class, Succubus.class, Succubus.class,
|
||||
Succubus.class, Succubus.class,
|
||||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class,Fire_Scorpio.class));
|
||||
Succubus.class,
|
||||
Eye.class,ShieldHuntsman.class,Scorpio.class,Fire_Scorpio.class));
|
||||
case 3:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class, Succubus.class, Succubus.class,
|
||||
|
@ -148,15 +146,14 @@ public class Bestiary {
|
|||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class,Fire_Scorpio.class,Albino.class));
|
||||
case 4:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class, Succubus.class, Succubus.class,
|
||||
Succubus.class, Succubus.class,
|
||||
Succubus.class,
|
||||
Succubus.class,
|
||||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class));
|
||||
case 5:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Succubus.class,
|
||||
Eye.class, Eye.class,
|
||||
Scorpio.class, Eye.class, Eye.class,Succubus.class, Succubus.class,
|
||||
Scorpio.class, Scorpio.class,Fire_Scorpio.class,Scorpio.class,ShieldHuntsman.class,
|
||||
Scorpio.class, Eye.class,Succubus.class,
|
||||
Ice_Scorpio.class,Fire_Scorpio.class));
|
||||
}
|
||||
default:
|
||||
|
@ -200,7 +197,7 @@ public class Bestiary {
|
|||
case 8:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class,
|
||||
Skeleton.class,
|
||||
Thief.class,BrownBat.class, Guard.class, SRPDHBLR.class,Necromancer.class, BrownBat.class));
|
||||
Thief.class,BrownBat.class, Guard.class, Necromancer.class, BrownBat.class));
|
||||
case 9:
|
||||
return new ArrayList<>(Arrays.asList(Skeleton.class, Skeleton.class, Skeleton.class,
|
||||
Thief.class,Thief.class,BrownBat.class,
|
||||
|
@ -216,7 +213,7 @@ public class Bestiary {
|
|||
//1x bat, 1x brute, 2x shaman, 2x spinner, 2x DM-300
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
SRPDHBLR.class,ColdMagicRat.class,FireGhost.class,ColdMagicRat.class));
|
||||
ColdMagicRat.class,FireGhost.class,ColdMagicRat.class));
|
||||
case 13:
|
||||
//1x bat, 1x brute, 2x shaman, 2x spinner, 2x DM-300
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
|
@ -227,17 +224,15 @@ public class Bestiary {
|
|||
case 14:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
MolotovHuntsman.class,
|
||||
Spinner.class,
|
||||
SRPDHBLR.class,ColdMagicRat.class,RedSwarm.class));
|
||||
ColdMagicRat.class,RedSwarm.class));
|
||||
case 15:
|
||||
//1x bat, 1x brute, 2x shaman, 2x spinner, 2x DM-300
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Bat.class,
|
||||
MolotovHuntsman.class,
|
||||
Spinner.class,
|
||||
SRPDHBLR.class, MolotovHuntsman.class,
|
||||
Brute.class,SRPDHBLR.class,FireGhost.class,ColdMagicRat.class,RedSwarm.class));
|
||||
|
||||
Brute.class,FireGhost.class,ColdMagicRat.class,RedSwarm.class));
|
||||
|
||||
// City
|
||||
case 16:
|
||||
|
@ -256,7 +251,7 @@ public class Bestiary {
|
|||
Elemental.random(),
|
||||
Warlock.class,
|
||||
Monk.class,
|
||||
Golem.class,MolotovHuntsman.class,FireGhost.class));
|
||||
Golem.class,FireGhost.class));
|
||||
case 19:
|
||||
//1x elemental, 1x warlock, 2x monk, 3x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
|
|
|
@ -950,7 +950,6 @@ public class DimandKing extends Boss {
|
|||
summonSubject(5, DM100.class);
|
||||
summonSubject(2, DM201.class);
|
||||
summonSubject(5, DM200.class);
|
||||
summonSubject(7, MolotovHuntsman.class);
|
||||
summonSubject(5, Skeleton.class);
|
||||
summonSubject(5, Necromancer.class);
|
||||
summonSubject(5, RedNecromancer.class);
|
||||
|
|
|
@ -45,7 +45,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.CursedWand;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.EndingBlade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
|
@ -228,8 +227,7 @@ public abstract class Elemental extends Mob {
|
|||
|
||||
//TODO 1%
|
||||
if(!Statistics.endingbald && Random.Float() <= resurrectChance) {
|
||||
Dungeon.level.drop(new EndingBlade(), pos).sprite.drop();
|
||||
Badges.ENDDIED();
|
||||
//Dungeon.level.drop(new EndingBlade(), pos).sprite.drop();
|
||||
Statistics.endingbald = true;
|
||||
//TODO 1%
|
||||
super.die(cause);
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
|
@ -83,6 +84,7 @@ import java.util.Comparator;
|
|||
import java.util.HashSet;
|
||||
|
||||
public abstract class Mob extends Char {
|
||||
|
||||
public float scaleFactor = 1f;
|
||||
{
|
||||
actPriority = MOB_PRIO;
|
||||
|
@ -180,19 +182,6 @@ public abstract class Mob extends Char {
|
|||
|
||||
boolean justAlerted = alerted;
|
||||
alerted = false;
|
||||
|
||||
//TODO 突变巨兽NEW
|
||||
if (Dungeon.isChallenged(Challenges.SBSG) && scaleFactor == 1f && !properties().contains(Property.NOBIG) && !properties().contains(Property.BOSS)&& !properties().contains(Property.MINIBOSS) ){
|
||||
scaleFactor = Random.Float(1f, 1.6f);
|
||||
HT = (int) (HT * scaleFactor);
|
||||
if (scaleFactor >= 1.4f && HT >= 1){
|
||||
HP = HT = (int) (HT * 1.45f);
|
||||
} else {
|
||||
HP = HT = (int) (HT * 1f);
|
||||
}
|
||||
sprite.linkVisuals(this);
|
||||
sprite.link(this);
|
||||
}
|
||||
|
||||
if (justAlerted){
|
||||
sprite.showAlert();
|
||||
|
@ -602,7 +591,15 @@ public abstract class Mob extends Char {
|
|||
|
||||
@Override
|
||||
public float speed() {
|
||||
return super.speed() * (Dungeon.isChallenged(Challenges.SBSG) ? (0.6f * scaleFactor) : 1);
|
||||
|
||||
if(Dungeon.isChallenged(SBSG)) {
|
||||
//移速控制
|
||||
for (ChampionEnemy buff : buffs(ChampionEnemy.class)) {
|
||||
baseSpeed = buff.speedFactor();
|
||||
}
|
||||
}
|
||||
|
||||
return super.speed() * (1);
|
||||
}
|
||||
|
||||
protected boolean hitWithRanged = false;
|
||||
|
|
|
@ -25,7 +25,6 @@ import com.watabou.utils.PathFinder;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public class MolotovHuntsman extends Mob {
|
||||
private static final String COMBO = "combo";
|
||||
private String[] attackCurse;
|
||||
private int combo;
|
||||
private String[] deathCurse;
|
||||
|
|
|
@ -34,7 +34,6 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.SRPDHBLRTT;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
public class SRPDHBLR extends Mob {
|
||||
private static final String COMBO = "combo";
|
||||
private String[] attackCurse = {"烧,快烧起来!", "扭曲的世界",
|
||||
"滚开!",
|
||||
"你不可能再继续前进了!", "你这个狡猾的人类!", "冒险家,肮脏的冒险家!",
|
||||
|
@ -47,12 +46,6 @@ public class SRPDHBLR extends Mob {
|
|||
"四周好冷", "诅咒你这怪物", "相信我的同伴今晚会为我复仇"};
|
||||
|
||||
public int generation = 0;
|
||||
private SRPDHBLR split() {
|
||||
SRPDHBLR clone = new SRPDHBLR();
|
||||
clone.generation = generation + 1;
|
||||
clone.EXP = 0;
|
||||
return clone;
|
||||
}
|
||||
|
||||
public SRPDHBLR() {
|
||||
this.spriteClass = SRPDHBLRTT.class;
|
||||
|
|
|
@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Boss;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
|
@ -49,13 +48,12 @@ import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
|||
import com.watabou.noosa.audio.Music;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class SlimeKing extends Boss {
|
||||
public class SlimeKing extends Mob {
|
||||
|
||||
private final String[] attackCurse = {"雕虫小技", "班门弄斧",
|
||||
"GAMEOVER"};
|
||||
|
@ -125,7 +123,6 @@ public class SlimeKing extends Boss {
|
|||
|
||||
@Override
|
||||
public boolean act() {
|
||||
BossHealthBar.assignBoss(this);
|
||||
|
||||
if(HP < 70 && !PartCold){
|
||||
baseSpeed = 1f;
|
||||
|
@ -134,7 +131,7 @@ public class SlimeKing extends Boss {
|
|||
var4.activate();
|
||||
PartCold = true;
|
||||
chainsUsed = true;
|
||||
GLog.n("你彻底激怒我了!!!");
|
||||
GLog.n(Messages.get(SlimeKing.class,"fuck"));
|
||||
} else if (HP < 70) {
|
||||
baseSpeed = 1f;
|
||||
}
|
||||
|
@ -208,10 +205,10 @@ public class SlimeKing extends Boss {
|
|||
}
|
||||
int damage2 = SlimeKing.super.attackProc(enemy, this.combo + damage);
|
||||
this.combo++;
|
||||
int effect = Random.Int(3);
|
||||
// if (enemy.buff(Poison.class) == null && Random.Float() <= 0.25f) {
|
||||
// Buff.affect( enemy, Poison.class).set((effect-2) );
|
||||
// }
|
||||
// int effect = Random.Int(3);
|
||||
//// if (enemy.buff(Poison.class) == null && Random.Float() <= 0.25f) {
|
||||
//// Buff.affect( enemy, Poison.class).set((effect-2) );
|
||||
//// }
|
||||
if (this.combo > 3) {
|
||||
this.combo = 1;
|
||||
}
|
||||
|
@ -258,15 +255,9 @@ public class SlimeKing extends Boss {
|
|||
yell(Messages.get(this, "scorpion"));
|
||||
new Item().throwSound();
|
||||
Sample.INSTANCE.play(Assets.Sounds.CHAINS);
|
||||
sprite.parent.add(new Chains(sprite.center(), enemy.sprite.center(), new Callback() {
|
||||
public void call() {
|
||||
Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal, new Callback() {
|
||||
public void call() {
|
||||
pullEnemy(enemy, newPosFinal);
|
||||
}
|
||||
}), -1);
|
||||
next();
|
||||
}
|
||||
sprite.parent.add(new Chains(sprite.center(), enemy.sprite.center(), () -> {
|
||||
Actor.addDelayed(new Pushing(enemy, enemy.pos, newPosFinal, () -> pullEnemy(enemy, newPosFinal)), -1);
|
||||
next();
|
||||
}));
|
||||
} else {
|
||||
pullEnemy(enemy, newPos);
|
||||
|
@ -299,7 +290,7 @@ public class SlimeKing extends Boss {
|
|||
@Override
|
||||
public void notice() {
|
||||
super.notice();
|
||||
// BossHealthBar.assignBoss(this);
|
||||
BossHealthBar.assignBoss(this);
|
||||
Music.INSTANCE.play(Assets.BGM_BOSSA, true);
|
||||
yell( Messages.get(this, "notice") );
|
||||
chainsUsed = false;
|
||||
|
|
|
@ -35,7 +35,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.DM201;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Ghoul;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.GnollShiled;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.MolotovHuntsman;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Monk;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Necromancer;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDZSLS;
|
||||
|
@ -1385,7 +1384,6 @@ public class DwarfMaster extends Boss {
|
|||
summonSubject(5, DM100.class);
|
||||
summonSubject(2, DM201.class);
|
||||
summonSubject(5, DM200.class);
|
||||
summonSubject(3, MolotovHuntsman.class);
|
||||
summonSubject(3, Skeleton.class);
|
||||
summonSubject(3, Necromancer.class);
|
||||
summonSubject(3, RedNecromancer.class);
|
||||
|
|
|
@ -0,0 +1,127 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AutoRandomBuff;
|
||||
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.food.Cake;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.LightFood;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Pasty;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Switch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.AutoShopRoBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndAutoShop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.audio.Music;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Callback;
|
||||
|
||||
public class AutoShopReBot extends NPC {
|
||||
|
||||
private static final String FIRST = "first";
|
||||
private boolean first=true;
|
||||
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(FIRST, first);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
first = bundle.getBoolean(FIRST);
|
||||
}
|
||||
|
||||
public void flee() {
|
||||
destroy();
|
||||
sprite.killAndErase();
|
||||
CellEmitter.get( pos ).burst( ElmoParticle.FACTORY, 6 );
|
||||
}
|
||||
private void tell(String text) {
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
GameScene.show(new WndQuest(new AutoShopReBot(), text));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
@Override
|
||||
public boolean interact(Char c) {
|
||||
sprite.turnTo( pos, Dungeon.hero.pos );
|
||||
|
||||
if(Dungeon.hero.buff(AutoRandomBuff.class) == null) {
|
||||
tell(Messages.get(WndAutoShop.class, "maxbuy"));
|
||||
for (Buff buff : hero.buffs()) {
|
||||
if (buff instanceof AutoRandomBuff) {
|
||||
buff.detach();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
GameScene.show(new WndAutoShop());
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
private boolean seenBefore = false;
|
||||
protected boolean act() {
|
||||
if (!seenBefore && Dungeon.level.heroFOV[pos]) {
|
||||
GLog.p(Messages.get(this, "greetings", Dungeon.hero.name()));
|
||||
seenBefore = true;
|
||||
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 0) {
|
||||
Music.INSTANCE.play(Assets.TOWN, true);
|
||||
seenBefore = false;
|
||||
} else if (seenBefore && !Dungeon.level.heroFOV[pos] && Dungeon.depth == 12) {
|
||||
Music.INSTANCE.play(Assets.BGM_2,true);
|
||||
seenBefore = false;
|
||||
}
|
||||
throwItem();
|
||||
|
||||
sprite.turnTo( pos, Dungeon.hero.pos );
|
||||
spend( TICK );
|
||||
|
||||
shop6 = new ChargrilledMeat();
|
||||
shop5 = new Pasty();
|
||||
shop4 = new Switch();
|
||||
shop3 = new Cake();
|
||||
shop2 = new SmallRation();
|
||||
shop1 = new LightFood();
|
||||
ate = new AutoShopReBot();
|
||||
throwItem();
|
||||
return super.act();
|
||||
}
|
||||
|
||||
public static Food shop1;
|
||||
public static Food shop2;
|
||||
public static Food shop3;
|
||||
public static Food shop4;
|
||||
public static Food shop5;
|
||||
public static Food shop6;
|
||||
public static AutoShopReBot ate;
|
||||
|
||||
{
|
||||
spriteClass = AutoShopRoBotSprite.class;
|
||||
HT=HP=30;
|
||||
flying = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -377,7 +377,7 @@ public class Generator {
|
|||
GreenSword.class,
|
||||
|
||||
};
|
||||
WEP_T3.probs = new float[]{ 1, 5, 5, 4, 0, 4 ,3,8,0,4};
|
||||
WEP_T3.probs = new float[]{ 1, 5, 5, 4, 0, 4 ,3,8,0,0};
|
||||
|
||||
WEP_T4.classes = new Class<?>[]{
|
||||
Longsword.class,
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
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.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Poison;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Slow;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class Cake extends Food {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.CAKE;
|
||||
energy = Hunger.HUNGRY-50f;
|
||||
}
|
||||
|
||||
public static void cure( Char ch ) {
|
||||
Buff.detach( ch, Poison.class );
|
||||
Buff.detach( ch, Cripple.class );
|
||||
Buff.detach( ch, Weakness.class );
|
||||
Buff.detach( ch, Vulnerable.class );
|
||||
Buff.detach( ch, Bleeding.class );
|
||||
Buff.detach( ch, Blindness.class );
|
||||
Buff.detach( ch, Drowsy.class );
|
||||
Buff.detach( ch, Slow.class );
|
||||
Buff.detach( ch, Vertigo.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void satisfy(Hero hero) {
|
||||
Buff.prolong( hero, Haste.class, 10f);
|
||||
if(Random.Float()<0.45f) {
|
||||
hero.STR++;
|
||||
hero.sprite.showStatus(CharSprite.POSITIVE, "+1");
|
||||
GLog.p(Messages.get(this, "eat_good"));
|
||||
}
|
||||
Buff.affect(hero, Healing.class).setHeal((int) (0.4f * hero.HT/5), 0.25f, 0);
|
||||
cure( hero );
|
||||
super.satisfy( hero );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return 50 * quantity;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.items.food;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
|
||||
public class Switch extends Food {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.SWTR;
|
||||
energy = Hunger.HUNGRY-50f;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void satisfy(Hero hero) {
|
||||
Buff.affect(hero, Barrier.class).setShield(((20 * Dungeon.depth/5)));
|
||||
super.satisfy( hero );
|
||||
}
|
||||
|
||||
@Override
|
||||
public int value() {
|
||||
return 50 * quantity;
|
||||
}
|
||||
|
||||
}
|
|
@ -33,7 +33,7 @@ public class WaterSoul extends Elixir {
|
|||
|
||||
@Override
|
||||
public void apply(Hero hero) {
|
||||
Buff.affect(hero, WaterSoulX.class).set( (51), 1 );
|
||||
Buff.affect(hero, WaterSoulX.class).set( (101), 1 );
|
||||
cure( hero );
|
||||
heal( hero );
|
||||
if (Dungeon.isChallenged(Challenges.NO_FOOD)){
|
||||
|
@ -44,15 +44,11 @@ public class WaterSoul extends Elixir {
|
|||
}
|
||||
|
||||
public static void heal( Char ch ){
|
||||
if (ch == Dungeon.hero && Dungeon.isChallenged(Challenges.NO_HEALING)){
|
||||
pharmacophobiaProc(Dungeon.hero);
|
||||
} else {
|
||||
//starts out healing 30 hp, equalizes with hero health total at level 11
|
||||
Buff.affect(ch, Healing.class).setHeal((int) (0.8f * ch.HT + 14), 0.25f, 0);
|
||||
if (ch == Dungeon.hero){
|
||||
GLog.p( Messages.get(PotionOfHealing.class, "heal") );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void pharmacophobiaProc( Hero hero ){
|
||||
|
|
|
@ -46,7 +46,7 @@ public class BackGoKey extends TestItem {
|
|||
{
|
||||
image = ItemSpriteSheet.DG20;
|
||||
// defaultAction = Dungeon.hero.buff(ShopLimitLock.class) != null? AC_INTER_TP : null ;
|
||||
changeDefAct = true;
|
||||
changeDefAct = false;
|
||||
}
|
||||
|
||||
private static final String AC_INTER_TP = "interlevel_tp";
|
||||
|
|
|
@ -24,9 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
@ -56,14 +55,16 @@ public class Gauntlet extends MeleeWeapon {
|
|||
|
||||
@Override
|
||||
public int proc(Char attacker, Char defender, int damage ) {
|
||||
switch (Random.Int(2)) {
|
||||
case 0:
|
||||
switch (Random.Int(6)) {
|
||||
case 0:case 1:case 2:case 3:
|
||||
default:
|
||||
return super.proc(attacker, defender, damage);
|
||||
case 1:
|
||||
Buff.affect(defender, Burning.class).reignite(defender);
|
||||
Buff.affect(attacker, Cripple.class, Degrade.ADURATION);
|
||||
return super.proc(attacker, defender, damage);
|
||||
return max(buffedLvl());
|
||||
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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,15 +26,15 @@ public class GreenSword extends MeleeWeapon {
|
|||
this.tier = 3;
|
||||
}
|
||||
|
||||
public int damageRoll(Char var1) {
|
||||
if (var1 instanceof Hero) {
|
||||
Hero var2 = (Hero)var1;
|
||||
Char var3 = var2.enemy();
|
||||
if (var3 instanceof Mob && ((Mob)var3).surprisedBy(var2)) {
|
||||
public int damageRoll(Char hero) {
|
||||
if (hero instanceof Hero) {
|
||||
Hero jim = (Hero)hero;
|
||||
Char var3 = jim.enemy();
|
||||
if (var3 instanceof Mob && ((Mob)var3).surprisedBy(jim)) {
|
||||
int var4 = this.max();
|
||||
int var5 = this.min();
|
||||
var4 = this.augment.damageFactor(Random.NormalIntRange(this.min() + Math.round((float)(var4 - var5) * 0.9F), this.max()));
|
||||
int var6 = var2.STR() - this.STRReq();
|
||||
int var6 = jim.STR() - this.STRReq();
|
||||
var5 = var4;
|
||||
if (var6 > 0) {
|
||||
var5 = var4 + Random.IntRange(0, var6);
|
||||
|
@ -48,7 +48,7 @@ public class GreenSword extends MeleeWeapon {
|
|||
}
|
||||
}
|
||||
|
||||
return super.damageRoll(var1);
|
||||
return super.damageRoll(hero);
|
||||
}
|
||||
|
||||
public int max(int var1) {
|
||||
|
@ -59,7 +59,7 @@ public class GreenSword extends MeleeWeapon {
|
|||
}
|
||||
|
||||
public int min(int var1) {
|
||||
return Math.round((float)(this.tier + 0) * 1.08F) * var1 + Math.round((float)(this.tier + 1) * 0.6675F);
|
||||
return Math.round((float)(this.tier) * 1.08F) * var1 + Math.round((float)(this.tier + 1) * 0.6675F);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -28,7 +28,7 @@ public class IceFishSword extends Weapon {
|
|||
hitSoundPitch = 1f;
|
||||
tier = 6;
|
||||
ACC = 2.90f; //20% boost to accuracy
|
||||
DLY = 0.7f; //2x speed
|
||||
DLY = 1.5f; //2x speed
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -72,7 +72,7 @@ public class RedBloodMoon extends MeleeWeapon {
|
|||
if (!Dungeon.level.solid[attacker.pos + i]
|
||||
&& !Dungeon.level.pit[attacker.pos + i]
|
||||
&& Actor.findChar(attacker.pos + i) == null
|
||||
&& attacker == Dungeon.hero&& deadking<6) {
|
||||
&& attacker == Dungeon.hero && deadking<6) {
|
||||
|
||||
GuardianKnight guardianKnight1 = new GuardianKnight();
|
||||
guardianKnight1.weapon = this;
|
||||
|
|
|
@ -76,8 +76,8 @@ public class Sai extends MeleeWeapon {
|
|||
|
||||
@Override
|
||||
public int max(int lvl) {
|
||||
return Math.round(2.5f*(tier+1)) + //10 base, down from 20
|
||||
lvl*Math.round(1.5f*(tier+1)); //+2 per level, down from +4
|
||||
return Math.round(1.5f*(tier+1)) + //10 base, down from 20
|
||||
lvl*Math.round(1.0f*(tier+1)); //+2 per level, down from +4
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,7 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
|
||||
|
@ -51,15 +51,18 @@ public class WarHammer extends MeleeWeapon {
|
|||
|
||||
@Override
|
||||
public int proc(Char attacker, Char defender, int damage ) {
|
||||
switch (Random.Int(2)) {
|
||||
case 0:
|
||||
switch (Random.Int(6)) {
|
||||
case 0:case 1:case 2:case 3:
|
||||
default:
|
||||
return max(buffedLvl());
|
||||
case 1:
|
||||
Buff.prolong(attacker, Vertigo.class, 6f);
|
||||
Buff.prolong(attacker, Terror.class, 18f);
|
||||
Buff.affect(attacker, Vulnerable.class, Degrade.ADURATION);
|
||||
return super.proc(attacker, defender, damage);
|
||||
case 4:case 5:
|
||||
Buff.prolong(defender, Vertigo.class, 12f+level);
|
||||
Buff.prolong(defender, Terror.class, 12f+level);
|
||||
Buff.affect(defender, Burning.class).reignite(defender,5f+level);
|
||||
if(Random.Float()<0.65f && level <3) {
|
||||
Buff.affect(attacker, Vulnerable.class, 6f);
|
||||
}
|
||||
return max(buffedLvl());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -118,7 +118,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greataxe;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatshield;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatsword;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.GreenSword;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.HandAxe;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.IceFishSword;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LockSword;
|
||||
|
@ -126,7 +125,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Longsword;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Mace;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
|
||||
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.Sai;
|
||||
|
@ -200,9 +198,9 @@ public enum Catalog {
|
|||
WEAPONS.seen.put( Greataxe.class, false);
|
||||
WEAPONS.seen.put( Greatshield.class, false);
|
||||
WEAPONS.seen.put( Gauntlet.class, false);
|
||||
WEAPONS.seen.put( GreenSword.class, false);
|
||||
//WEAPONS.seen.put( GreenSword.class, false);
|
||||
WEAPONS.seen.put( LockSword.class, false);
|
||||
WEAPONS.seen.put( RedBloodMoon.class, false);
|
||||
//WEAPONS.seen.put( RedBloodMoon.class, false);
|
||||
WEAPONS.seen.put( Dairikyan.class, false);
|
||||
WEAPONS.seen.put( BlackDog.class, false);
|
||||
WEAPONS.seen.put( IceFishSword.class, false);
|
||||
|
|
|
@ -21,6 +21,8 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
|
@ -486,6 +488,9 @@ public abstract class Level implements Bundlable {
|
|||
|
||||
Mob m = Reflection.newInstance(mobsToSpawn.remove(0));
|
||||
ChampionEnemy.rollForChampion(m);
|
||||
if(Dungeon.isChallenged(SBSG)){
|
||||
ChampionEnemy.rollForStateLing(m);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -624,7 +629,10 @@ public abstract class Level implements Bundlable {
|
|||
if (Statistics.amuletObtained) {
|
||||
mob.beckon( Dungeon.hero.pos );
|
||||
}
|
||||
if (!mob.buffs(ChampionEnemy.class).isEmpty()){
|
||||
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"));
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -22,7 +22,9 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.AQUAPHOBIA;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.Holiday.XMAS;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Bones;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
|
@ -31,6 +33,7 @@ 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.SacrificialFire;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AutoRandomBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.RandomBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
|
@ -55,6 +58,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.builders.LoopBuilder;
|
|||
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.MagicalFireRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.NxhyShopRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.NyzBombAndBooksRoom;
|
||||
|
@ -78,11 +82,53 @@ import com.watabou.utils.Point;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
|
||||
public abstract class RegularLevel extends Level {
|
||||
|
||||
|
||||
private static Holiday holiday;
|
||||
|
||||
public enum Holiday{
|
||||
NONE,
|
||||
ZQJ, //TBD
|
||||
HWEEN,//2nd week of october though first day of november
|
||||
XMAS //3rd week of december through first week of january
|
||||
}
|
||||
|
||||
static{
|
||||
|
||||
holiday = Holiday.NONE;
|
||||
|
||||
final Calendar calendar = Calendar.getInstance();
|
||||
switch(calendar.get(Calendar.MONTH)){
|
||||
case Calendar.JANUARY:
|
||||
if (calendar.get(Calendar.WEEK_OF_MONTH) == 1)
|
||||
holiday = XMAS;
|
||||
break;
|
||||
//2022 9.10-10.1
|
||||
case Calendar.SEPTEMBER:
|
||||
if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){
|
||||
holiday = Holiday.ZQJ;
|
||||
} else {
|
||||
holiday = Holiday.NONE;
|
||||
}
|
||||
break;
|
||||
case Calendar.OCTOBER:
|
||||
if (calendar.get(Calendar.DAY_OF_MONTH) == 1 ){
|
||||
holiday = Holiday.ZQJ;
|
||||
} else {
|
||||
holiday = Holiday.NONE;
|
||||
}
|
||||
break;
|
||||
case Calendar.DECEMBER:
|
||||
if (calendar.get(Calendar.WEEK_OF_MONTH) >= 3)
|
||||
holiday = XMAS;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
protected ArrayList<Room> rooms;
|
||||
|
||||
protected Builder builder;
|
||||
|
@ -186,8 +232,9 @@ public abstract class RegularLevel extends Level {
|
|||
if (Dungeon.aqiLevel() && (Dungeon.isChallenged(AQUAPHOBIA)))
|
||||
initRooms.add(new AquariumRoom());
|
||||
|
||||
if (Dungeon.NxhyshopOnLevel())
|
||||
if (Dungeon.NxhyshopOnLevel()) {
|
||||
initRooms.add(new NxhyShopRoom());
|
||||
}
|
||||
|
||||
if (Dungeon.NyzshopOnLevel()) {
|
||||
Buff.affect(hero, RandomBuff.class).set( (3 + Random.Int(9)+hero.STR/6+hero.HP/30)/Random.Int(1,2)+5, 1 );
|
||||
|
@ -212,6 +259,19 @@ public abstract class RegularLevel extends Level {
|
|||
for (int i = 0; i < secrets; i++) {
|
||||
initRooms.add(SecretRoom.createRoom());
|
||||
}
|
||||
|
||||
//圣诞节
|
||||
if (holiday == XMAS) {
|
||||
if(Dungeon.AutoShopLevel()) {
|
||||
initRooms.add(new AutoShopRoom());
|
||||
Buff.affect(hero, AutoRandomBuff.class).set((10), 1);
|
||||
}
|
||||
} else if(Dungeon.isChallenged(SBSG)){
|
||||
if(Dungeon.AutoShopLevel()) {
|
||||
initRooms.add(new AutoShopRoom());
|
||||
Buff.affect(hero, AutoRandomBuff.class).set((10), 1);
|
||||
}
|
||||
}
|
||||
|
||||
return initRooms;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.AutoShopReBot;
|
||||
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.rooms.Room;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.Point;
|
||||
|
||||
public class AutoShopRoom extends SpecialRoom {
|
||||
|
||||
public AutoShopRoom() {
|
||||
}
|
||||
|
||||
public int minWidth() {
|
||||
return Math.max(8, (int) ( 3.0d));
|
||||
}
|
||||
|
||||
public int minHeight() {
|
||||
return Math.max(8, (int) (3.0d));
|
||||
}
|
||||
|
||||
public void paint(Level level) {
|
||||
Painter.fill(level, this, 4);
|
||||
Painter.fill(level, this, 1, 14);
|
||||
placeShopkeeper(level);
|
||||
boolean[] passable = new boolean[width()*height()];
|
||||
boolean[][] maze = Maze.generate(this);
|
||||
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.CHASM);
|
||||
}
|
||||
passable[x + width()*y] = maze[x][y] == Maze.EMPTY;
|
||||
}
|
||||
}
|
||||
PathFinder.setMapSize(width(), height());
|
||||
Point entrance = entrance();
|
||||
int entrancePos = (entrance.x - left) + width()*(entrance.y - top);
|
||||
PathFinder.buildDistanceMap( entrancePos, passable );
|
||||
for (Room.Door door : this.connected.values()) {
|
||||
door.set(Room.Door.Type.REGULAR);
|
||||
}
|
||||
}
|
||||
|
||||
protected void placeShopkeeper(Level level) {
|
||||
int pos = level.pointToCell(center());
|
||||
Mob autoShopReBot = new AutoShopReBot();
|
||||
autoShopReBot.pos = pos;
|
||||
level.mobs.add(autoShopReBot);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -4,7 +4,6 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Nyz;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
|
@ -15,12 +14,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.MerchantsBeacon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.BookBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Firebomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Flashbang;
|
||||
|
@ -39,7 +33,6 @@ import com.watabou.utils.Point;
|
|||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
|
||||
public class NyzBombAndBooksRoom extends SpecialRoom {
|
||||
|
@ -49,11 +42,11 @@ public class NyzBombAndBooksRoom extends SpecialRoom {
|
|||
}
|
||||
|
||||
public int minWidth() {
|
||||
return Math.max(4, (int) (Math.sqrt((double) itemCount()) + 3.0d));
|
||||
return Math.max(4, (int) (Math.sqrt(itemCount()) + 3.0d));
|
||||
}
|
||||
|
||||
public int minHeight() {
|
||||
return Math.max(4, (int) (Math.sqrt((double) itemCount()) + 3.0d));
|
||||
return Math.max(4, (int) (Math.sqrt(itemCount()) + 3.0d));
|
||||
}
|
||||
|
||||
public int itemCount() {
|
||||
|
@ -121,9 +114,7 @@ public class NyzBombAndBooksRoom extends SpecialRoom {
|
|||
|
||||
protected static ArrayList<Item> generateItems() {
|
||||
Item rare;
|
||||
Item item;
|
||||
ArrayList<Item> itemsToSpawn2 = new ArrayList<>();
|
||||
int i = Dungeon.depth;
|
||||
Item w = Generator.random(Generator.wepTiers[3]);
|
||||
//itemsToSpawn2.add(Generator.random(Generator.misTiers[4]).quantity(2).identify());
|
||||
itemsToSpawn2.add(new LeatherArmor().identify());
|
||||
|
@ -177,49 +168,4 @@ public class NyzBombAndBooksRoom extends SpecialRoom {
|
|||
}
|
||||
|
||||
|
||||
protected static Bag ChooseBag(Belongings pack) {
|
||||
HashMap<Bag, Integer> bags = new HashMap<>();
|
||||
if (!Dungeon.LimitedDrops.VELVET_POUCH.dropped()) {
|
||||
bags.put(new VelvetPouch(), 1);
|
||||
}
|
||||
if (!Dungeon.LimitedDrops.SCROLL_HOLDER.dropped()) {
|
||||
bags.put(new ScrollHolder(), 0);
|
||||
}
|
||||
if (!Dungeon.LimitedDrops.POTION_BANDOLIER.dropped()) {
|
||||
bags.put(new PotionBandolier(), 0);
|
||||
}
|
||||
if (!Dungeon.LimitedDrops.MAGICAL_HOLSTER.dropped()) {
|
||||
bags.put(new MagicalHolster(), 0);
|
||||
}
|
||||
if (bags.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
Iterator it = pack.backpack.items.iterator();
|
||||
while (it.hasNext()) {
|
||||
Item item = (Item) it.next();
|
||||
for (Bag bag : bags.keySet()) {
|
||||
if (bag.canHold(item)) {
|
||||
bags.put(bag, Integer.valueOf(bags.get(bag).intValue() + 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
Bag bestBag = null;
|
||||
for (Bag bag2 : bags.keySet()) {
|
||||
if (bestBag == null) {
|
||||
bestBag = bag2;
|
||||
} else if (bags.get(bag2).intValue() > bags.get(bestBag).intValue()) {
|
||||
bestBag = bag2;
|
||||
}
|
||||
}
|
||||
if (bestBag instanceof VelvetPouch) {
|
||||
Dungeon.LimitedDrops.VELVET_POUCH.drop();
|
||||
} else if (bestBag instanceof ScrollHolder) {
|
||||
Dungeon.LimitedDrops.SCROLL_HOLDER.drop();
|
||||
} else if (bestBag instanceof PotionBandolier) {
|
||||
Dungeon.LimitedDrops.POTION_BANDOLIER.drop();
|
||||
} else if (bestBag instanceof MagicalHolster) {
|
||||
Dungeon.LimitedDrops.MAGICAL_HOLSTER.drop();
|
||||
}
|
||||
return bestBag;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
|
@ -630,7 +631,10 @@ public class GameScene extends PixelScene {
|
|||
}
|
||||
|
||||
for (Mob mob : Dungeon.level.mobs) {
|
||||
if (!mob.buffs(ChampionEnemy.class).isEmpty()) {
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -182,7 +182,7 @@ public class InterlevelScene extends PixelScene {
|
|||
fadeTime += 0.9f; //adds 1 second total
|
||||
//speed up transition when debugging
|
||||
} else if (DeviceCompat.isDebug()){
|
||||
fadeTime = 0.1f;
|
||||
fadeTime = 0.7f;
|
||||
}
|
||||
|
||||
SkinnedBlock bg = new SkinnedBlock(Camera.main.width, Camera.main.height, loadingAsset ){
|
||||
|
|
|
@ -35,6 +35,8 @@ import java.util.Date;
|
|||
|
||||
public class TitleScene extends PixelScene {
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
|
||||
public class AutoShopRoBotSprite extends MobSprite {
|
||||
|
||||
public AutoShopRoBotSprite() {
|
||||
super();
|
||||
|
||||
texture( Assets.Sprites.KEEPERKINGBOT );
|
||||
TextureFilm film = new TextureFilm( texture, 16, 16 );
|
||||
|
||||
idle = new Animation( 10, true );
|
||||
idle.frames( film, 0 );
|
||||
die = new Animation( 20, false );
|
||||
die.frames( film, 0 );
|
||||
|
||||
run = idle.clone();
|
||||
|
||||
attack = idle.clone();
|
||||
|
||||
idle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die() {
|
||||
super.die();
|
||||
|
||||
remove(State.SHIELDED);
|
||||
emitter().start( ElmoParticle.FACTORY, 0.03f, 60 );
|
||||
|
||||
if (visible) {
|
||||
Sample.INSTANCE.play( Assets.Sounds.BURNING );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -638,6 +638,8 @@ public class ItemSpriteSheet {
|
|||
public static final int BLAND_CHUNKS= FOOD+11;
|
||||
public static final int BERRY = FOOD+12;
|
||||
public static final int LSPDA = FOOD+13;
|
||||
public static final int CAKE = FOOD+14;
|
||||
public static final int SWTR = FOOD+15;
|
||||
static{
|
||||
assignItemRect(MEAT, 15, 11);
|
||||
assignItemRect(STEAK, 15, 11);
|
||||
|
|
|
@ -8,7 +8,6 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RedBloodMoon;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.noosa.MovieClip.Animation;
|
||||
import com.watabou.utils.Callback;
|
||||
|
||||
public class MolotovHuntsmanSprite extends MobSprite {
|
||||
|
@ -16,13 +15,13 @@ public class MolotovHuntsmanSprite extends MobSprite {
|
|||
this.texture("SRPD/MolotovHuntsman.png");
|
||||
TextureFilm var1 = new TextureFilm(this.texture, 16, 16);
|
||||
this.idle = new Animation(2, true);
|
||||
this.idle.frames(var1, new Object[]{0, 0, 0, 1, 0, 0, 1, 1});
|
||||
this.idle.frames(var1, 0, 0, 0, 1, 0, 0, 1, 1);
|
||||
this.run = new Animation(12, true);
|
||||
this.run.frames(var1, new Object[]{2, 3, 4, 5, 6});
|
||||
this.run.frames(var1, 2, 3, 4, 5, 6);
|
||||
this.attack = new Animation(12, false);
|
||||
this.attack.frames(var1, new Object[]{11, 12, 13, 14});
|
||||
this.attack.frames(var1, 11, 12, 13, 14);
|
||||
this.die = new Animation(12, false);
|
||||
this.die.frames(var1, new Object[]{7, 8, 9, 10});
|
||||
this.die.frames(var1, 7, 8, 9, 10);
|
||||
this.play(this.idle);
|
||||
}
|
||||
|
||||
|
|
|
@ -65,7 +65,7 @@ public class MenuPane extends Component {
|
|||
|
||||
private Toolbar.PickedUpItem pickedUp;
|
||||
|
||||
private BitmapText version;
|
||||
public static BitmapText version;
|
||||
|
||||
private DangerIndicator danger;
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
|||
import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.ClassPage;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDAction;
|
||||
|
@ -97,6 +98,8 @@ public class StatusPane extends Component {
|
|||
|
||||
private boolean large;
|
||||
|
||||
private BitmapText fpsText;
|
||||
|
||||
public StatusPane( boolean large ){
|
||||
super();
|
||||
|
||||
|
@ -162,6 +165,11 @@ public class StatusPane extends Component {
|
|||
hgText.alpha(0.6f);
|
||||
add(hgText);
|
||||
|
||||
//FPS TEXT
|
||||
fpsText = new BitmapText(PixelScene.pixelFont);
|
||||
fpsText.alpha(1f);
|
||||
add(fpsText);
|
||||
|
||||
heroInfoOnBar = new Button(){
|
||||
@Override
|
||||
protected void onClick () {
|
||||
|
@ -261,12 +269,20 @@ public class StatusPane extends Component {
|
|||
|
||||
heroInfoOnBar.setRect(heroInfo.right(), y + 19, 130, 20);
|
||||
|
||||
|
||||
if(SPDSettings.FPSLimit()) {
|
||||
fpsText.scale.set(PixelScene.align(0.9f));
|
||||
fpsText.x = MenuPane.version.x - 15;
|
||||
fpsText.y = MenuPane.version.y - 10;
|
||||
PixelScene.align(fpsText);
|
||||
} else {
|
||||
fpsText.visible=false;
|
||||
fpsText.active=false;
|
||||
}
|
||||
// buffs.setPos( x + 31, y +15 );
|
||||
|
||||
// //下半段
|
||||
// puresoul.visible = true;
|
||||
|
||||
lanter.setPos(0, 500);
|
||||
busy.x = x + bg.width + 1;
|
||||
busy.y = y + bg.height - 9;
|
||||
} else {
|
||||
|
@ -306,6 +322,16 @@ public class StatusPane extends Component {
|
|||
|
||||
buffs.setPos( x + 31, y + 12 );
|
||||
|
||||
if(SPDSettings.FPSLimit()) {
|
||||
fpsText.scale.set(PixelScene.align(0.9f));
|
||||
fpsText.x = MenuPane.version.x - 15;
|
||||
fpsText.y = MenuPane.version.y - 10;
|
||||
PixelScene.align(fpsText);
|
||||
} else {
|
||||
fpsText.visible=false;
|
||||
fpsText.active=false;
|
||||
}
|
||||
|
||||
busy.x = x + 1;
|
||||
busy.y = y + 33;
|
||||
|
||||
|
@ -379,7 +405,19 @@ public class StatusPane extends Component {
|
|||
|
||||
}
|
||||
|
||||
if(Dungeon.hero.isAlive()){
|
||||
fpsText.text("FPS:"+ Gdx.graphics.getFramesPerSecond());
|
||||
}
|
||||
|
||||
if(Gdx.graphics.getFramesPerSecond()>=90){
|
||||
fpsText.hardlight(Window.SKYBULE_COLOR);
|
||||
} else if(Gdx.graphics.getFramesPerSecond()>=60){
|
||||
fpsText.hardlight(Window.CWHITE);
|
||||
} else if(Gdx.graphics.getFramesPerSecond()>=30){
|
||||
fpsText.hardlight(Window.CYELLOW);
|
||||
} else {
|
||||
fpsText.hardlight(Window.RED_COLOR);
|
||||
}
|
||||
|
||||
if (!Dungeon.hero.isAlive()) {
|
||||
avatar.tint(0x000000, 0.5f);
|
||||
|
|
|
@ -5,6 +5,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewDM300;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.ChangesScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.AutoShopRoBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BlueBatSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdGuardSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300Sprite;
|
||||
|
@ -17,6 +18,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.KagenoNusujinSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MagicGirlSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MolotovHuntsmanSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MurdererSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.SRPDHBLRTT;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ShopkKingSprite;
|
||||
|
@ -35,6 +37,7 @@ import java.util.ArrayList;
|
|||
public class vM0_6_7_X_Changes {
|
||||
|
||||
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
|
||||
add_v0_6_18_Changes(changeInfos);
|
||||
add_v0_6_17_Changes(changeInfos);
|
||||
add_v0_6_16_Changes(changeInfos);
|
||||
add_v0_6_15_Changes(changeInfos);
|
||||
|
@ -55,6 +58,80 @@ public class vM0_6_7_X_Changes {
|
|||
add_v0_6_0_Changes(changeInfos);
|
||||
}
|
||||
|
||||
public static void add_v0_6_18_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
||||
ChangeInfo changes = new ChangeInfo("v0.6.0.0-Beta21-p2.9(圣诞)", 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 AutoShopRoBotSprite(), ("自动食品售货机"),
|
||||
("药水癔症的新东西,会在7,12,17,22层生成。【在圣诞节期间也会在地牢中常规生成】" )));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.NEWS), ("域名更换"),
|
||||
("由于原lingasdj.github.io域名已经更换为www.jdsalingzx.top,所以现在进行游戏新闻的地址更换。")));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("FPS帧率现在可显示"),
|
||||
("如果不习惯,可以到额外设置自行关闭。")));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战改动-1"),
|
||||
("突变巨兽改名为基因突变,隶属于T3挑战。具体挑战说明请参考挑战介绍")));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战改动-2"),
|
||||
("支离破碎现在不会再随机楼层,NPC除了红龙之王其他都会出现")));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战改动-3"),
|
||||
("药水癔症追加自动食品售货机,把金币准备好,去售货机里面购买需要的东西吧")));
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("挑战改动-4"),
|
||||
("污泥浊水的水灵药剂的治疗不再受药水异症影响,且有效时间变为100回合")));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CAKE), ("新食物:草莓蛋糕"),
|
||||
("在自动售货机内有售卖" )));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SWTR), ("新食物:魔法三明治"),
|
||||
("在自动售货机内有售卖" )));
|
||||
|
||||
changes = new ChangeInfo("调整", false, null);
|
||||
changes.hardlight(Window.SKYBULE_COLOR);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GAUNTLETS), ("碧灰双刃优化"),
|
||||
("碧灰双刃武器优化,现在效果是鬼磷燃烧,并且修正伤害,武器反噬成为概率,并且+3后不再反噬" )));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀成长调整"),
|
||||
("吸血鬼刀武器优化,成长数值调整" )));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WAR_HAMMER), ("白金大剑优化"),
|
||||
("白金大剑武器优化,现在效果是恐惧+眩晕+燃烧,并且修正伤害,武器反噬成为概率,并且+3后不再反噬" )));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ICEFISHSWORD), ("尚方宝剑优化"),
|
||||
("尚方宝剑武器优化,现在打一次相当于1.5个回合。" )));
|
||||
|
||||
changes = new ChangeInfo("修复", false, null);
|
||||
changes.hardlight(Window.CYELLOW);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.INFO), ("杂项改动"),
|
||||
("1.修复部分文案的描述错误\n2.终焉暂时移除,将在后续特殊模式添加\n3.暂时移除红绿两剑的生成,旧档不受影响,将在未来重做后加回")));
|
||||
|
||||
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_06X36")));
|
||||
|
||||
changes = new ChangeInfo("移除", false, null);
|
||||
changes.hardlight(Window.RED_COLOR);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes.addButton(new ChangeButton(new MolotovHuntsmanSprite(), ("血月火把猎人"),
|
||||
("移除此怪物的常规生成,将在未来版本调整后加入,但不再是普通怪物类型")));
|
||||
|
||||
changes.addButton(new ChangeButton(new SRPDHBLRTT(), ("火把猎人"),
|
||||
("移除此怪物的常规生成,将在未来版本调整后加入,但不再是普通怪物类型")));
|
||||
|
||||
}
|
||||
|
||||
public static void add_v0_6_17_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
||||
ChangeInfo changes = new ChangeInfo("v0.6.0.0-Beta21-p2.875", true, "");
|
||||
changes.hardlight(Window.TITLE_COLOR);
|
||||
|
|
|
@ -0,0 +1,222 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AutoRandomBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ReloadShop;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.AutoShopReBot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Shopkeeper;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.AutoShopRoBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.ItemSlot;
|
||||
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.watabou.noosa.Game;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class WndAutoShop extends Window {
|
||||
private static final int WIDTH = 120;
|
||||
private static final int BTN_SIZE = 32;
|
||||
private static final int BTN_GAP = 6;
|
||||
private static final int GAP = 6;
|
||||
|
||||
|
||||
public WndAutoShop() {
|
||||
IconTitle titlebar = new IconTitle();
|
||||
titlebar.setRect(0, 0, WIDTH, 0);
|
||||
titlebar.icon(new AutoShopRoBotSprite());
|
||||
titlebar.label(Messages.get(WndAutoShop.class,"welcome"));
|
||||
add( titlebar );
|
||||
RenderedTextBlock message = PixelScene.renderTextBlock( (Messages.get(WndAutoShop.class,"xwelcome")), 6 );
|
||||
message.maxWidth(WIDTH);
|
||||
message.setPos(0, titlebar.bottom() + GAP);
|
||||
add( message );
|
||||
|
||||
WndAutoShop.RewardButton shop1 = new WndAutoShop.RewardButton( AutoShopReBot.shop1 );
|
||||
shop1.setRect( (WIDTH - BTN_GAP) / 3f - BTN_SIZE, message.top() + message.height() + BTN_GAP, BTN_SIZE,
|
||||
BTN_SIZE );
|
||||
add( shop1 );
|
||||
|
||||
WndAutoShop.RewardButton shop2 = new WndAutoShop.RewardButton( AutoShopReBot.shop2 );
|
||||
shop2.setRect( shop1.right() + BTN_GAP, shop1.top(), BTN_SIZE, BTN_SIZE );
|
||||
add(shop2);
|
||||
|
||||
WndAutoShop.RewardButton shop3 = new WndAutoShop.RewardButton( AutoShopReBot.shop3 );
|
||||
shop3.setRect( shop2.right() + BTN_GAP, shop2.top(), BTN_SIZE, BTN_SIZE );
|
||||
add(shop3);
|
||||
|
||||
WndAutoShop.RewardButton bomb1 = new WndAutoShop.RewardButton( AutoShopReBot.shop4 );
|
||||
bomb1.setRect( shop1.left() , shop1.bottom(), BTN_SIZE, BTN_SIZE );
|
||||
add(bomb1);
|
||||
|
||||
WndAutoShop.RewardButton bomb2 = new WndAutoShop.RewardButton( AutoShopReBot.shop5);
|
||||
bomb2.setRect( bomb1.right()+ BTN_GAP , bomb1.top(), BTN_SIZE, BTN_SIZE );
|
||||
add(bomb2);
|
||||
|
||||
WndAutoShop.RewardButton bomb3 = new WndAutoShop.RewardButton( AutoShopReBot.shop6 );
|
||||
bomb3.setRect( bomb2.right()+ BTN_GAP , bomb2.top(), BTN_SIZE, BTN_SIZE );
|
||||
add(bomb3);
|
||||
|
||||
resize(WIDTH, (int) bomb3.bottom());
|
||||
}
|
||||
|
||||
public static WndBag sell() {
|
||||
return GameScene.selectItem( itemSelector );
|
||||
}
|
||||
|
||||
public static boolean canSell(Item item){
|
||||
if (item.value() <= 0) return false;
|
||||
if (item.unique && !item.stackable) return false;
|
||||
if (item instanceof Armor && ((Armor) item).checkSeal() != null) return false;
|
||||
if (item.isEquipped(Dungeon.hero) && item.cursed) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
private static WndBag.ItemSelector itemSelector = new WndBag.ItemSelector() {
|
||||
@Override
|
||||
public String textPrompt() {
|
||||
return Messages.get(Shopkeeper.class, "sell");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean itemSelectable(Item item) {
|
||||
return Shopkeeper.canSell(item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onSelect( Item item ) {
|
||||
if (item != null) {
|
||||
WndBag parentWnd = sell();
|
||||
GameScene.show( new WndTradeItem( item, parentWnd ) );
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
private void tell(String text) {
|
||||
Game.runOnRenderThread(new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
GameScene.show(new WndQuest(new AutoShopReBot(), text));
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
private void selectReward( Item reward ) {
|
||||
|
||||
hide();
|
||||
|
||||
reward.identify();
|
||||
if (reward.doPickUp( hero )) {
|
||||
GLog.i( Messages.get(hero, "you_now_have", reward.name()) );
|
||||
}
|
||||
|
||||
//Ghost.Quest.complete();
|
||||
}
|
||||
|
||||
private class RewardWindow extends WndInfoItem {
|
||||
|
||||
public RewardWindow( Item item ) {
|
||||
super(item);
|
||||
|
||||
RedButton btnConfirm = new RedButton(Messages.get(WndAutoShop.class, "buy")){
|
||||
@Override
|
||||
protected void onClick() {
|
||||
if(Dungeon.hero.buff(AutoRandomBuff.class) == null) {
|
||||
tell(Messages.get(WndAutoShop.class,"maxbuy"));
|
||||
for (Buff buff : hero.buffs()) {
|
||||
if (buff instanceof AutoRandomBuff) {
|
||||
buff.detach();
|
||||
}
|
||||
}
|
||||
} else if(Dungeon.gold > 200) {
|
||||
Dungeon.gold-=200* Random.Int(2)+hero.lvl/5+10;
|
||||
WndAutoShop.this.selectReward( item );
|
||||
if(Dungeon.hero.buff(AutoRandomBuff.class) != null) {
|
||||
AutoRandomBuff.level -= Random.Int(4);
|
||||
if(AutoRandomBuff.level <= 0) {
|
||||
for (Buff buff : hero.buffs()) {
|
||||
if (buff instanceof AutoRandomBuff) {
|
||||
buff.detach();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Buff.prolong( hero, ReloadShop.class, 1f);
|
||||
WndAutoShop.RewardWindow.this.hide();
|
||||
} else {
|
||||
tell(Messages.get(WndAutoShop.class,"nomoney"));
|
||||
WndAutoShop.RewardWindow.this.hide();
|
||||
}
|
||||
}
|
||||
};
|
||||
btnConfirm.setRect(0, height+2, width/2-1, 16);
|
||||
add(btnConfirm);
|
||||
|
||||
RedButton btnCancel = new RedButton(Messages.get(WndAutoShop.class, "cancel")){
|
||||
@Override
|
||||
protected void onClick() {
|
||||
hide();
|
||||
}
|
||||
};
|
||||
btnCancel.setRect(btnConfirm.right()+2, height+2, btnConfirm.width(), 16);
|
||||
add(btnCancel);
|
||||
|
||||
resize(width, (int)btnCancel.bottom());
|
||||
}
|
||||
}
|
||||
|
||||
public class RewardButton extends Component {
|
||||
|
||||
protected NinePatch bg;
|
||||
protected ItemSlot slot;
|
||||
|
||||
public RewardButton( Item item ){
|
||||
bg = Chrome.get( Chrome.Type.RED_BUTTON);
|
||||
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() {
|
||||
ShatteredPixelDungeon.scene().addToFront(new WndAutoShop.RewardWindow(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 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -593,6 +593,8 @@ public class WndSettings extends WndTabbed {
|
|||
OptionSlider optSplashScreen;
|
||||
OptionSlider quickslots;
|
||||
|
||||
CheckBox optFPSLimit;
|
||||
|
||||
@Override
|
||||
protected void createChildren() {
|
||||
title = PixelScene.renderTextBlock(Messages.get(this, "title"), 9);
|
||||
|
@ -626,6 +628,16 @@ public class WndSettings extends WndTabbed {
|
|||
optSplashScreen.setSelectedValue(SPDSettings.splashScreen());
|
||||
add(optSplashScreen);
|
||||
|
||||
optFPSLimit = new CheckBox( Messages.get(this, "fpsdisplay") ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
super.onClick();
|
||||
SPDSettings.FPSLimit(checked());
|
||||
}
|
||||
};
|
||||
optFPSLimit.checked(SPDSettings.FPSLimit());
|
||||
add(optFPSLimit);
|
||||
|
||||
quickslots = new OptionSlider(Messages.get(this, "quickslots"), "" + Constants.MIN_QUICKSLOTS,
|
||||
"" + Constants.MAX_QUICKSLOTS, Constants.MIN_QUICKSLOTS, Constants.MAX_QUICKSLOTS) {
|
||||
@Override
|
||||
|
@ -656,27 +668,29 @@ public class WndSettings extends WndTabbed {
|
|||
if (width > 200){
|
||||
ClassUI.setRect(0, bottom, width, SLIDER_HEIGHT);
|
||||
optSplashScreen.setRect(0, ClassUI.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
optFPSLimit.setRect(0, optSplashScreen.bottom() + GAP, width/2-1, SLIDER_HEIGHT);
|
||||
if(Game.scene()!=null && Game.scene().getClass() == GameScene.class) {
|
||||
quickslots.setRect(0, optSplashScreen.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
quickslots.setRect(optFPSLimit.right(), optFPSLimit.top(), width/2, SLIDER_HEIGHT);
|
||||
wxts.visible = false;
|
||||
} else {
|
||||
quickslots.visible = false;
|
||||
wxts.setRect(0, optSplashScreen.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
wxts.visible = false;
|
||||
}
|
||||
} else {
|
||||
ClassUI.setRect(0, bottom + GAP, width, SLIDER_HEIGHT);
|
||||
optSplashScreen.setRect(0, ClassUI.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
if(Game.scene()!=null && Game.scene().getClass() == GameScene.class) {
|
||||
wxts.visible = false;
|
||||
quickslots.setRect(0, optSplashScreen.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
} else {
|
||||
ClassUI.setRect(0, bottom + GAP, width, SLIDER_HEIGHT);
|
||||
optSplashScreen.setRect(0, ClassUI.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
optFPSLimit.setRect(0, optSplashScreen.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
if (Game.scene() == null || Game.scene().getClass() != GameScene.class) {
|
||||
quickslots.visible = false;
|
||||
wxts.setRect(0, optSplashScreen.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
} else {
|
||||
quickslots.setRect(0, optFPSLimit.bottom() + GAP, width, SLIDER_HEIGHT);
|
||||
|
||||
}
|
||||
wxts.visible = false;
|
||||
//GameScene
|
||||
}
|
||||
|
||||
height = ClassUI.bottom();
|
||||
height = quickslots.bottom();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -46,9 +46,9 @@ public class DebugNews extends NewsService {
|
|||
|
||||
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
|
||||
if (preferHTTPS) {
|
||||
httpGet.setUrl("https://lingasdj.github.io/MagicLingPixelDungeon_Sing/xml/news.xml");
|
||||
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
|
||||
} else {
|
||||
httpGet.setUrl("https://lingasdj.github.io/MagicLingPixelDungeon_Sing/xml/news.xml");
|
||||
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
|
||||
}
|
||||
|
||||
Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() {
|
||||
|
|
|
@ -46,9 +46,9 @@ public class ShatteredNews extends NewsService {
|
|||
|
||||
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
|
||||
if (preferHTTPS) {
|
||||
httpGet.setUrl("https://lingasdj.github.io/MagicLingPixelDungeon_Sing/xml/news.xml");
|
||||
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
|
||||
} else {
|
||||
httpGet.setUrl("https://lingasdj.github.io/MagicLingPixelDungeon_Sing/xml/news.xml");
|
||||
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
|
||||
}
|
||||
|
||||
Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user