diff --git a/build.gradle b/build.gradle index 356d3f4c8..438ce0268 100644 --- a/build.gradle +++ b/build.gradle @@ -18,8 +18,8 @@ allprojects { appName = 'Magic Ling Pixel Dungeon' appPackageName = 'com.ansdomagiclingpixeldungeon.ling' - appVersionCode =907500 - appVersionName = '0.6.5.0-Alpha4' + appVersionCode =907550 + appVersionName = '0.6.5.0-Alpha4.5' appJavaCompatibility = JavaVersion.VERSION_11 diff --git a/core/src/main/assets/interfaces/passwordbadges.png b/core/src/main/assets/interfaces/passwordbadges.png index 196ece7de..c9a2b1e9f 100644 Binary files a/core/src/main/assets/interfaces/passwordbadges.png and b/core/src/main/assets/interfaces/passwordbadges.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index 11a197d63..4cfb77fbe 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -840,7 +840,7 @@ actors.mobs.slimeking.name=史莱姆王子 actors.mobs.slimeking.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。[设计原型:泰拉瑞亚] actors.mobs.spical.slimekingmob.name=史莱姆王子 -actors.mobs.spical.slimekingmob.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。[设计原型:泰拉瑞亚] +actors.mobs.spical.slimekingmob.desc=史莱姆王子,史莱姆族群的代理人,没有人能从它这里活着走过去。你或许在质疑为什么会有它的存在,实际上,这也是史莱姆一族需要解决的问题。\n\n怪物设计原型:泰拉瑞亚 actors.mobs.slimeking.notice=你清楚你在与谁抗衡吗? actors.mobs.slimeking.defeated=不……这不可能…… diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index 5c9ab1ee9..244c4dc4f 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -183,8 +183,8 @@ items.scrolls.exotic.scrollofconfusion.desc=当阅读这张秘卷后,所有你 items.scrolls.exotic.scrollofpetrification.name=石化秘卷 items.scrolls.exotic.scrollofpetrification.desc=一道红色的诡异闪光将以恐惧压垮使用者视觉范围内生物的心智并使它们呆立在原地。 -items.weapon.enchantments.haloblazing.name=鬼磷%s -items.weapon.enchantments.haloblazing.desc=这个附魔会使磷火从武器中喷薄而出,能够使用点燃敌人并对正在燃烧的敌人造成中毒的额外伤害。 + + items.potions.exotic.potionofdragonkingbreath.name=龙王祝福合剂 items.potions.exotic.potionofdragonkingbreath.desc=瓶子内奇特的化合物来自于_龙王-磷邬_,会在接触武器,护甲后激发它们的力量(获得一种随机附魔),并迅速消散在空中,与此同时还会产生一个大范围的磷火区域。 @@ -1957,6 +1957,13 @@ items.weapon.enchantments.unstable.desc=紊乱附魔的武器周身散布着混 items.weapon.enchantments.vampiric.name=血饮%s items.weapon.enchantments.vampiric.desc=这个强大的附魔能在攻击敌人时吸取其生命能量并恢复使用者的生命。当使用者生命较少时效果更强。 +items.weapon.enchantments.haloblazing.name=鬼磷%s +items.weapon.enchantments.haloblazing.desc=这个附魔会使磷火从武器中喷薄而出,能够使用点燃敌人并对正在燃烧的敌人造成中毒的额外伤害。 + +items.weapon.enchantments.crushing.name=爆破%s +items.weapon.enchantments.crushing.desc=这个附魔会让使用者陷入癫狂,能使爆炸的能量从武器中喷薄而出,能够使敌人目标处受到一次范围伤害亦或者给造成敌人短暂的残废效果。 +items.weapon.enchantments.crushing.kill=%s:炸死你!啊哈哈哈…… + ###melee weapons items.weapon.melee.assassinsblade.name=暗杀之刃 diff --git a/core/src/main/assets/messages/misc/misc.properties b/core/src/main/assets/messages/misc/misc.properties index 513fa68e7..903c84062 100644 --- a/core/src/main/assets/messages/misc/misc.properties +++ b/core/src/main/assets/messages/misc/misc.properties @@ -165,10 +165,10 @@ badges$badge.clear_water.title=净化大师 badges$badge.clear_water.desc=完成挑战:污泥浊水 badges$badge.ghostdage.title=白幽祝福 -badges$badge.ghostdage.desc=_在幽妹处获得一次+3品质武器或护甲\n\n_(镀层需求:+4品质武器) +badges$badge.ghostdage.desc=_在悲伤幽灵处获得一次+3品质武器或护甲\n\n_(镀层需求:+4品质武器) badges$badge.dageto.title=白幽神谕 -badges$badge.dageto.desc=在幽妹处获得一次_+4_品质武器或护甲\n\n[你已成功镀层[ +badges$badge.dageto.desc=在悲伤幽灵处获得一次_+4_品质武器或护甲\n\n[你已成功镀层[ badges$badge.endied.title=终焉之旅 badges$badge.endied.desc=_(获得彩蛋武器终焉)_,目前版本暂时无法获得 @@ -295,6 +295,12 @@ paswordbadges$badge.exsg.desc=药水癔症只是一个假象,你仍然坚持 paswordbadges$badge.godd_make.title=暗室逢灯 paswordbadges$badge.godd_make.desc=累计完成老杖匠的全部委托任务,现在,是他回报恩人的时候了。\n\n_奖励:0层随机戒指(四大基座上)_ +paswordbadges$badge.zqj_ghost.title=映月离合之殇 +paswordbadges$badge.zqj_ghost.desc=完成悲伤幽灵的中秋时期特别任务。\n\n[你太棒了,我所深爱着的搭档[ + +paswordbadges$badge.night_cat.title=不眠之夜 +paswordbadges$badge.night_cat.desc=在现实时间的夜间单局游玩超过6000回合\n(游戏固然好玩,但也要劳逸结合)\n\n[再玩一局就睡觉……睡觉了,啊?怎么早上七点了?! + challenges.no_food=缩餐节食 challenges.no_food_desc=食物本就稀缺,但你还需要注意节食!\n\n・使用各类食物与丰饶之角的饱腹效果为原本的三分之一。\n・其他恢复饥饿的机制不受影响。 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java index f91961757..f67f0885e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/PaswordBadges.java @@ -49,10 +49,18 @@ public class PaswordBadges { public static void BIGX() { displayBadge( PaswordBadges.Badge.BIG_X ); } + public static void EXSG() { displayBadge( PaswordBadges.Badge.EXSG ); } + public static void NIGHT_CAT() { + displayBadge( PaswordBadges.Badge.NIGHT_CAT ); + } + + public static void ZQJ_FLOWER() { + displayBadge( Badge.ZQJ_GHOST ); + } public enum Badge { @@ -70,7 +78,11 @@ public class PaswordBadges { GODD_MAKE(12), BIG_X(13), - EXSG(14); + EXSG(14), + NIGHT_CAT(16), + + ZQJ_GHOST(17); + public boolean meta; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index 2df69e2fa..7d153a29f 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 @@ -93,7 +93,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves; -import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.IceFishSword; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Greatsword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LockSword; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagicTorch; @@ -156,7 +156,7 @@ public enum HeroClass { if (Dungeon.isChallenged(Challenges.PRO)){ new LevelTeleporter().quantity(1).identify().collect(); new LockSword().quantity(1).identify().collect(); - new IceFishSword().quantity(1).identify().collect(); + new Greatsword().quantity(1).identify().collect(); new PotionOfInvisibility().quantity(45).identify().collect(); new AncityArmor().quantity(1).identify().collect(); new TengusMask().quantity(1).identify().collect(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java index 58086cedc..7060a4d45 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/Talent.java @@ -607,9 +607,11 @@ public enum Talent { public static void initArmorTalents( Hero hero ){ initArmorTalents( hero.armorAbility, hero.talents); } - - public static void initArmorTalents(ArmorAbility abil, ArrayList> talents ){ - if (abil == null) return; + public static ArrayList> initArmorTalents(ArmorAbility abil){ + return initArmorTalents(abil, new ArrayList()); + } + public static ArrayList> initArmorTalents(ArmorAbility abil, ArrayList> talents ){ + if (abil == null) return talents; while (talents.size() < MAX_TALENT_TIERS){ talents.add(new LinkedHashMap<>()); @@ -618,6 +620,7 @@ public enum Talent { for (Talent t : abil.talents()){ talents.get(3).put(t, 0); } + return talents; } private static final String TALENT_TIER = "talents_tier_"; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java index 90b82508b..433ca065b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/bosses/CrivusFruits.java @@ -29,9 +29,13 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Bee; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; +import com.shatteredpixel.shatteredpixeldungeon.effects.Beam; import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter; +import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; +import com.shatteredpixel.shatteredpixeldungeon.effects.TargetedCell; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose; import com.shatteredpixel.shatteredpixeldungeon.items.food.CrivusFruitsFood; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; @@ -40,23 +44,33 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey; import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LifeTreeSword; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; +import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar; +import com.shatteredpixel.shatteredpixeldungeon.ui.Window; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.watabou.noosa.Camera; +import com.watabou.noosa.Game; import com.watabou.noosa.audio.Sample; +import com.watabou.utils.Bundle; import com.watabou.utils.PathFinder; import com.watabou.utils.Random; +import java.util.ArrayList; import java.util.HashSet; //克里弗斯之果 本体 public class CrivusFruits extends Mob { //the actual affected cells private HashSet affectedCells; + private static final int MIN_ABILITY_CD = 7; + private int lastHeroPos; + private static final int MAX_ABILITY_CD = 12; + private ArrayList targetedCells = new ArrayList<>(); //the cells to trace fire shots to, for visual effects. private HashSet visualCells; //基本属性 @@ -74,6 +88,74 @@ public class CrivusFruits extends Mob { properties.add(Property.BOSS); } + private int phase = 1; + private int drop = Random.Int(5); + private int summonsMade = 0; + + private float summonCooldown = 0; + private float abilityCooldown = 3; + private static final int MIN_COOLDOWN = 7; + private static final int MAX_COOLDOWN = 11; + + private static float[] chanceMap = {0f, 100f, 100f, 100f, 100f, 100f, 100f}; + private int wave=0; + + private int lastAbility = 0; + private static final int NONE = 0; + private static final int LINK = 1; + private static final int TELE = 2; + private static final int ENRAGE = 3; + private static final int DEATHRATTLE = 4; + private static final int SACRIFICE = 5; + private static final int SUMMON = 6; + + private static final String PHASE = "phase"; + private static final String SUMMONS_MADE = "summons_made"; + + private static final String SUMMON_CD = "summon_cd"; + private static final String ABILITY_CD = "ability_cd"; + private static final String LAST_ABILITY = "last_ability"; + + private static final String TARGETED_CELLS = "targeted_cells"; + + @Override + public void storeInBundle(Bundle bundle) { + super.storeInBundle(bundle); + bundle.put( PHASE, phase ); + bundle.put( SUMMONS_MADE, summonsMade ); + bundle.put( SUMMON_CD, summonCooldown ); + bundle.put( ABILITY_CD, abilityCooldown ); + bundle.put( LAST_ABILITY, lastAbility ); + bundle.put("wavePhase2", wave); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + + @Override + public void restoreFromBundle(Bundle bundle) { + super.restoreFromBundle(bundle); + phase = bundle.getInt( PHASE ); + summonsMade = bundle.getInt( SUMMONS_MADE ); + summonCooldown = bundle.getFloat( SUMMON_CD ); + abilityCooldown = bundle.getFloat( ABILITY_CD ); + lastAbility = bundle.getInt( LAST_ABILITY ); + wave = bundle.getInt("wavePhase2"); + + if (phase == 2) properties.add(Property.IMMOVABLE); + + //暴力Boss + int[] bundleArr = new int[targetedCells.size()]; + for (int i = 0; i < targetedCells.size(); i++){ + bundleArr[i] = targetedCells.get(i); + } + bundle.put(TARGETED_CELLS, bundleArr); + } + //无敌也要扣减! public static class DiedDamager extends Buff { @@ -146,6 +228,7 @@ public class CrivusFruits extends Mob { GameScene.add(Blob.seed(pos, HP<65 ? 50 : 30, DiedBlobs.class)); } else { GameScene.add(Blob.seed(pos, HP<36 ? 150 : 50, DiedBlobs.class)); + //doYogLasers(); } @@ -161,6 +244,7 @@ public class CrivusFruits extends Mob { GLog.n(Messages.get(this,"anargy")); crivusfruitslevel2 = true; GameScene.flash(0x808c8c8c); + //doYogLasers(); for (int i : ForestBossLasherTWOPos) { CrivusFruitsLasher csp = new CrivusFruitsLasher(); csp.pos = i; @@ -322,4 +406,74 @@ public class CrivusFruits extends Mob { immunities.add( Vertigo.class ); } + public void doYogLasers(){ + boolean terrainAffected = false; + HashSet affected = new HashSet<>(); + //delay fire on a rooted hero + if(enemy != null) { + if (!enemy.rooted) { + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, lastHeroPos, Ballistica.WONT_STOP); + //shoot beams + sprite.parent.add(new Beam.DeathRayS(DungeonTilemap.raisedTileCenterToWorld(i), + DungeonTilemap.raisedTileCenterToWorld(b.collisionPos))); + for (int p : b.path) { + Char ch = Actor.findChar(p); + if (ch != null && (ch.alignment != alignment || ch instanceof Bee)) { + affected.add(ch); + } + if (Dungeon.level.flamable[p]) { + Dungeon.level.destroy(p); + GameScene.updateMap(p); + terrainAffected = true; + } + } + } + if (terrainAffected) { + Dungeon.observe(); + } + for (Char ch : affected) { + ch.damage(Random.NormalIntRange(8, 12),this); + + if (Dungeon.level.heroFOV[pos]) { + ch.sprite.flash(); + CellEmitter.center(pos).burst(Speck.factory(Speck.COIN), Random.IntRange(2, 3)); + } + if (!ch.isAlive() && ch == Dungeon.hero) { + Dungeon.fail(getClass()); + GLog.n(Messages.get(Char.class, "kill", name())); + } + } + targetedCells.clear(); + } + } + if(enemy != null) { + if (abilityCooldown <= 0 && HP < HT * 0.8f) { + lastHeroPos = enemy.pos; + + int beams = (int) (4 + (HP * 1.0f / HT) * 4); + for (int i = 0; i < beams; i++) { + int randompos = Random.Int(Dungeon.level.width()) + Dungeon.level.width() * 2; + targetedCells.add(randompos); + } + + for (int i : targetedCells) { + Ballistica b = new Ballistica(i, enemy.pos, Ballistica.WONT_STOP); + + for (int p : b.path) { + Game.scene().addToFront(new TargetedCell(p, Window.DeepPK_COLOR)); + } + } + + spend(TICK * 1.5f); + Dungeon.hero.interrupt(); + abilityCooldown += Random.NormalFloat(MIN_ABILITY_CD - 2 * (1 - (HP * 1f / HT)), + MAX_ABILITY_CD - 5 * (1 - (HP * 1f / HT))); + } else { + spend(TICK); + } + } + if (abilityCooldown > 0) abilityCooldown-= 5; + } + } \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java index 1fbe15ca1..edffdb16d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/bombs/Bomb.java @@ -21,6 +21,8 @@ package com.shatteredpixel.shatteredpixeldungeon.items.bombs; +import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; + import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.SPDSettings; @@ -191,7 +193,7 @@ public class Bomb extends Item { ch.damage(dmg, this); } - if (ch == Dungeon.hero && !ch.isAlive()) { + if (ch == hero && !ch.isAlive()) { Dungeon.fail(Bomb.class); } } @@ -202,6 +204,78 @@ public class Bomb extends Item { } } + public void explodeHeros(int cell){ + //We're blowing up, so no need for a fuse anymore. + this.fuse = null; + + Sample.INSTANCE.play( Assets.Sounds.BLAST ); + + if (explodesDestructively()) { + + ArrayList affected = new ArrayList<>(); + + if (Dungeon.level.heroFOV[cell]) { + CellEmitter.center(cell).burst(BlastParticle.FACTORY, 30); + } + + boolean terrainAffected = false; + for (int n : PathFinder.NEIGHBOURS9) { + int c = cell + n; + if (c >= 0 && c < Dungeon.level.length()) { + if (Dungeon.level.heroFOV[c]) { + CellEmitter.get(c).burst(SmokeParticle.FACTORY, 4); + } + + if (Dungeon.level.flamable[c]) { + Dungeon.level.destroy(c); + GameScene.updateMap(c); + terrainAffected = true; + } + + //destroys items / triggers bombs caught in the blast. +// Heap heap = Dungeon.level.heaps.get(c); +// if (heap != null) +// heap.explode(); + + Char ch = Actor.findChar(c); + if (ch != null) { + affected.add(ch); + } + } + } + + for (Char ch : affected){ + + //if they have already been killed by another bomb + if(!ch.isAlive()){ + continue; + } + + int dmg = Random.NormalIntRange(2 + Dungeon.depth, 4 + Dungeon.depth*2); + + //those not at the center of the blast take less damage + + + if (ch.pos != cell){ + dmg = Math.round(dmg*0.67f); + } + + dmg -= ch.drRoll(); + + if (dmg > 0) { + if(ch == hero){ + return; + } + ch.damage(dmg, this); + } + } + + if (terrainAffected) { + Dungeon.observe(); + } + } + } + public void explodeMobs(int cell){ //We're blowing up, so no need for a fuse anymore. this.fuse = null; @@ -262,7 +336,7 @@ public class Bomb extends Item { ch.damage(dmg, this); } - if (ch == Dungeon.hero && !ch.isAlive()) { + if (ch == hero && !ch.isAlive()) { Dungeon.fail(Bomb.class); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java index 4bce4eeb5..98ddcbff2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/food/MeatPie.java @@ -50,7 +50,10 @@ public class MeatPie extends Food { protected void satisfy(Hero hero) { if (Dungeon.isChallenged(Challenges.EXSG)){ Buff.prolong( hero, Haste.class, 8f); - if(Random.Float() > (0.2f + (hero.STR/5f)/10f)){ + + if(hero.STR<12){ + hero.STR++; + } else if(Random.Float() > (0.35f + (hero.STR/5f)/10f)){ hero.STR++; hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "eat_msg_1")); GLog.p(Messages.get(this, "eat_msg_2")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java index 9e4907b7e..18f3c4e5a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/Weapon.java @@ -44,6 +44,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blocki import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blooming; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Chilling; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Corrupting; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Crushing; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Elastic; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.HaloBlazing; @@ -341,10 +342,12 @@ abstract public class Weapon extends KindOfWeapon { private static final Class[] uncommon = new Class[]{ Blocking.class, Blooming.class, Elastic.class, - Lucky.class, Projecting.class, Unstable.class,HaloBlazing.class}; + Lucky.class, Projecting.class, Unstable.class}; private static final Class[] rare = new Class[]{ - Corrupting.class, Grim.class, Vampiric.class}; + Corrupting.class, Grim.class, Vampiric.class, + HaloBlazing.class, + Crushing.class}; private static final float[] typeChances = new float[]{ 50, //12.5% each diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java new file mode 100644 index 000000000..08eb30299 --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/enchantments/Crushing.java @@ -0,0 +1,52 @@ +package com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments; + +import com.shatteredpixel.shatteredpixeldungeon.actors.Char; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; +import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle; +import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle; +import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon; +import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; +import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; +import com.watabou.utils.Random; + +public class Crushing extends Weapon.Enchantment { + + private static ItemSprite.Glowing ORANGE = new ItemSprite.Glowing( 0xcc7770 ); + + @Override + public int proc(Weapon weapon, Char attacker, Char defender, int damage ) { + // lvl 0 - 33% + // lvl 1 - 50% + // lvl 2 - 60% + int level = Math.max( 0, weapon.level() ); + + if (Random.Int( level + 12 ) >= 5) { + + if (Random.Int( 2 ) == 0) { + Buff.prolong( defender, Cripple.class, Random.Float( 1f, 1f + level/2f ) ); + } + defender.damage( Random.Int( 1, level + 2 ), this ); + + defender.sprite.emitter().burst(BlastParticle.FACTORY, 30 ); + defender.sprite.emitter().burst(SmokeParticle.FACTORY, 4 ); + if (Random.Int( 2 ) == 0) { + damage += level; + GLog.n(Messages.get(Crushing.class,"kill"),attacker.name()); + new Bomb().explodeHeros(defender.pos); + } + } + + + + return damage; + + } + + @Override + public ItemSprite.Glowing glowing() { + return ORANGE; + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java index dababe1ec..021ddb9f7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Greatsword.java @@ -22,6 +22,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Crushing; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; public class Greatsword extends MeleeWeapon { @@ -30,7 +31,7 @@ public class Greatsword extends MeleeWeapon { image = ItemSpriteSheet.GREATSWORD; hitSound = Assets.Sounds.HIT_SLASH; hitSoundPitch = 1f; - + enchantment = new Crushing(); tier=5; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java index 489ebc46f..5a48c658b 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/messages/Messages.java @@ -45,7 +45,8 @@ import java.util.Locale; This means that an object can just ask for "name" rather than, say, "items.weapon.enchantments.death.name" */ public class Messages { - + private static String baseNameX; + public static final String NO_TEXT_FOUND = baseNameX; private static ArrayList bundles; private static Languages lang; @@ -121,6 +122,7 @@ public class Messages { //Use baseName so the missing string is clear what exactly needs replacing. Otherwise, it just says java.lang.Object.[key] if (baseName == null) { baseName = key; + baseNameX = baseName; } //this is so child classes can inherit properties from their parents. //in cases where text is commonly grabbed as a utility from classes that aren't mean to be instantiated diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java index c44228e89..000cc3590 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/PassWordBadgesScene.java @@ -56,7 +56,7 @@ public class PassWordBadgesScene extends PixelScene { List badges = PaswordBadges.filtered( true ); - int blankBadges = 8; + int blankBadges = 9; blankBadges -= badges.size(); if (badges.contains(Badges.Badge.ALL_ITEMS_IDENTIFIED)) blankBadges -= 6; if (badges.contains(Badges.Badge.YASD)) blankBadges -= 5; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java index 71573d58f..ab007c3d8 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/sprites/SlimeKingSprite.java @@ -6,7 +6,7 @@ package com.shatteredpixel.shatteredpixeldungeon.sprites; import com.shatteredpixel.shatteredpixeldungeon.Assets; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ColdMagicRat; +import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.SlimeKing; import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile; import com.watabou.noosa.TextureFilm; import com.watabou.noosa.audio.Sample; @@ -22,24 +22,24 @@ public class SlimeKingSprite extends GolemSprite { this.idle = new Animation(2, true); Animation var4 = this.idle; Integer var5 = 0; - var4.frames(var1, new Object[]{var5, var5, var5, var3, var5, var5, var3, var3}); + var4.frames(var1, var5, var5, var5, var3, var5, var5, var3, var3); this.run = new Animation(12, true); - this.run.frames(var1, new Object[]{var2, 1, 2, 3, var2}); + this.run.frames(var1, var2, 1, 2, 3, var2); this.attack = new Animation(12, false); - this.attack.frames(var1, new Object[]{3, 4, 5}); + this.attack.frames(var1, 3, 4, 5); this.die = new Animation(12, false); - this.die.frames(var1, new Object[]{6, 7,}); + this.die.frames(var1, 6, 7); this.play(this.idle); } - private static int[] tierFrames = {0, 21, 32, 43, 54, 65}; + private static final int[] tierFrames = {0, 21, 32, 43, 54, 65}; public void setArmor( int tier ){ int c = tierFrames[(int) GameMath.gate(0, tier, 5)]; TextureFilm frames = new TextureFilm( texture, 12, 15 ); - idle.frames( frames, 0+c, 0+c, 0+c, 0+c, 0+c, 1+c, 1+c ); + idle.frames( frames, c, c, c, c, c, 1+c, 1+c ); run.frames( frames, 2+c, 3+c, 4+c, 5+c, 6+c, 7+c ); attack.frames( frames, 8+c, 9+c, 10+c ); //death animation is always armorless @@ -60,7 +60,7 @@ public class SlimeKingSprite extends GolemSprite { new Callback() { @Override public void call() { - ((ColdMagicRat)ch).onZapComplete(); + ((SlimeKing)ch).onZapComplete(); } } ); Sample.INSTANCE.play( Assets.Sounds.ZAP ); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java index e62ce5190..1e7c2a69e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/S_Changes.java @@ -335,7 +335,7 @@ public class S_Changes { "史莱姆守卫者 10层BOSS用!")); Image a = new SlimeKingSprite(); - a.scale.set(PixelScene.align(0.42f)); + a.scale.set(PixelScene.align(0.82f)); changes.addButton(new ChangeButton(a, "史莱姆王", "10层BOSS!")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java index 252b90a2e..c8fb2b758 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 @@ -1,8 +1,12 @@ package com.shatteredpixel.shatteredpixeldungeon.ui.changelist.mlpd; import com.shatteredpixel.shatteredpixeldungeon.Assets; +import com.shatteredpixel.shatteredpixeldungeon.Badges; +import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.NewDM300; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.PinkLingSprite; +import com.shatteredpixel.shatteredpixeldungeon.effects.BadgeBanner; +import com.shatteredpixel.shatteredpixeldungeon.effects.PasswordBadgeBanner; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.ChangesScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -142,6 +146,42 @@ public class vM0_6_7_X_Changes { changes.addButton(new ChangeButton(i, ("熔岩火龙"), ("丛林暴乱的真相"))); + + changes = new ChangeInfo("v0.6.5.0-Alpha4.5", true, ""); + changes.hardlight(Window.TITLE_COLOR); + changeInfos.add(changes); + + changes = new ChangeInfo("新内容", false, null); + changes.hardlight(Window.GREEN_COLOR); + changeInfos.add(changes); + + changes.addButton( new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSWORD, + new ItemSprite.Glowing( 0xcc7770 )), "新附魔:爆破", + "这个附魔会让使用者陷入癫狂,能使爆炸的能量从武器中喷薄而出,能够使敌人目标处受到一次范围伤害亦或者给造成敌人短暂的残废效果。(PS:爆炸效果不会摧毁物品)\n")); + + changes.addButton(new ChangeButton(PasswordBadgeBanner.image(PaswordBadges.Badge.ZQJ_GHOST.image), ("两个隐藏徽章资源预载"), + ("两个隐藏徽章资源预载,将在后续版本更新。"))); + + changes = new ChangeInfo("改动", false, null); + changes.hardlight(Window.CYELLOW); + changeInfos.add(changes); + + Image isa = new SlimeKingSprite(); + isa.scale.set(PixelScene.align(0.89f)); + changes.addButton( new ChangeButton(isa, "史莱姆王子", + "修复错误的继承类导致的Cast Exception错误")); + + changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("界面修复"), + ("修复部分界面在新版的异常布局"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("药水癔症v0.2"), + ("现在全肉大饼在英雄低于12力量前必定加力量,且整体加力量的幸运度提升。"))); + + changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("其他改动"), + ("1.鬼磷和爆破现在是稀有附魔\n\n" + + "2.修复了吸血鬼刀的异常吸血-贡献者:\nzxcPandora\n\n"+ + "3.修复了药水癔症描述问题,纯洁的祝福-守护护盾描述异常,以及开发者升降器追加探查功能-\n贡献者:zxcPandora"))); + changes = new ChangeInfo("v0.6.5.0-Alpha4", true, ""); changes.hardlight(Window.TITLE_COLOR); changeInfos.add(changes); @@ -156,7 +196,7 @@ public class vM0_6_7_X_Changes { changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("信息栏滚动"), ("在游戏缩放较大或者拥有较多词条时,该项会很有用。"))); - changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("新徽章:碎片飞溅"), + changes.addButton(new ChangeButton(BadgeBanner.image(Badges.Badge.BOMBBOW_DIED.image), ("新徽章:碎片飞溅"), ("又是一个死亡徽章,新人:悲鸣 因为意味着另类死亡爱好者多了一个新徽章(未解锁该徽章的就更麻烦了)"))); changes = new ChangeInfo("改动", false, null); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java index 70b363064..f2e9a3646 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoArmorAbility.java @@ -25,33 +25,35 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.Ratmogrify; -import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite; -import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; -import com.watabou.noosa.Image; import java.util.ArrayList; import java.util.LinkedHashMap; +import java.util.function.Function; public class WndInfoArmorAbility extends WndTitledMessage { - public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability){ + public WndInfoArmorAbility(HeroClass cls, ArmorAbility ability, Function> initializeArmorTalents){ super( new HeroIcon(ability), Messages.titleCase(ability.name()), ability.desc()); - ArrayList> talentList = new ArrayList<>(); - Talent.initArmorTalents(ability, talentList); - + @SuppressWarnings("NewApi") + LinkedHashMap talents = initializeArmorTalents.apply(ability); + if(talents.isEmpty()) return; Ratmogrify.useRatroicEnergy = ability instanceof Ratmogrify; - TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(3), 4, TalentButton.Mode.INFO); - talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); - talentPane.setRect(0, height + 5, width, talentPane.height()); - add(talentPane); - resize(width, (int) talentPane.bottom()); + TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talents, 4, TalentButton.Mode.INFO); + talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); + addToBottom(talentPane, 5, 0); + } + public WndInfoArmorAbility(HeroClass cls,ArmorAbility ability) { + this(cls,ability, WndInfoArmorAbility::initializeTalents); } -} + public static LinkedHashMap initializeTalents(ArmorAbility ability) { + ArrayList> talentList = Talent.initArmorTalents(ability); + return talentList.size() < 4 ? new LinkedHashMap<>() : talentList.get(3); + } +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java index ce30275cd..7774f8b1c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoSubclass.java @@ -21,15 +21,14 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import static com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton.Mode.INFO; + import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroSubClass; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.ui.HeroIcon; -import com.shatteredpixel.shatteredpixeldungeon.ui.TalentButton; import com.shatteredpixel.shatteredpixeldungeon.ui.TalentsPane; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndHeroInfo; -import com.shatteredpixel.shatteredpixeldungeon.windows.WndTitledMessage; import java.util.ArrayList; import java.util.LinkedHashMap; @@ -37,18 +36,16 @@ import java.util.LinkedHashMap; public class WndInfoSubclass extends WndTitledMessage { public WndInfoSubclass(HeroClass cls, HeroSubClass subCls){ - super( new HeroIcon(subCls), Messages.titleCase(subCls.title()), subCls.desc()); + super( new HeroIcon(subCls), Messages.titleCase(subCls.title()), subCls.desc(), WIDTH_MIN); ArrayList> talentList = new ArrayList<>(); Talent.initClassTalents(cls, talentList); Talent.initSubclassTalents(subCls, talentList); - TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(2), 3, TalentButton.Mode.INFO); + TalentsPane.TalentTierPane talentPane = new TalentsPane.TalentTierPane(talentList.get(2), 3, INFO); talentPane.title.text( Messages.titleCase(Messages.get(WndHeroInfo.class, "talents"))); - talentPane.setRect(0, height + 5, width, talentPane.height()); - add(talentPane); - resize(width, (int) talentPane.bottom()); + addToBottom(talentPane, 5, 0); } -} +} \ No newline at end of file