diff --git a/build.gradle b/build.gradle index a2192eb8f..83221858e 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ allprojects { appName = 'Magic Ling Pixel Dungeon' appPackageName = 'com.ansdomagiclingpixeldungeon.ling' - appVersionCode =900906 - appVersionName = '0.6.3.0-Beta3.6' + appVersionCode =900908 + appVersionName = '0.6.3.0-Beta3.8' appJavaCompatibility = JavaVersion.VERSION_11 diff --git a/core/src/main/assets/interfaces/buffs.png b/core/src/main/assets/interfaces/buffs.png index dbf7b1e4e..3efa0ed50 100644 Binary files a/core/src/main/assets/interfaces/buffs.png and b/core/src/main/assets/interfaces/buffs.png differ diff --git a/core/src/main/assets/interfaces/large_buffs.png b/core/src/main/assets/interfaces/large_buffs.png index bd51d1046..3e29e0ba5 100644 Binary files a/core/src/main/assets/interfaces/large_buffs.png and b/core/src/main/assets/interfaces/large_buffs.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 9b60431f7..d8c165f56 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -302,6 +302,14 @@ actors.buffs.halomethaneburning.burnsup=%s被烧的渣都不剩了! actors.buffs.halomethaneburning.ondeath=你被磷火缠身燃烧的折磨至死… actors.buffs.halomethaneburning.rankings_desc=无法逃脱磷火缠身的痛苦 actors.buffs.halomethaneburning.desc=没什么比被磷火缠身更痛苦了。 \n\n磷火会每回合都会造成伤害直到它被液体扑灭或者自行消散。磷火会在你进入水中时熄灭,打碎药瓶产生的磷火也具有同样的效果。 \n\n此外,磷火还会点燃所有接触到的可燃地形(以及可燃地形上的可燃物)。 \n\n剩余的燃烧效果时长:%s回合\n\n]相比于一般的火焰,磷火更加危险且更加致命] + +actors.buffs.frostburning.name=霜火极寒 +actors.buffs.frostburning.heromsg=霜火覆盖了你的全身,你冷的不行了! +actors.buffs.frostburning.burnsup=%s被霜火冻成了冰块! +actors.buffs.frostburning.ondeath=你被霜火极寒冻死了… +actors.buffs.frostburning.rankings_desc=霜火极寒将你冻死了…… +actors.buffs.frostburning.desc=没有什么比被霜火更痛苦了。 \n\n霜火会每回合都会造成伤害直到它被液体扑灭或者自行消散,且回减缓燃烧者的移速。霜火无法用水熄灭,打碎药瓶产生的霜火也具有同样的效果。 \n\n剩余的燃烧效果时长:%s回合\n\n}相比于一般的火焰,霜火更加致命也更加危险} + actors.buffs.halofireimblue.name=磷火审判 actors.buffs.halofireimblue.desc=你被灌注了磷火的力量!\n\n所有物理攻击都可以使敌人磷火缠身。与此同时你对磷火,火焰完全免疫。\n\n剩余磷火审判效果时长:%s回合 @@ -656,7 +664,7 @@ actors.mobs.coldmagicrat$darkbolt.rankings_desc=寒冰魔力将你永久冻结 actors.mobs.fireghostdead.name=烈焰幽灵 actors.mobs.fireghostdead.frost_kill=焰浪过后,一片虚无! -actors.mobs.fireghostdead.desc=这只全身赤色的怨灵由地牢深处的死灵学家们从烈焰之中唤醒,虽然它们没有火元素强大,但也已可无限毗近。\n\n这个怪物会点燃你。 +actors.mobs.fireghostdead.desc=这只全身赤色的怨灵由地牢深处的死灵学家们从烈焰之中唤醒,虽然它们没有火元素强大,但也已可无限毗近。\n\n这个怪物会点燃你,且会使用远程攻击。 actors.mobs.fireghostdead$darkbolt.rankings_desc=焰浪过后,一片虚无! actors.hero.waterondeath=你被水的力量诅咒至死 @@ -978,6 +986,9 @@ actors.buffs.championenemy$halo.desc=鬼磷精英造成 15% 额外近战伤害 actors.buffs.championenemy$delaymob.name=苦痛精英 actors.buffs.championenemy$delaymob.desc=苦痛精英可以将受到的伤害进行延时释放,拥有 45% 额外近战伤害,拥有60%的伤害减免。 +actors.buffs.championenemy$king.name=炼狱精英 +actors.buffs.championenemy$king.desc=炼狱精英造成 45% 额外近战伤害,拥有30%的伤害减免。攻击有概率召唤1个火焰怨灵进行攻击。 + actors.buffs.championenemy.warn2=杀戮与不祥之意笼罩在整个地牢之中…… @@ -1061,7 +1072,7 @@ actors.buffs.frostimbue.desc=你被灌注了寒霜的力量!\n\n所有形式 actors.buffs.fury.name=愤怒 actors.buffs.fury.heromsg=你陷入了暴怒之中! -actors.buffs.fury.desc=你非常暴怒,很明显敌人并不喜欢这样的你。\n\n一股猛烈的怒火在你体内燃烧,增加你50%%的物理攻击伤害。\n\n只要你的生命还低于上限的50%%,该效果就会存在。 +actors.buffs.fury.desc=你非常暴怒,很明显敌人并不喜欢这样的你。\n\n一股猛烈的怒火在你体内燃烧,增加你50%的物理攻击伤害。 actors.buffs.blobimmunity.name=净化屏障 actors.buffs.blobimmunity.desc=一种奇怪的能量环绕在你的周围,为你阻挡有害的环境效果。\n\n在净化屏障的持续时间内,你将免疫所有负面环境效果。\n\n剩余的免疫效果时长:%s回合。 diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 3709686c9..2a62f7fe9 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -116,6 +116,25 @@ items.food.cake.desc=蛋糕是地牢中最稀有的食物,吃掉它可以立 items.food.switch.name=魔法三明治 items.food.switch.desc=三明治可以迅速让你横扫饥饿,并且获得一定的奥术护盾,缺点就是吃了它后再吃其他东西可能会感觉口味没它好。 + +items.food.ricedumplings.eat_msg_good=这个粽子的味道棒极了!\n你感觉有一股神秘力量将你体内的大部分负面魔力全面清除了。 + +items.food.ricedumplings$ricedumplingsred.name=蜜枣甜粽 +items.food.ricedumplings$ricedumplingsred.desc=粽子是节日的象征,吃掉它可以立刻清除大部分负面效果,并且会让你充满活力,不同的粽子所对应的效果也不同。\n\n这是一种蜜枣甜粽,吃掉它可以获得一定的治疗效果。而且在恐药异症情况下不会获得中毒效果,但是治疗效果会减半。\n\n[节日快乐! [ + +items.food.ricedumplings$ricedumplingspink.name=豆沙糕粽 +items.food.ricedumplings$ricedumplingspink.desc=粽子是节日的象征,吃掉它可以立刻清除大部分负面效果,并且会让你充满活力,不同的粽子所对应的效果也不同。\n\n这是一种豆沙糕粽,吃掉它可以获得一定的秘法护盾效果。\n\n[节日快乐! [ + +items.food.ricedumplings$ricedumplingsorange.name=清水莲子粽 +items.food.ricedumplings$ricedumplingsorange.desc=粽子是节日的象征,吃掉它可以立刻清除大部分负面效果,并且会让你充满活力,不同的粽子所对应的效果也不同。\n\n这是一种原味粽子,原汁原味,吃掉它可以获得一定的神器充能效果。\n\n[节日快乐! [ + +items.food.ricedumplings$ricedumplingslink.name=咸蛋黄粽 +items.food.ricedumplings$ricedumplingslink.desc=粽子是节日的象征,吃掉它可以立刻清除大部分负面效果,并且会让你充满活力,不同的粽子所对应的效果也不同。\n\n这是一种咸蛋黄粽,吃掉它可以获得一定的激素涌动+效果。\n\n[节日快乐! [ + +items.food.ricedumplings$ricedumplingsbottle.name=猪肉咸粽 +items.food.ricedumplings$ricedumplingsbottle.desc=粽子是节日的象征,吃掉它可以立刻清除大部分负面效果,并且会让你充满活力,不同的粽子所对应的效果也不同。\n\n这是一种猪肉咸粽,吃掉它可以获得永久力量加成+大地之力+磷火审判。\n\n[节日快乐! [ + + items.weapon.missiles.darts.halodart.name=磷焰飞镖 items.weapon.missiles.darts.halodart.desc=这些飞镖上涂着一种由磷焰花制成的药物,命中后会燃起磷焰。 @@ -161,6 +180,9 @@ items.food.potionoflightningshiled.desc=喝下这甜到掉牙的奇怪液体后 items.food.potionoflightningshiled.ac_oat=饮用药剂 items.food.potionoflightningshiled.look_msg=你感受到了电流在你体内融合……你暂时中和了电击反应。 +items.potions.exotic.potionoflightstromcloud.name=雷霆万钧合剂 +items.potions.exotic.potionoflightstromcloud.desc=瓶子内奇特的不稳定能量来自雷电的能量,可以让使用者一段时间获得操控雷电的力量,成为_雷电法王_。 + items.weapon.melee.endingblade.name=终焉 items.weapon.melee.endingblade.desc=不知道从哪来的一个拆开的场记板,貌似沾染了焰之诅咒,会随机产生_一种诅咒_,有着强大的侵蚀能力,一旦装备了它就无法脱身了……\n\n这个武器在攻击敌人的时候能吸收一定的浊焰能量,在汲取一定的浊焰能量后会产生新的能力以及自我升级。\n\n当前的浊焰能量: items.weapon.melee.endingblade.desc_2=\n\n(通过打击敌人减掉)死亡宣告当前冷却值为: @@ -300,7 +322,7 @@ items.food.alldrink.eat_msg=你感觉你又满血复活了。 items.food.alldrink.desc=由三个治疗药水通过回忆的技术造就了这个全能治疗饮料。\n使用者可以有一段时间的治疗,且处于饱腹阶段。 items.scrolls.scrollofflamecursed.name=极度秘卷 -items.scrolls.scrollofflamecursed.desc=极,代表着严寒。度,代表着炎热。奇异的魔法能量被禁锢在秘卷羊皮纸内,当这股能量被释放时会发出_耀眼的紫色审判光芒_,视野中的所有敌人都会被秘卷蕴藏的魔法力量审判。 \n\n由于这个秘卷有专属标识,所以无需被鉴定。 +items.scrolls.scrollofflamecursed.desc=极,代表着严寒。度,代表着炎热。奇异的魔法能量被禁锢在秘卷羊皮纸内,当这股能量被释放时会发出_耀眼的紫色审判光芒_,视野中的所有敌人都会被秘卷蕴藏的魔法力量审判,造成致命的霜火效果,霜火根据玩家的面板伤害提升。 \n\n由于这个秘卷有专属标识,所以无需被鉴定。 items.scrolls.scrollofflamecursed.none=这个卷轴产生了一阵耀眼的幻蓝光芒。 items.scrolls.scrollofflamecursed.one=这个卷轴产生了一阵耀眼的幻蓝光芒的同时%s被点燃了! items.scrolls.scrollofflamecursed.many=这个卷轴产生了一阵耀眼的幻蓝光芒的同时怪物们被点燃了! diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index dfd732279..98cb44927 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -300,8 +300,8 @@ challenges.aquaphobia=污泥浊水 challenges.aquaphobia_desc=地牢的水也被污染了\n\n(圣境层到矮人层踩水将会获得DeBuff,玩家在开局获得4瓶水灵药水,饮用可获得100回合的踩水不获得Debuff时间并获得祝福。)\n注意:矮人层饮用漂浮药剂或者水灵药剂都会获得极速Buff,且每大层会额外产生食人鱼房间。 challenges.champion_enemies=精英战场 challenges.champion_enemies_desc=会升级的不止你一个!\n\n・普通敌人刷出时有 1/8 \ - 的机率拥有特殊的精英属性。\n・精英敌人刷出时会立即醒来。\n・精英敌人免疫腐化效果。\n\n精英敌人有八种:\n_烈焰(橙色):_ 近战伤害 \ - +25% 且带有点燃效果,免疫火焰,死亡时引燃周围。\n_索敌(紫色):_ 近战伤害 +25%,近战范围 +4。\n_敌法(绿色):_ 受到伤害 -25%,拥有魔法免疫。\n_巨型(蓝色):_ 受到伤害 -75%,近战范围 +1,无法进入门与过道。\n_祝福(黄色):_ 精准与躲避 +200%。\n_成长(红色):_ 精准、躲避、攻击伤害与有效生命值 +20%。每过 3 回合会再增长 1%。\n_鬼磷(天蓝色):_ 近战伤害 +15% 且带有磷火效果,免疫火焰与磷火。\n_苦痛(暗紫色):_受到的伤害延缓释放,近战伤害+45%_ + 的机率拥有特殊的精英属性。\n・精英敌人刷出时会立即醒来。\n・精英敌人免疫腐化效果。\n\n精英敌人有九种:\n_烈焰(橙色):_ 近战伤害 \ + +25% 且带有点燃效果,免疫火焰,死亡时引燃周围。\n_索敌(紫色):_ 近战伤害 +25%,近战范围 +4。\n_敌法(绿色):_ 受到伤害 -25%,拥有魔法免疫。\n_巨型(蓝色):_ 受到伤害 -75%,近战范围 +1,无法进入门与过道。\n_祝福(黄色):_ 精准与躲避 +200%。\n_成长(红色):_ 精准、躲避、攻击伤害与有效生命值 +20%。每过 3 回合会再增长 1%。\n_鬼磷(天蓝色):_ 近战伤害 +15% 且带有磷火效果,免疫火焰与磷火。\n_苦痛(暗紫色):_受到的伤害延缓释放,近战伤害+45%\n_炼狱(深红色):_造成 45% 额外近战伤害,拥有30%的伤害减免。攻击有概率召唤1个火焰怨灵进行攻击。 challenges.stronger_bosses=梦魇领袖-测试版 challenges.stronger_bosses_desc=这项挑战让挑战 Boss 变得更有挑战性了!\n\n_克里弗斯之果:_\n_-_ 第二阶段:触手和本体可以远程攻击,并造成更加大的威胁\n_-_ 触手和本体在战斗过程中拥有额外护盾加成。\n_天狗:_生命 +25%\n_-_ 第一阶段:陷阱更加致命\n_-_ 第二阶段:技能频率更高\n_DM-300:_生命 +60%\n_-_ 能量塔更坚固。\n_-_ 技能频率更高,威力也更强大\n_-_ 超载时移动速度更高\n_-_ 击败时必掉落荆棘斗篷\n_矮人国王:_生命 +50%\n_-_ 整场战斗内召唤的随从都更强大\n_-_ 第一阶段:技能与召唤频率都更高\n_-_ 第二阶段:每轮额外召唤两个随从\n_-_ 第三阶段:生命值 +100%,召唤频率更高\n_Yog-Dzewa:_\n_-_ 同时召唤两个古神之拳!\n_-_ 激光攻击伤害 +60%\n_-_ 召唤更强大的随从 diff --git a/core/src/main/assets/messages/ui/ui.properties b/core/src/main/assets/messages/ui/ui.properties index c81aeac69..12537a88d 100644 --- a/core/src/main/assets/messages/ui/ui.properties +++ b/core/src/main/assets/messages/ui/ui.properties @@ -539,4 +539,6 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x75=-V0.6.3-Beta3.5\n1.修复一些 ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x76=-V0.6.3-Beta3.6\n1.修复PC端音乐偶尔崩溃的问题\n2.修复一些文案错误 +ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x77=-V0.6.3-Beta4.0\n1.修复上个版本的一些遗漏错误 + //ui.changelist.mlpd.vm0_5_x_changes.xxx// \ No newline at end of file diff --git a/core/src/main/assets/sprites/boss/SakaFishBoss.png b/core/src/main/assets/sprites/boss/SakaFishBoss.png new file mode 100644 index 000000000..63ee03372 Binary files /dev/null and b/core/src/main/assets/sprites/boss/SakaFishBoss.png differ diff --git a/core/src/main/assets/sprites/item_icons.png b/core/src/main/assets/sprites/item_icons.png index 0d8a218aa..dcc0e0e65 100644 Binary files a/core/src/main/assets/sprites/item_icons.png and b/core/src/main/assets/sprites/item_icons.png differ diff --git a/core/src/main/assets/sprites/items/items.png b/core/src/main/assets/sprites/items/items.png index a06567e77..04a884b04 100644 Binary files a/core/src/main/assets/sprites/items/items.png and b/core/src/main/assets/sprites/items/items.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java index 40f13434e..093ba34fe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Assets.java @@ -310,6 +310,9 @@ public class Assets { public static final String VSGR = "sprites/boss/SeaVastGirl.png"; + public static final String SKFS = "sprites/boss/SakaFishBoss.png"; + + public static final String DIMK = "sprites/boss/DimandKing.png"; public static final String DIED = "sprites/items/died.png"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java index 26f15035d..6a6ea4b3f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Dungeon.java @@ -85,6 +85,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.SewerBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.YogGodHardBossLevel; +import com.shatteredpixel.shatteredpixeldungeon.levels.ZeroLevel; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom; import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; @@ -462,7 +463,7 @@ public class Dungeon { } else switch (depth) { case 0: - level = new DM920BossLevel(); + level = new ZeroLevel(); break; case 1: case 2: diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index 51b54160d..eb218e867 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -49,6 +49,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Dread; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FireImbue; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Frost; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostImbue; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostImbueEX; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; @@ -624,6 +625,8 @@ public abstract class Char extends Actor { speed *= buff.speedFactor(); } + if ( buff( FrostBurning.class ) != null) speed *= 0.7f; + for (HasteLing.MobLing mobspeed : buffs(HasteLing.MobLing.class)){ speed *= mobspeed.speedFactor(); } @@ -658,11 +661,18 @@ public abstract class Char extends Actor { return; } - //TODO 减免20%伤害 + //TODO 减免40%伤害 if(buff(BlessImmune.class) != null && !this.isImmune(BlessImmune.class)){ dmg = (int) Math.ceil(dmg * 0.6f); } +// for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])){ +// if (mob.buff(ChampionEnemy.King.class) != null && !mob.properties().contains(Property.NOBIG) ){ +// dmg = (int) Math.ceil(dmg * 0.5f); +// } +// } + + if(isInvulnerable(src.getClass())){ sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "invulnerable")); return; @@ -1012,7 +1022,7 @@ public abstract class Char extends Actor { return false; } - protected HashSet properties = new HashSet<>(); + public HashSet properties = new HashSet<>(); public HashSet properties() { HashSet props = new HashSet<>(properties); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/FrostFire.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/FrostFire.java new file mode 100644 index 000000000..7cf68ab39 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/blobs/FrostFire.java @@ -0,0 +1,110 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; +import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FrostFlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; + +public class FrostFire extends Blob { + + @Override + protected void evolve() { + + boolean[] flamable = Dungeon.level.flamable; + int cell; + int fire; + + Freezing freeze = (Freezing)Dungeon.level.blobs.get( Freezing.class ); + //燃烧效果粒子总和 + + boolean observe = false; + + for (int i = area.left-1; i <= area.right; i++) { + for (int j = area.top-1; j <= area.bottom; j++) { + cell = i + j*Dungeon.level.width(); + if (cur[cell] > 0) { + + if (freeze != null && freeze.volume > 0 && freeze.cur[cell] > 0){ + freeze.clear(cell); + off[cell] = cur[cell] = 0; + continue; + } + + burn( cell ); + + fire = cur[cell] - 1; + if (fire <= 0 && flamable[cell]) { + + Dungeon.level.destroy( cell ); + + observe = true; + GameScene.updateMap( cell ); + + } + + } else if (freeze == null || freeze.volume <= 0 || freeze.cur[cell] <= 0) { + + if (flamable[cell] + && (cur[cell-1] > 0 + || cur[cell+1] > 0 + || cur[cell-Dungeon.level.width()] > 0 + || cur[cell+Dungeon.level.width()] > 0)) { + fire = 4; + burn( cell ); + area.union(i, j); + } else { + fire = 0; + } + + } else { + fire = 0; + } + + volume += (off[cell] = fire); + } + } + + if (observe) { + Dungeon.observe(); + } + } + + //定义燃烧效果和渲染燃烧行动 + public static void burn( int pos ) { + Char ch = Actor.findChar( pos ); + if (ch != null && !ch.isImmune(FrostFire.class)) { + Buff.affect( ch, FrostBurning.class ).reignite( ch ); + } + + Heap heap = Dungeon.level.heaps.get( pos ); + if (heap != null) { + heap.burn(); + } + + Plant plant = Dungeon.level.plants.get( pos ); + if (plant != null){ + plant.wither(); + } + } + + @Override + public void use( BlobEmitter emitter ) { + super.use( emitter ); + emitter.pour( FrostFlameParticle.FACTORY, 0.03f ); + //定义粒子系统 FrostFlameParticle渲染 + } + + @Override + public String tileDesc() { + return Messages.get(this, "desc"); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java index bb4e20055..79cd5ecd8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/ChampionEnemy.java @@ -31,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Fire; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.StormCloud; import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.FireGhostDead; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap; @@ -327,7 +328,7 @@ public abstract class ChampionEnemy extends Buff { //we roll for a champion enemy even if we aren't spawning one to ensure that //mobsToChampion does not affect levelgen RNG (number of calls to Random.Int() is constant) Class buffCls; - switch (Random.Int(8)){ + switch (Random.Int(9)){ case 0: default: buffCls = Blazing.class; break; case 1: buffCls = Projecting.class; break; case 2: buffCls = AntiMagic.class; break; @@ -336,6 +337,7 @@ public abstract class ChampionEnemy extends Buff { case 5: buffCls = Growing.class; break; case 6: buffCls = Halo.class; break; case 7: buffCls = DelayMob.class; break; + case 8: buffCls = King.class; break; } if (Dungeon.mobsToChampion <= 0 && Dungeon.isChallenged(Challenges.CHAMPION_ENEMIES)) { @@ -531,6 +533,38 @@ public abstract class ChampionEnemy extends Buff { } } + public static class King extends ChampionEnemy { + + { + color = 0xe74032; + } + + @Override + public int icon() { + return BuffIndicator.FIREDIED; + } + + @Override + public float meleeDamageFactor() { + + return 1.45f; + } + + @Override + public float damageTakenFactor() { + return 0.70f; + } + + @Override + public void onAttackProc(Char enemy) { + if(Random.NormalIntRange(1,8)>2){ + new FireGhostDead().spawnAround(enemy.pos+1); + } + } + + + } + public static class DeadSoulSX extends ChampionEnemy { { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostBurning.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostBurning.java new file mode 100644 index 000000000..e4bdeb53b --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/FrostBurning.java @@ -0,0 +1,181 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; + +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob; +import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.FrostFire; +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Thief; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ElmoParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.Heap; +import com.shatteredpixel.shatteredpixeldungeon.items.Item; +import com.shatteredpixel.shatteredpixeldungeon.items.food.ChargrilledMeat; +import com.shatteredpixel.shatteredpixeldungeon.items.food.FrozenCarpaccio; +import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.utils.Bundle; +import com.watabou.utils.Random; + +import java.util.ArrayList; + +public class FrostBurning extends Buff implements Hero.Doom { + + private static final float DURATION = 8f; + + private float left; + + private static final String LEFT = "left"; + + { + type = buffType.NEGATIVE; + announced = true; + } + + @Override + public void storeInBundle( Bundle bundle ) { + super.storeInBundle( bundle ); + bundle.put( LEFT, left ); + } + + @Override + public String iconTextDisplay() { + return Integer.toString((int)left); + } + + @Override + public void restoreFromBundle( Bundle bundle ) { + super.restoreFromBundle(bundle); + left = bundle.getFloat( LEFT ); + } + private int burnIncrement = 0; + @Override + public boolean act() { + + if (target.isAlive() && !target.isImmune(getClass())) { + + int damage = Random.NormalIntRange( 4,6 + Dungeon.depth/5 + hero.lvl/5 ); + //初始伤害4到6点 随着每深入5层+1伤害 随着玩家等级每升级5级+1伤害 + Buff.detach( target, Chill.class); + + if (target instanceof Hero) { + + Hero hero = (Hero)target; + + hero.damage( damage, this ); + burnIncrement++; + + //at 4+ turns, there is a (turns-3)/3 chance an item burns + if (Random.Int(3) < (burnIncrement - 3)){ + burnIncrement = 0; + + ArrayList burnable = new ArrayList<>(); + //does not reach inside of containers + for (Item i : hero.belongings.backpack.items){ + if (!i.unique && (i instanceof Scroll || i instanceof MysteryMeat || i instanceof FrozenCarpaccio)){ + burnable.add(i); + } + } + + if (!burnable.isEmpty()){ + Item toBurn = Random.element(burnable).detach(hero.belongings.backpack); + GLog.w( Messages.get(this, "burnsup", Messages.capitalize(toBurn.toString())) ); + if (toBurn instanceof MysteryMeat || toBurn instanceof FrozenCarpaccio){ + ChargrilledMeat steak = new ChargrilledMeat(); + if (!steak.collect( hero.belongings.backpack )) { + Dungeon.level.drop( steak, hero.pos ).sprite.drop(); + } + } + Heap.burnFX( hero.pos ); + } + } + + } else { + target.damage( damage, this ); + } + + if (target instanceof Thief && ((Thief) target).item != null) { + + Item item = ((Thief) target).item; + + if (!item.unique && item instanceof Scroll) { + target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 ); + ((Thief)target).item = null; + } else if (item instanceof MysteryMeat) { + target.sprite.emitter().burst( ElmoParticle.FACTORY, 6 ); + ((Thief)target).item = new ChargrilledMeat(); + } + + } + + } else { + + detach(); + } + + if (Dungeon.level.flamable[target.pos] && Blob.volumeAt(target.pos, FrostFire.class) == 0) { + GameScene.add( Blob.seed( target.pos, 6, FrostFire.class ) ); + } + + spend( TICK ); + left -= TICK; + + if (left <= 0 ) { + detach(); + } + + return true; + } + + public void reignite( Char ch ) { + reignite( ch, DURATION ); + } + + public void reignite( Char ch, float duration ) { + left = duration; + } + + @Override + public int icon() { + return BuffIndicator.SACRIFICE; + } + + @Override + public void fx(boolean on) { + if (on) target.sprite.add(CharSprite.State.FROSTBURNING); + else target.sprite.remove(CharSprite.State.FROSTBURNING); + } + + @Override + public String heroMessage() { + return Messages.get(this, "heromsg"); + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", dispTurns(left)); + } + + @Override + public float iconFadePercent() { + return Math.max(0, (DURATION - left) / DURATION); + } + + @Override + public void onDeath() { + Dungeon.fail( getClass() ); + GLog.n( Messages.get(this, "ondeath") ); + } +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java index 8245ac5e6..8ede02242 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/Fury.java @@ -25,22 +25,41 @@ import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; public class Fury extends Buff { - + public static int level = 0; + private int interval = 1; public static float LEVEL = 0.5f; + 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); + } + } + public int level() { + return level; + } { type = buffType.POSITIVE; announced = true; } - + @Override public boolean act() { - if (target.HP > target.HT * LEVEL) { + if (target.isAlive()) { + + spend( interval ); + if (--level <= 0) { + detach(); + } + + } else { + detach(); + } - - spend( TICK ); - + return true; } @@ -61,6 +80,7 @@ public class Fury extends Buff { @Override public String desc() { - return Messages.get(this, "desc"); + return Messages.get(this, "desc", level, dispTurns(visualcooldown())); } + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/StormCloudDied.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/StormCloudDied.java new file mode 100644 index 000000000..4572ebbb7 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/buffs/StormCloudDied.java @@ -0,0 +1,41 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.buffs; + +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; + +public class StormCloudDied extends FlavourBuff { + + public static final float DURATION = 30f; + + { + type = buffType.NEGATIVE; + announced = true; + } + + @Override + public int icon() { + return BuffIndicator.HEX; + } + + @Override + public float iconFadePercent() { + return Math.max(0, (DURATION - visualcooldown()) / DURATION); + } + + @Override + public String toString() { + return Messages.get(this, "name"); + } + + @Override + public String heroMessage() { + return Messages.get(this, "heromsg"); + } + + @Override + public String desc() { + return Messages.get(this, "desc", dispTurns()); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index 9c2a6b4eb..d0c3bd3ab 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -48,13 +48,12 @@ import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.MobPlacer; import com.shatteredpixel.shatteredpixeldungeon.items.Amulet; import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal; import com.shatteredpixel.shatteredpixeldungeon.items.Item; -import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask; +import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown; import com.shatteredpixel.shatteredpixeldungeon.items.Waterskin; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows; -import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.EtherealChains; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.WraithAmulet; @@ -67,7 +66,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.TestBooks; import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.YellowSunBooks; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie; -import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; +import com.shatteredpixel.shatteredpixeldungeon.items.food.RiceDumplings; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; @@ -75,28 +74,22 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLightningS import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlameX; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision; -import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfStrength; import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.WaterSoul; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRage; -import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfMysticalEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.spells.AquaBlast; -import com.shatteredpixel.shatteredpixeldungeon.items.spells.BeaconOfReturning; import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion; -import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFlock; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost; -import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfGodIce; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth; import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfScale; -import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfTransfusion; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger; @@ -108,7 +101,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RedBloodMoon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sai; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SkyShield; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WarHammer; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WashCrime; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingKnife; @@ -159,26 +151,23 @@ public enum HeroClass { if (Dungeon.isChallenged(Challenges.PRO)){ new LockSword().quantity(1).identify().collect(); new PotionOfInvisibility().quantity(45).identify().collect(); - new MysteryMeat().quantity(100).identify().collect(); + + new RiceDumplings.RiceDumplingsRed().quantity(100).identify().collect(); + new RiceDumplings.RiceDumplingsPink().quantity(100).identify().collect(); + new RiceDumplings.RiceDumplingsOrange().quantity(100).identify().collect(); + new RiceDumplings.RiceDumplingsLink().quantity(100).identify().collect(); + new RiceDumplings.RiceDumplingsBottle().quantity(100).identify().collect(); + new TimekeepersHourglass().quantity(1).identify().collect(); Buff.affect(hero, ChampionHero.AntiMagic.class, 50000f); new WraithAmulet().quantity(1).identify().collect(); new BloodthirstyThorn().quantity(1).identify().collect(); - + //new PotionOfLightStromCloud().quantity(10).identify().collect(); new WashCrime().quantity(1).identify().collect(); new MagicTorch().quantity(1).identify().collect(); - new WandOfTransfusion().quantity(2).identify().collect(); - new TengusMask().quantity(1).identify().collect(); - new ScrollOfIdentify().quantity(45).identify().collect(); - new ScrollOfTransmutation().quantity(45).identify().collect(); - new BeaconOfReturning().quantity(11).identify().collect(); - new WarHammer().quantity(1).identify().collect(); - new EtherealChains().quantity(1).identify().collect(); - new StoneOfFlock().quantity(50).identify().collect(); - new PotionOfMindVision().quantity(50).identify().collect(); - new PotionOfStrength().quantity(50).identify().collect(); + new PotionOfHealing().quantity(50).identify().collect(); new PotionOfLiquidFlame().quantity(50).identify().collect(); @@ -201,7 +190,7 @@ public enum HeroClass { new MagicTorch().quantity(1).identify().collect(); new SkyShield().quantity(1).identify().collect(); new WandOfScale().quantity(1).identify().collect(); - new WandOfGodIce().quantity(1).identify().collect(); + new KingsCrown().quantity(1).identify().collect(); new PotionOfLightningShiledX().quantity(1).identify().collect(); new LevelTeleporter().quantity(1).identify().collect(); new MobPlacer().quantity(1).identify().collect(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FireGhostDead.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FireGhostDead.java index 408ab94c1..a4ed6e064 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FireGhostDead.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/FireGhostDead.java @@ -41,24 +41,22 @@ import com.watabou.noosa.audio.Sample; import com.watabou.noosa.tweeners.AlphaTweener; import com.watabou.utils.Bundle; import com.watabou.utils.Callback; +import com.watabou.utils.PathFinder; import com.watabou.utils.Random; public class FireGhostDead extends Mob implements Callback { - private static final float TIME_TO_ZAP = 1f; + private static final float TIME_TO_ZAP = 2f; { spriteClass = FireGhostDeadSprite.class; - HP = HT = 6; + HP = HT = 20; defenseSkill = 4; EXP = 3; maxLvl = -228; - loot = Generator.Category.POTION; - lootChance = 0.1f; - properties.add(Property.UNDEAD); } private int level; @@ -96,6 +94,15 @@ public class FireGhostDead extends Mob implements Callback { } } + public void spawnAround( int pos ) { + for (int n : PathFinder.NEIGHBOURS1) { + int cell = pos + n; + if (Dungeon.level.passable[pos+1] && Actor.findChar( cell ) == null) { + spawnAt( cell ); + } + } + } + @Override public int damageRoll() { return Random.NormalIntRange( 5, 12 ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java new file mode 100644 index 000000000..2101bc305 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/SakaFishBoss.java @@ -0,0 +1,4 @@ +package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses; + +public class SakaFishBoss { +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FrostFlameParticle.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FrostFlameParticle.java new file mode 100644 index 000000000..33df328af --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/effects/particles/FrostFlameParticle.java @@ -0,0 +1,46 @@ +package com.shatteredpixel.shatteredpixeldungeon.effects.particles; + +import com.watabou.noosa.particles.Emitter; +import com.watabou.noosa.particles.PixelParticle; + +public class FrostFlameParticle extends PixelParticle.Shrinking { + + public static final Emitter.Factory FACTORY = new Emitter.Factory() { + @Override + public void emit( Emitter emitter, int index, float x, float y ) { + ((FrostFlameParticle)emitter.recycle( FrostFlameParticle.class )).reset( x, y ); + } + @Override + public boolean lightMode() { + return true; + }; + }; + + public FrostFlameParticle() { + super(); + + color(0xff0000); + lifespan = 0.6f; + + acc.set( 0, -80 ); + } + + public void reset( float x, float y ) { + revive(); + + this.x = x; + this.y = y; + + left = lifespan; + + size = 4; + speed.set( 0 ); + } + + @Override + public void update() { + super.update(); + float p = left / lifespan; + am = p > 0.8f ? (1 - p) * 5 : 1; + } +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java index 14a518d6e..5610d2108 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Generator.java @@ -21,6 +21,9 @@ package com.shatteredpixel.shatteredpixeldungeon.items; +import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.Holiday.DWJ; +import static com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel.holiday; + import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; @@ -47,6 +50,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.WraithAmulet; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.food.MysteryMeat; import com.shatteredpixel.shatteredpixeldungeon.items.food.Pasty; +import com.shatteredpixel.shatteredpixeldungeon.items.food.RiceDumplings; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; @@ -458,12 +462,21 @@ public class Generator { ForceCube.class }; MIS_T5.probs = new float[]{ 6, 5, 4 }; - + + int isDWJ = holiday == DWJ ? 3 : 0; + FOOD.classes = new Class[]{ Food.class, Pasty.class, - MysteryMeat.class }; - FOOD.probs = new float[]{ 4, 1, 0 }; + MysteryMeat.class, + + RiceDumplings.RiceDumplingsLink.class, + RiceDumplings.RiceDumplingsBottle.class, + RiceDumplings.RiceDumplingsRed.class, + RiceDumplings.RiceDumplingsOrange.class, + RiceDumplings.RiceDumplingsPink.class, + }; + FOOD.probs = new float[]{ 4, 1, 0, isDWJ,isDWJ,isDWJ,isDWJ,isDWJ }; RING.classes = new Class[]{ RingOfAccuracy.class, diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java index 3065be48c..85a5c5e45 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/Recipe.java @@ -47,6 +47,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfTo import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.WaterSoul; import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotion; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfRoseShiled; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Alchemize; @@ -230,6 +231,7 @@ public abstract class Recipe { new StewedMeat.threeMeat(), new MeatPie.Recipe(), new ScrollOfRoseShiled.Recipe(), + new ScrollOfFlameCursed.Recipe(), new WandOfBlueFuck.Recipe(), new IceFishSword.Recipe(), new LightFood.Recipe(), diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java index 0b4f2ade6..9c4ce0f93 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/Pasty.java @@ -30,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Recharging; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRecharging; +import com.shatteredpixel.shatteredpixeldungeon.levels.RegularLevel; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; @@ -38,45 +39,34 @@ import java.util.Calendar; public class Pasty extends Food { - //TODO: implement fun stuff for other holidays - //TODO: probably should externalize this if I want to add any more festive stuff. - private 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 - } - - private static Holiday holiday; - static{ - holiday = Holiday.NONE; + RegularLevel.holiday = RegularLevel.Holiday.NONE; final Calendar calendar = Calendar.getInstance(); switch(calendar.get(Calendar.MONTH)){ case Calendar.JANUARY: if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) - holiday = Holiday.XMAS; + RegularLevel.holiday = RegularLevel.Holiday.XMAS; break; //2022 9.10-10.1 case Calendar.SEPTEMBER: if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ - holiday = Holiday.ZQJ; + RegularLevel.holiday = RegularLevel.Holiday.ZQJ; } else { - holiday = Holiday.NONE; + RegularLevel.holiday = RegularLevel.Holiday.NONE; } break; case Calendar.OCTOBER: if (calendar.get(Calendar.DAY_OF_MONTH) == 1 ){ - holiday = Holiday.ZQJ; + RegularLevel.holiday = RegularLevel.Holiday.ZQJ; } else { - holiday = Holiday.NONE; + RegularLevel.holiday = RegularLevel.Holiday.NONE; } break; case Calendar.DECEMBER: if (calendar.get(Calendar.WEEK_OF_MONTH) >= 3) - holiday = Holiday.XMAS; + RegularLevel.holiday = RegularLevel.Holiday.XMAS; break; } } @@ -92,7 +82,7 @@ public class Pasty extends Food { @Override public void reset() { super.reset(); - switch(holiday){ + switch(RegularLevel.holiday){ case NONE: image = ItemSpriteSheet.PASTY; break; @@ -112,7 +102,7 @@ public class Pasty extends Food { protected void satisfy(Hero hero) { super.satisfy(hero); - switch(holiday){ + switch(RegularLevel.holiday){ case NONE: break; //do nothing extra case HWEEN: @@ -135,7 +125,7 @@ public class Pasty extends Food { @Override public String name() { - switch(holiday){ + switch(RegularLevel.holiday){ case NONE: default: return Messages.get(this, "pasty"); case HWEEN: @@ -149,7 +139,7 @@ public class Pasty extends Food { @Override public String info() { - switch(holiday){ + switch(RegularLevel.holiday){ case NONE: default: return Messages.get(this, "pasty_desc"); case HWEEN: diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/RiceDumplings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/RiceDumplings.java new file mode 100644 index 000000000..201d3f900 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/RiceDumplings.java @@ -0,0 +1,140 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.food; + +import com.shatteredpixel.shatteredpixeldungeon.Challenges; +import com.shatteredpixel.shatteredpixeldungeon.Dungeon; +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AdrenalineSurge; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArcaneArmor; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArtifactRecharge; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Doom; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Drowsy; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Fury; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HaloFireImBlue; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Healing; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hex; +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.items.potions.PotionOfStrength; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; + +public class RiceDumplings extends Food { + + { + image = ItemSpriteSheet.RiceDumplingsRed; + energy = 150f; + } + + 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); + Buff.detach( ch, Doom.class ); + Buff.detach( ch, HalomethaneBurning.class ); + Buff.detach( ch, FrostBurning.class ); + Buff.detach( ch, Burning.class ); + Buff.detach( ch, Hex.class ); + GLog.p(Messages.get(RiceDumplings.class, "eat_msg_good")); + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + cure(hero); + } + + public static class RiceDumplingsRed extends RiceDumplings { + + { + image = ItemSpriteSheet.RiceDumplingsRed; + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + if (Dungeon.isChallenged(Challenges.NO_HEALING)){ + Buff.affect(hero, Healing.class).setHeal((int) (0.4f * hero.HT + 8), 0.25f, 0); + } else { + Buff.affect(hero, Healing.class).setHeal((int) (0.8f * hero.HT + 14), 0.25f, 0); + } + } + } + + public static class RiceDumplingsPink extends RiceDumplings { + + { + image = ItemSpriteSheet.RiceDumplingsPink; + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + Buff.affect(hero,ArcaneArmor.class).set(Dungeon.hero.lvl + 10, 10); + } + } + + public static class RiceDumplingsOrange extends RiceDumplings { + + { + image = ItemSpriteSheet.RiceDumplingsOrange; + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + Buff.affect(curUser, ArtifactRecharge.class).set( 30 ).ignoreHornOfPlenty = false; + } + } + + public static class RiceDumplingsLink extends RiceDumplings { + + { + image = ItemSpriteSheet.RiceDumplingsLink; + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + Buff.affect(hero, AdrenalineSurge.class).reset(1, AdrenalineSurge.DURATION/2); + } + } + + public static class RiceDumplingsBottle extends RiceDumplings { + + { + image = ItemSpriteSheet.RiceDumplingsBottle; + } + + @Override + protected void satisfy(Hero hero) { + super.satisfy(hero); + Buff.affect(hero, Fury.class).set( (100), 1 ); + Buff.affect(hero, HaloFireImBlue.class).set(HaloFireImBlue.DURATION); + hero.STR++; + hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(PotionOfStrength.class, "msg_1")); + GLog.p(Messages.get(PotionOfStrength.class, "msg_2")); + } + } + + + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java index 3ef770b05..1ebd5af7f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/ExoticPotion.java @@ -70,6 +70,9 @@ public class ExoticPotion extends Potion { regToExo.put(PotionOfLiquidFlame.class, PotionOfDragonsBreath.class); exoToReg.put(PotionOfDragonsBreath.class, PotionOfLiquidFlame.class); +// regToExo.put(PotionOfLightningShiledX.class, PotionOfLightStromCloud.class); +// exoToReg.put(PotionOfLightStromCloud.class, PotionOfLightningShiledX.class); + regToExo.put(PotionOfLiquidFlameX.class, PotionOfDragonKingBreath.class); exoToReg.put(PotionOfDragonKingBreath.class, PotionOfLiquidFlameX.class); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfHolyFuror.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfHolyFuror.java deleted file mode 100644 index 81ab01a00..000000000 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfHolyFuror.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Pixel Dungeon - * Copyright (C) 2012-2015 Oleg Dolya - * - * Shattered Pixel Dungeon - * Copyright (C) 2014-2021 Evan Debenham - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see - */ - -package com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic; - -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bless; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; - -public class PotionOfHolyFuror extends ExoticPotion { - - { - icon = ItemSpriteSheet.Icons.POTION_HOLYFUROR; - } - - @Override - public void apply( Hero hero ) { - identify(); - Buff.prolong(hero, Bless.class, Bless.DURATION*4f); - } - -} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfLightStromCloud.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfLightStromCloud.java new file mode 100644 index 000000000..e341f2aab --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/potions/exotic/PotionOfLightStromCloud.java @@ -0,0 +1,18 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic; + +import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; + +public class PotionOfLightStromCloud extends ExoticPotion { + + { + icon = ItemSpriteSheet.Icons.POTION_SRTDIED; + } + + @Override + public void apply(Hero hero) { + identify(); + + } + +} diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java index 194bafb54..09b4d4d5f 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/quest/MIME.java @@ -28,7 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.watabou.utils.Bundle; import com.watabou.utils.Random; -@SuppressWarnings("all") + public class MIME extends Item { public boolean isMimeSupported = false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfFlameCursed.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfFlameCursed.java index fff4acffc..bc1b9cf0d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfFlameCursed.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/ScrollOfFlameCursed.java @@ -24,10 +24,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.actors.Char; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Chill; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.FrostBurning; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.effects.Flare; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; @@ -67,8 +65,7 @@ public class ScrollOfFlameCursed extends Scroll { if (mob != null){ if (mob.isAlive() && bolt.path.size() > bolt.dist+1) { - Buff.prolong(mob, Chill.class, Chill.DURATION/3f); - Buff.affect(mob, Bleeding.class).set((float) (10)); + Buff.affect( mob, FrostBurning.class ).reignite( mob, 25f ); } } @@ -84,12 +81,7 @@ public class ScrollOfFlameCursed extends Scroll { Mob affected = null; for (Mob mob : Dungeon.level.mobs.toArray( new Mob[0] )) { if (mob.alignment != Char.Alignment.ALLY && Dungeon.level.heroFOV[mob.pos]) { - Buff.affect( mob, Burning.class ).reignite( mob, 7f ); bolt(mob.pos, mob); - if (mob.buff(Burning.class) != null){ - count++; - affected = mob; - } } } @@ -116,7 +108,7 @@ public class ScrollOfFlameCursed extends Scroll { cost = 24; output = ScrollOfFlameCursed.class; - outQuantity = 3; + outQuantity = 2; } } @@ -126,6 +118,11 @@ public class ScrollOfFlameCursed extends Scroll { return true; } + @Override + public boolean isKnown() { + return true; + } + // @Override // public int value() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfRoseShiled.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfRoseShiled.java index 53e4402fe..99b0cfffe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfRoseShiled.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/scrolls/exotic/ScrollOfRoseShiled.java @@ -58,6 +58,11 @@ public class ScrollOfRoseShiled extends Scroll { return true; } + @Override + public boolean isKnown() { + return true; + } + @Override public void doRead() { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java index 00e261594..fda008cac 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/journal/Catalog.java @@ -80,6 +80,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfMight; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfSharpshooting; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfTenacity; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping; @@ -299,6 +300,7 @@ public enum Catalog { SCROLLS.seen.put( ScrollOfMirrorImage.class, false); SCROLLS.seen.put( ScrollOfTerror.class, false); SCROLLS.seen.put( ScrollOfRoseShiled.class, false); + SCROLLS.seen.put( ScrollOfFlameCursed.class, false); SCROLLS.seen.put( ScrollOfLullaby.class, false); SCROLLS.seen.put( ScrollOfRage.class, false); SCROLLS.seen.put( ScrollOfRetribution.class, false); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 19fd479ea..752896de5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -95,6 +95,7 @@ public abstract class RegularLevel extends Level { public enum Holiday{ NONE, + DWJ, ZQJ, //TBD HWEEN,//2nd week of october though first day of november XMAS //3rd week of december through first week of january @@ -110,7 +111,22 @@ public abstract class RegularLevel extends Level { if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) holiday = XMAS; break; - //2022 9.10-10.1 + //6.10-7.10 + case Calendar.JUNE: + if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ + holiday = Holiday.DWJ; + } else { + holiday = Holiday.NONE; + } + break; + case Calendar.JULY: + if (calendar.get(Calendar.DAY_OF_MONTH) == 10 ){ + holiday = Holiday.DWJ; + } else { + holiday = Holiday.NONE; + } + break; + //9.10-10.1 case Calendar.SEPTEMBER: if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ holiday = Holiday.ZQJ; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java index fddbab9b0..6af560e9c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/CharSprite.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash; import com.shatteredpixel.shatteredpixeldungeon.effects.TorchHalo; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FlameParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.FrostFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.HalomethaneFlameParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeFlameParticle; @@ -91,7 +92,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip public enum State { BURNING, LEVITATING, INVISIBLE, PARALYSED, FROZEN, ILLUMINATED, CHILLED, DARKENED, MARKED, HEALING, SHIELDED, - ROSESHIELDED,HALOMETHANEBURNING,BUTTER,SPINVISIBLE,SMOKER + ROSESHIELDED,HALOMETHANEBURNING,FROSTBURNING,BUTTER,SPINVISIBLE,SMOKER } private int stunStates = 0; @@ -126,6 +127,7 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip protected Emitter burning; protected Emitter haloburning; + protected Emitter frostburning; protected Emitter soling; protected Emitter chilled; protected Emitter marked; @@ -398,6 +400,13 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip Sample.INSTANCE.play( Assets.Sounds.BURNING ); } break; + case FROSTBURNING: + frostburning = emitter(); + frostburning.pour( FrostFlameParticle.FACTORY, 0.06f ); + if (visible) { + Sample.INSTANCE.play( Assets.Sounds.BURNING ); + } + break; case SMOKER: soling = emitter(); soling.pour( SmokeFlameParticle.FACTORY, 0.06f ); @@ -465,6 +474,12 @@ public class CharSprite extends MovieClip implements Tweener.Listener, MovieClip haloburning = null; } break; + case FROSTBURNING: + if (frostburning != null) { + frostburning.on = false; + frostburning = null; + } + break; case SMOKER: if (soling != null) { soling .on = false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java index 5feac47ca..05d5aa3c5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/ItemSpriteSheet.java @@ -683,6 +683,12 @@ public class ItemSpriteSheet { public static final int CrivusFruitFood = QUEST+9; public static final int CrivusFruitflake = QUEST+10; + + public static final int RiceDumplingsRed = QUEST+11; + public static final int RiceDumplingsPink = QUEST+12; + public static final int RiceDumplingsOrange = QUEST+13; + public static final int RiceDumplingsLink = QUEST+14; + public static final int RiceDumplingsBottle = QUEST+15; static{ assignItemRect(SKULL, 16, 11); assignItemRect(DUST, 12, 11); @@ -695,6 +701,12 @@ public class ItemSpriteSheet { assignItemRect(SHARD, 8, 10); assignItemRect(CrivusFruitFood, 11, 14); assignItemRect(CrivusFruitflake, 13, 13); + + assignItemRect(RiceDumplingsRed, 14, 14); + assignItemRect(RiceDumplingsPink, 14, 14); + assignItemRect(RiceDumplingsOrange, 14, 14); + assignItemRect(RiceDumplingsLink, 14, 13); + assignItemRect(RiceDumplingsBottle, 14, 14); } private static final int BAGS = xy(1, 31); //16 slots @@ -1005,7 +1017,7 @@ public class ItemSpriteSheet { public static final int POTION_CLEANSE = EXOTIC_POTIONS+10; public static final int POTION_DIVINE = EXOTIC_POTIONS+11; public static final int POTION_DRAGONKING= EXOTIC_POTIONS+12; - public static final int POTION_HOLYFUROR= EXOTIC_POTIONS+13; + public static final int POTION_SRTDIED= EXOTIC_POTIONS+13; static { assignIconRect( POTION_MASTERY, 7, 7 ); assignIconRect( POTION_SHIELDING, 6, 6 ); @@ -1020,7 +1032,7 @@ public class ItemSpriteSheet { assignIconRect( POTION_CLEANSE, 7, 7 ); assignIconRect( POTION_DIVINE, 7, 7 ); assignIconRect( POTION_DRAGONKING, 7, 7 ); - assignIconRect( POTION_HOLYFUROR, 5, 7 ); + assignIconRect( POTION_SRTDIED, 6, 7 ); } //16 free slots diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SakaFishBossSprites.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SakaFishBossSprites.java new file mode 100644 index 000000000..9cfe5212c --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SakaFishBossSprites.java @@ -0,0 +1,31 @@ +package com.shatteredpixel.shatteredpixeldungeon.sprites; + +import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.watabou.noosa.TextureFilm; + +public class SakaFishBossSprites extends MobSprite { + + public SakaFishBossSprites() { + super(); + + texture( Assets.Sprites.SKFS ); + + TextureFilm frames = new TextureFilm( texture, 29, 15 ); + + idle = new Animation( 12, true ); + idle.frames( frames, 7,7,8,9,10 ); + + run = new Animation( 10, true ); + run.frames( frames, 2,3 ); + + attack = new Animation( 15, false ); + attack.frames( frames, 4,5,6 ); + + die = new Animation( 10, false ); + die.frames( frames, 1 ); + + play( idle ); + } + +} + diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java index 0fb3caa4c..a6ba5ac76 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java @@ -119,6 +119,8 @@ public class BuffIndicator extends Component { public static final int ICE_SWORDDOWN = 66; + public static final int LIGHT_DIED = 67; + public static final int SIZE_SMALL = 7; public static final int SIZE_LARGE = 16; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java index fc55b37db..b3d9d0653 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java @@ -27,7 +27,6 @@ import static com.shatteredpixel.shatteredpixeldungeon.ui.Window.RED_COLOR; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Challenges; -import com.shatteredpixel.shatteredpixeldungeon.Conducts; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.SPDAction; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; @@ -168,17 +167,7 @@ public class MenuPane extends Component { add(challengeButton); } - if (!Dungeon.isDLC(Conducts.Conduct.NULL)){ - gameHappyIcon = Icons.get(Icons.HAPPY_ICON); - add(gameHappyIcon); - gameHappyIconButton = new Button(){ - @Override - protected void onClick() { - // - } - }; - add(gameHappyIconButton); - } + btnJournal = new JournalButton(); add( btnJournal ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java index 2e4303421..7c0e35009 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/QuickRecipe.java @@ -40,8 +40,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.Pasty; import com.shatteredpixel.shatteredpixeldungeon.items.food.StewedMeat; import com.shatteredpixel.shatteredpixeldungeon.items.potions.AlchemicalCatalyst; import com.shatteredpixel.shatteredpixeldungeon.items.potions.Potion; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLightningShiledX; +import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlameX; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfNoWater; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfPurity; @@ -61,6 +63,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.ExoticPotio import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake; import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.Scroll; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed; +import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ExoticScroll; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfRoseShiled; import com.shatteredpixel.shatteredpixeldungeon.items.spells.Alchemize; @@ -351,15 +355,6 @@ public class QuickRecipe extends Component { ArrayList in = new ArrayList<>(Arrays.asList(pot)); result.add(new QuickRecipe( r, in, r.sampleOutput(in))); } - //TODO 未来加入 -// result.add(new QuickRecipe( new ScrollOfFlameCursed.Recipe(), -// new ArrayList(Arrays.asList(new PotionOfLiquidFlame(), new ScrollOfTerror(), -// new PotionOfFrost())), -// new ScrollOfFlameCursed().quantity(3))); - result.add(new QuickRecipe( new ScrollOfRoseShiled.Recipe(), - new ArrayList(Arrays.asList(new PotionOfPurity(), new AlchemicalCatalyst(), - new StoneOfBlink())), - new ScrollOfRoseShiled().quantity(3))); return result; case 4: r = new ExoticScroll.ScrollToExotic(); @@ -368,6 +363,14 @@ public class QuickRecipe extends Component { ArrayList in = new ArrayList<>(Arrays.asList(scroll)); result.add(new QuickRecipe( r, in, r.sampleOutput(in))); } + result.add(new QuickRecipe( new ScrollOfFlameCursed.Recipe(), + new ArrayList(Arrays.asList(new PotionOfLiquidFlame(), new ScrollOfTerror(), + new PotionOfFrost())), + new ScrollOfFlameCursed().quantity(2))); + result.add(new QuickRecipe( new ScrollOfRoseShiled.Recipe(), + new ArrayList(Arrays.asList(new PotionOfPurity(), new AlchemicalCatalyst(), + new StoneOfBlink())), + new ScrollOfRoseShiled().quantity(3))); return result; case 5: r = new Bomb.EnhanceBomb(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java index 21dd244fe..af1fea27c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java @@ -54,6 +54,7 @@ import java.util.ArrayList; public class vM0_6_7_X_Changes { public static void addAllChanges(ArrayList changeInfos) { + add_v0_6_49_Changes(changeInfos); add_v0_6_48_Changes(changeInfos); add_v0_6_47_Changes(changeInfos); add_v0_6_46_Changes(changeInfos); @@ -105,6 +106,34 @@ public class vM0_6_7_X_Changes { add_v0_6_0_Changes(changeInfos); } + public static void add_v0_6_49_Changes( ArrayList changeInfos ) { + ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.8", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.RiceDumplingsRed), ("五粽送福-端午安康"), + ("地牢产生了奇特的食物,据说名为粽子,有效时间:6.20-7.10(每年)"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("第九个精英-炼狱"), + ("炼狱精英为极为特殊的精英,小心行事!"))); + + changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG24), ("秘卷回归-极度秘卷"), + ("霜火的审判,极度的实验。极度秘卷,现在回归"))); + + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16), + Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X77"))); + + } + public static void add_v0_6_48_Changes( ArrayList changeInfos ) { ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.6", true, ""); changes.hardlight(Window.TITLE_COLOR);