更新钻石宝箱王相关逻辑 修复一些bug
This commit is contained in:
parent
9da5a29e49
commit
74d4e5072c
Binary file not shown.
Before Width: | Height: | Size: 37 KiB After Width: | Height: | Size: 36 KiB |
|
@ -573,10 +573,6 @@ actors.buffs.roseshiled.name=玫瑰结界
|
|||
actors.buffs.roseshiled.heromsg=玫瑰的魔力保护着你!
|
||||
actors.buffs.roseshiled.desc=在玫瑰结界中,你不会受到任何直接伤害。\n\n玫瑰结界的能量还剩余: %s.
|
||||
|
||||
actors.hero.hero.waring1=警告,支离破碎的免费复活次数已经结束。下一次将是最终死亡。
|
||||
actors.hero.hero.waring2=注意,支离破碎的免费复活次数还有1次。\n
|
||||
actors.hero.hero.waring3=通知,支离破碎的免费复活次数还有2次。\n
|
||||
|
||||
actors.mobs.skullshaman.name=豺狼萨满长老
|
||||
actors.mobs.skullshaman.desc=生活在矿洞层的年长豺狼,你光看着这个骷髅头就知道这东西并不好惹。所幸它似乎因为太过于年长而陷入了沉睡。也许,你可以溜之大吉。
|
||||
|
||||
|
@ -871,6 +867,9 @@ actors.buffs.amok.desc=狂乱导致状态下的生物进入一种极度愤怒和
|
|||
actors.buffs.ankhinvulnerability.name=无敌
|
||||
actors.buffs.ankhinvulnerability.desc=你的重生十字架已消耗了它的能量,恢复了你的生命值的同时还给予了你短暂的无敌时间!\n\n效果剩余回合数:%s。
|
||||
|
||||
actors.buffs.ankhinvulnerability$goddied.name=创世神之怒
|
||||
actors.buffs.ankhinvulnerability$goddied.desc=被遗忘的过去,他们究竟在隐藏着什么?为了自己的子民,她甘愿放逐自己带来和平。而如今又有谁记得她呢?是时间淡忘了过去的伤痛,还是人们忘掉了曾经的她?\n奇怪的声音在你耳旁环绕,你感受到了同样的愤怒。在该状态下,物理伤害提升至225%,伤害类法杖伤害x2,移速提升2倍,完全无敌。
|
||||
|
||||
actors.buffs.arcanearmor.name=秘法护盾
|
||||
actors.buffs.arcanearmor.desc=一层淡薄的护盾环绕着你,可为你抵挡一定的魔法伤害。\n\n当前你的魔法护甲值为: 0~%d。\n\n秘法护盾会在 %s 回合后自我衰减。
|
||||
|
||||
|
|
|
@ -2,6 +2,21 @@
|
|||
items.weapon.melee.sdbsword.name=钻石大剑
|
||||
items.weapon.melee.sdbsword.desc=钻石制成的奇特大剑,现在它已经给予了足够多的能量,它回到了巅峰时刻\n剑身残留着钻石宝箱王的魔力,因此对其他魔力有着莫名的亲和性。相比于其他武器,这把武器会随着等级的提升增加更多伤害。\n这把武器攻击速度极慢,但精准极高。\n该武器已经重回巅峰,可以发射剑气。
|
||||
|
||||
items.quest.mime$gold_one.name=镶金碧翠月牙宝石
|
||||
items.quest.mime$gold_one.desc=来自于异世界的物品,虽然在这个世界无法产生它原有的作用。但它的宝贵价值足以让商人眼前一亮。
|
||||
|
||||
items.quest.mime$gold_two.name=至纯绿宝石
|
||||
items.quest.mime$gold_two.desc=宝石往往可以存储能量,这一个也不例外。卖给商人可以获得一定的金币,但也许可以带在身上发挥其他作用。\n\n_携带该物品时,玩家血量低于20%后立刻隐身。_
|
||||
|
||||
items.quest.mime$gold_three.name=未知沙尘
|
||||
items.quest.mime$gold_three.desc=不属于这个世界的产物,沙尘的流动似乎牵引着时间。看似普通但实则有着很高的收藏价值,可以卖给商人换取一定的金币。\n\n_携带该物品时,玩家移速提升20%。_
|
||||
|
||||
items.quest.mime$gold_four.name=幽蓝碑文纪念章
|
||||
items.quest.mime$gold_four.desc=不属于这个时间线的产物,自身散发出诡异的能量。幽蓝的碑文似乎记录了一些事情,但已无从查证。应该可以在商人那里兑换一定的金币。
|
||||
|
||||
items.quest.mime$gold_five.name=“创始神”之心
|
||||
items.quest.mime$gold_five.desc=为了纪念创世神,人们雕刻了这个了工艺品。如今早已没有人再去制作这个工艺品,也无人再记得她,这可能是现存的唯一真品了。你能感受到上面还残留了创世神的力量,卖给商人可以得到一个好价钱,但如果将它携带在背包中说不定能得到创世神的祝福。\n\n_携带该物品时,玩家治疗效果翻倍,且首次受到致命伤没十字架时无敌数回合,并进入创世神之怒状态。_
|
||||
|
||||
items.weapon.melee.lifetreesword.name=“倒悬的生命树”
|
||||
items.weapon.melee.lifetreesword.desc=克里弗斯之果破碎时,四周的藤蔓缠结在暴露出的种子上,形成剑的形状。剑身触碰到生物时会汲取他们的生命力提供给种子,期待着它再一结出猩红的果实。\n\n这是一个比较精准的武器。\n\n特别说明:克里弗斯之果Boss专武,每击杀_75只怪物_可以使用特殊武器技能,并重置杀敌计数。\n\n杀敌点数:
|
||||
items.weapon.melee.lifetreesword.ac_summon=召唤幽蓝藤蔓
|
||||
|
|
|
@ -59,6 +59,7 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.CaveTwoBossLevel;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.CavesGirlDeadLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.CavesLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.CityLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.DM920BossLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.DeadEndLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.DimandKingLevel;
|
||||
|
@ -446,7 +447,7 @@ public class Dungeon {
|
|||
level = new PrisonLevel();
|
||||
break;
|
||||
case 10:
|
||||
if((Statistics.boss_enhance & 0x2) != 0) level = new DimandKingLevel();
|
||||
if((Statistics.boss_enhance & 0x2) != 0) level = new ColdChestBossLevel();
|
||||
else
|
||||
level = new PrisonBossLevel();
|
||||
break;
|
||||
|
|
|
@ -29,6 +29,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Adrenaline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AllyBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AnkhInvulnerability;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ArcaneArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barkskin;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Berserk;
|
||||
|
@ -89,6 +90,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfCleansing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfElements;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRetribution;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
|
@ -575,6 +577,9 @@ public abstract class Char extends Actor {
|
|||
} else if ( buff(BlessMobDied.class) != null ) {
|
||||
damage *= 2f;
|
||||
}
|
||||
if ( buff(AnkhInvulnerability.GodDied.class) != null ) {
|
||||
damage *= 2.25f;
|
||||
}
|
||||
|
||||
if ( buff(IceSwordDown.class) != null ){
|
||||
//0.2+20x0.005=0.2+100
|
||||
|
@ -599,6 +604,14 @@ public abstract class Char extends Actor {
|
|||
|
||||
public float speed() {
|
||||
float speed = baseSpeed;
|
||||
|
||||
//提升20%移速
|
||||
MIME.GOLD_THREE getSpeed = Dungeon.hero.belongings.getItem(MIME.GOLD_THREE.class);
|
||||
if (getSpeed!=null) speed *= 1.2f;
|
||||
|
||||
//创世神之怒
|
||||
if ( buff( AnkhInvulnerability.GodDied.class ) != null ) speed *= 2f;
|
||||
|
||||
if ( buff( Cripple.class ) != null ) speed /= 2f;
|
||||
|
||||
if ( buff( Stamina.class ) != null) speed *= 1.5f;
|
||||
|
|
|
@ -62,4 +62,11 @@ public class AnkhInvulnerability extends FlavourBuff {
|
|||
immunities.add(Frost.class);
|
||||
}
|
||||
|
||||
public static class GodDied extends AnkhInvulnerability {
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.BERSERK;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Difficulty;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
|
@ -72,6 +73,7 @@ public class Healing extends Buff {
|
|||
}
|
||||
|
||||
public void setHeal(int amount, float percentPerTick, int flatPerTick){
|
||||
MIME.GOLD_FIVE getHeal = Dungeon.hero.belongings.getItem(MIME.GOLD_FIVE.class);
|
||||
if (Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.HARD)) {
|
||||
healingLeft = amount/2;
|
||||
percentHealPerTick = percentPerTick/2;
|
||||
|
@ -81,6 +83,12 @@ public class Healing extends Buff {
|
|||
percentHealPerTick = percentPerTick;
|
||||
flatHealPerTick = flatPerTick;
|
||||
}
|
||||
|
||||
if(getHeal!=null){
|
||||
healingLeft = amount*2;
|
||||
percentHealPerTick = percentPerTick*2;
|
||||
flatHealPerTick = flatPerTick*2;
|
||||
}
|
||||
}
|
||||
|
||||
public void increaseHeal( int amount ){
|
||||
|
|
|
@ -142,6 +142,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.ElixirOfMight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDivineInspiration;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfAccuracy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEvasion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfForce;
|
||||
|
@ -930,6 +931,24 @@ public class Hero extends Char {
|
|||
}
|
||||
|
||||
private boolean actMove( HeroAction.Move action ) {
|
||||
MIME.GOLD_FIVE getHeal = Dungeon.hero.belongings.getItem(MIME.GOLD_FIVE.class);
|
||||
if(getHeal != null && HT/4 > HP){
|
||||
this.HP = HT;
|
||||
interrupt();
|
||||
PotionOfHealing.cure(this);
|
||||
Buff.prolong(this, AnkhInvulnerability.GodDied.class, AnkhInvulnerability.DURATION*10f);
|
||||
SpellSprite.show(this, SpellSprite.ANKH);
|
||||
GameScene.flash(0x80FFFF40);
|
||||
Sample.INSTANCE.play(Assets.Sounds.TELEPORT);
|
||||
GLog.w(Messages.get(this, "heartdied"));
|
||||
getHeal.detach(belongings.backpack);
|
||||
}
|
||||
//携带该物品时,玩家血量低于一半后自动隐身一段回合。
|
||||
MIME.GOLD_TWO getFalseBody = Dungeon.hero.belongings.getItem(MIME.GOLD_TWO.class);
|
||||
if(getFalseBody != null && HT/5>HP){
|
||||
Buff.affect(this, InvisibilityRing.class, InvisibilityRing.DURATION);
|
||||
}
|
||||
|
||||
|
||||
int chCount = 0;
|
||||
for (int ch : Challenges.MASKS){
|
||||
|
@ -1456,6 +1475,19 @@ public class Hero extends Char {
|
|||
resting = false;
|
||||
}
|
||||
|
||||
MIME.GOLD_FIVE getHeal = Dungeon.hero.belongings.getItem(MIME.GOLD_FIVE.class);
|
||||
if(getHeal != null && HT/4 > HP){
|
||||
this.HP = HT;
|
||||
interrupt();
|
||||
PotionOfHealing.cure(this);
|
||||
Buff.prolong(this, AnkhInvulnerability.GodDied.class, AnkhInvulnerability.DURATION*10f);
|
||||
SpellSprite.show(this, SpellSprite.ANKH);
|
||||
GameScene.flash(0x80FFFF40);
|
||||
Sample.INSTANCE.play(Assets.Sounds.TELEPORT);
|
||||
GLog.w(Messages.get(this, "heartdied"));
|
||||
getHeal.detach(belongings.backpack);
|
||||
}
|
||||
|
||||
if (this.buff(Drowsy.class) != null){
|
||||
Buff.detach(this, Drowsy.class);
|
||||
GLog.w( Messages.get(this, "pain_resist") );
|
||||
|
@ -2251,7 +2283,7 @@ public class Hero extends Char {
|
|||
|
||||
@Override
|
||||
public boolean isInvulnerable(Class effect) {
|
||||
return buff(AnkhInvulnerability.class) != null;
|
||||
return buff(AnkhInvulnerability.class) != null || buff(AnkhInvulnerability.GodDied.class) != null;
|
||||
}
|
||||
|
||||
public boolean search( boolean intentional ) {
|
||||
|
|
|
@ -54,25 +54,18 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Waterskin;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.EtherealChains;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.MasterThievesArmband;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.BookBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.HerbBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.KingBag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.BrokenBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.DeepBloodBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.IceCityBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.MagicGirlBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.NoKingMobBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.YellowSunBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Cake;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.PotionOfLightningShiled;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
|
||||
|
@ -83,25 +76,20 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlam
|
|||
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.potions.exotic.PotionOfDragonKingBreath;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MIME;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.MetalShard;
|
||||
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.ScrollOfRemoveCurse;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTerror;
|
||||
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.scrolls.exotic.ScrollOfRoseShiled;
|
||||
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.spells.SummonElemental;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfFlock;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlueFuck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost;
|
||||
|
@ -112,7 +100,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfScale;
|
|||
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.EndingBlade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gauntlet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Gloves;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LifeTreeSword;
|
||||
|
@ -229,20 +216,12 @@ public enum HeroClass {
|
|||
new PotionOfLiquidFlameX().quantity(100).identify().collect();
|
||||
new YellowSunBooks().quantity(1).identify().collect();
|
||||
new BrokenBooks().quantity(44).identify().collect();
|
||||
new DeepBloodBooks().quantity(1).identify().collect();
|
||||
new BookBag().quantity(1).identify().collect();
|
||||
new IceCityBooks().quantity(1).identify().collect();
|
||||
new MagicGirlBooks().quantity(1).identify().collect();
|
||||
new NoKingMobBooks().quantity(1).identify().collect();
|
||||
new EndingBlade().quantity(1).identify().collect();
|
||||
new PotionOfDragonKingBreath().quantity(1).identify().collect();
|
||||
new ScrollOfRemoveCurse().quantity(100).identify().collect();
|
||||
new WandOfBlueFuck().quantity(1).identify().collect();
|
||||
new ScrollOfFlameCursed().quantity(10).identify().collect();
|
||||
new PotionOfLightningShiled().quantity(42).collect();
|
||||
new ScrollOfRoseShiled().quantity(45).identify().collect();
|
||||
new ScrollOfTerror().quantity(45).identify().collect();
|
||||
new DriedRose().quantity(1).identify().collect();
|
||||
|
||||
new MIME.GOLD_ONE().quantity(1).identify().collect();
|
||||
|
||||
new MIME.GOLD_THREE().quantity(1).identify().collect();
|
||||
new MIME.GOLD_FOUR().quantity(1).identify().collect();
|
||||
new MIME.GOLD_FIVE().quantity(1).identify().collect();
|
||||
|
||||
Dungeon.gold = 600000000;
|
||||
hero.STR = 27;
|
||||
|
@ -323,6 +302,7 @@ public enum HeroClass {
|
|||
(hero.belongings.weapon = new WornShortsword()).identify();
|
||||
ThrowingStone stones = new ThrowingStone();
|
||||
stones.quantity(3).collect();
|
||||
|
||||
Dungeon.quickslot.setSlot(0, stones);
|
||||
new SummonElemental().quantity(2).identify().collect();
|
||||
if (hero.belongings.armor != null){
|
||||
|
@ -337,7 +317,7 @@ public enum HeroClass {
|
|||
MagesStaff staff;
|
||||
|
||||
staff = new MagesStaff(new WandOfMagicMissile());
|
||||
|
||||
new MIME.GOLD_FIVE().quantity(1).identify().collect();
|
||||
(hero.belongings.weapon = staff).identify();
|
||||
hero.belongings.weapon.activate(hero);
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public class Rat extends Mob {
|
|||
|
||||
HP = HT = 8;
|
||||
defenseSkill = 2;
|
||||
|
||||
EXP=4;
|
||||
maxLvl = 5;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,553 +1,305 @@
|
|||
/*
|
||||
* Pixel Dungeon
|
||||
* Copyright (C) 2012-2015 Oleg Dolya
|
||||
*
|
||||
* Shattered Pixel Dungeon
|
||||
* Copyright (C) 2014-2022 Evan Debenham
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>
|
||||
*/
|
||||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Boss;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Degrade;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.FloatingText;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.BlastParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SmokeParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Ooze;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.ColdMagicRat;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.keys.SkeletonKey;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.GooBlob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel;
|
||||
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.DimandKingSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MissileSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BossHealthBar;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.noosa.particles.Emitter;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.PathFinder;
|
||||
import com.watabou.utils.PointF;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
|
||||
public class DiamondKnight extends Boss {
|
||||
private int abilitiesUsed = 0;
|
||||
private final int OneHP = 179;
|
||||
private final int TwoHP = 99;
|
||||
private final int ThreeHP = 49;
|
||||
private static Char throwingChar;
|
||||
|
||||
public class DiamondKnight extends Boss {
|
||||
private static final float TIME_TO_ZAP = 3f;
|
||||
{
|
||||
spriteClass = DimandKingSprite.class;
|
||||
|
||||
initProperty();
|
||||
initBaseStatus(14, 23, 33, 22, 420, 5, 12);
|
||||
initStatus(80);
|
||||
EXP = 10;
|
||||
defenseSkill = 8;
|
||||
spriteClass = DimandKingSprite.class;
|
||||
|
||||
maxLvl = 30;
|
||||
HUNTING = new Hunting();
|
||||
|
||||
flying = true; //doesn't literally fly, but he is fleet-of-foot enough to avoid hazards
|
||||
properties.add(Property.IMMOVABLE);
|
||||
properties.add(Property.BOSS);
|
||||
properties.add(Property.INORGANIC);
|
||||
properties.add(Property.LARGE);
|
||||
properties.add(Property.DEMONIC);
|
||||
properties.add(Property.ACIDIC);
|
||||
}
|
||||
|
||||
private int ventCooldown = 0;
|
||||
private int phase = 1;
|
||||
private int pumpedUp = 0;
|
||||
private int phase;
|
||||
private int healInc = 1;
|
||||
|
||||
private static final float TIME_TO_ZAP = 5f;
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
int min = 1;
|
||||
int max = (HP*2 <= HT) ? 12 : 8;
|
||||
if (pumpedUp > 0) {
|
||||
pumpedUp = 0;
|
||||
return Random.NormalIntRange( min*3, max*3 );
|
||||
} else {
|
||||
return Random.NormalIntRange( min, max );
|
||||
}
|
||||
}
|
||||
|
||||
private static final String PHASE = "phase";
|
||||
private boolean teleporting = false;
|
||||
private int selfTeleCooldown = 0;
|
||||
private int enemyTeleCooldown = 0;
|
||||
private static final String TELEPORTING = "teleporting";
|
||||
private static final String ABILITIES_USED = "abilities_used";
|
||||
private static final String SELF_COOLDOWN = "self_cooldown";
|
||||
private static final String ENEMY_COOLDOWN = "enemy_cooldown";
|
||||
@Override
|
||||
public int attackSkill( Char target ) {
|
||||
int attack = 10;
|
||||
if (HP*2 <= HT) attack = 15;
|
||||
if (pumpedUp > 0) attack *= 2;
|
||||
return attack;
|
||||
}
|
||||
|
||||
private static final String LAST_ABILITY = "last_ability";
|
||||
@Override
|
||||
public boolean isInvulnerable(Class effect) {
|
||||
return this.HP==360;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(PHASE, phase);
|
||||
bundle.put( ABILITIES_USED, abilitiesUsed );
|
||||
bundle.put(TELEPORTING, teleporting);
|
||||
bundle.put(SELF_COOLDOWN, selfTeleCooldown);
|
||||
bundle.put(ENEMY_COOLDOWN, enemyTeleCooldown);
|
||||
bundle.put( LAST_ABILITY, lastAbility );
|
||||
bundle.put( ABILITIES_USED, abilitiesUsed );
|
||||
@Override
|
||||
public int defenseSkill(Char enemy) {
|
||||
return (int)(super.defenseSkill(enemy) * ((HP*2 <= HT)? 1.5 : 1));
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drRoll() {
|
||||
return Random.NormalIntRange(0, 2);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
if (Dungeon.level.water[pos] && HP < HT) {
|
||||
HP += healInc;
|
||||
|
||||
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
||||
if (lock != null) lock.removeTime(healInc*2);
|
||||
|
||||
if (Dungeon.level.heroFOV[pos] ){
|
||||
sprite.emitter().burst( Speck.factory( Speck.HEALING ), healInc );
|
||||
}
|
||||
if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES) && healInc < 3) {
|
||||
healInc++;
|
||||
}
|
||||
if (HP*2 > HT) {
|
||||
BossHealthBar.bleed(false);
|
||||
HP = Math.min(HP, HT);
|
||||
}
|
||||
} else {
|
||||
healInc = 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
phase = bundle.getInt(PHASE);
|
||||
abilitiesUsed = bundle.getInt( ABILITIES_USED );
|
||||
|
||||
lastAbility = bundle.getInt( LAST_ABILITY );
|
||||
abilitiesUsed = bundle.getInt( ABILITIES_USED );
|
||||
|
||||
BossHealthBar.assignBoss(this);
|
||||
if (HP <= HT/2) BossHealthBar.bleed(true);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
switch (phase){
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
break;
|
||||
case 3:
|
||||
break;
|
||||
case 4:
|
||||
break;
|
||||
if (state != SLEEPING){
|
||||
Dungeon.level.seal();
|
||||
}
|
||||
|
||||
return super.act();
|
||||
}
|
||||
|
||||
//*****************************************************************************************
|
||||
//***** Boss abilities. These are expressed in game logic as buffs, blobs, and items *****
|
||||
//*****************************************************************************************
|
||||
|
||||
//so that mobs can also use this
|
||||
|
||||
private int lastAbility = -1;
|
||||
|
||||
//starts at 2, so one turn and then first ability
|
||||
|
||||
private static final int BOMB_ABILITY = 0;
|
||||
private static final int FIRE_ABILITY = 1;
|
||||
private static final int SHOCKER_ABILITY = 2;
|
||||
|
||||
public boolean useAbility(){
|
||||
boolean abilityUsed = false;
|
||||
int abilityToUse = -1;
|
||||
|
||||
while (!abilityUsed){
|
||||
|
||||
if (abilitiesUsed == 0){
|
||||
abilityToUse = BOMB_ABILITY;
|
||||
} else if (abilitiesUsed == 1){
|
||||
abilityToUse = SHOCKER_ABILITY;
|
||||
} else if (Dungeon.isChallenged(Challenges.STRONGER_BOSSES)) {
|
||||
abilityToUse = Random.Int(2)*2; //0 or 2, can't roll fire ability with challenge
|
||||
} else {
|
||||
abilityToUse = Random.Int(3);
|
||||
}
|
||||
|
||||
//If we roll the same ability as last time, 9/10 chance to reroll
|
||||
if (abilityToUse != lastAbility || Random.Int(10) == 0){
|
||||
switch (abilityToUse){
|
||||
case BOMB_ABILITY : default:
|
||||
abilityUsed = throwBomb(this, enemy);
|
||||
//if Tengu cannot use his bomb ability first, use fire instead.
|
||||
if (abilitiesUsed == 0 && !abilityUsed){
|
||||
abilityToUse = FIRE_ABILITY;
|
||||
abilityUsed = throwBomb(this, enemy);
|
||||
}
|
||||
break;
|
||||
case FIRE_ABILITY:
|
||||
abilityUsed =throwBomb(this, enemy);
|
||||
break;
|
||||
case SHOCKER_ABILITY:
|
||||
abilityUsed = throwBomb(this, enemy);
|
||||
//if Tengu cannot use his shocker ability second, use fire instead.
|
||||
if (abilitiesUsed == 1 && !abilityUsed){
|
||||
abilityToUse = FIRE_ABILITY;
|
||||
abilityUsed =throwBomb(this, enemy);
|
||||
}
|
||||
break;
|
||||
}
|
||||
//always use the fire ability with the bosses challenge
|
||||
if (abilityUsed && abilityToUse != FIRE_ABILITY && Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){
|
||||
throwBomb(this, enemy);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
lastAbility = abilityToUse;
|
||||
abilitiesUsed++;
|
||||
return lastAbility == FIRE_ABILITY;
|
||||
}
|
||||
|
||||
private static final float ATTACSWORD_DELAY = 2f;
|
||||
|
||||
public static class DarkBolt{}
|
||||
|
||||
//the actual affected cells
|
||||
private HashSet<Integer> affectedCells;
|
||||
//the cells to trace fire shots to, for visual effects.
|
||||
private HashSet<Integer> visualCells;
|
||||
private int direction = 0;
|
||||
|
||||
protected void fx(Ballistica bolt, Char ch ) {
|
||||
//need to perform flame spread logic here so we can determine what cells to put flames in.
|
||||
affectedCells = new HashSet<>();
|
||||
visualCells = new HashSet<>();
|
||||
|
||||
int maxDist = 30;
|
||||
int dist = Math.min(bolt.dist, maxDist);
|
||||
|
||||
for (int i = 0; i < PathFinder.CIRCLE8.length; i++){
|
||||
if (bolt.sourcePos+PathFinder.CIRCLE8[i] == bolt.path.get(1)){
|
||||
direction = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float strength = maxDist;
|
||||
for (int c : bolt.subPath(1, dist)) {
|
||||
strength--; //as we start at dist 1, not 0.
|
||||
affectedCells.add(c);
|
||||
if (strength > 1) {
|
||||
spreadFlames(c + PathFinder.CIRCLE8[direction], strength - 1);
|
||||
} else {
|
||||
visualCells.add(c);
|
||||
}
|
||||
}
|
||||
|
||||
//going to call this one manually
|
||||
visualCells.remove(bolt.path.get(dist));
|
||||
|
||||
for (int cell : visualCells){
|
||||
//this way we only get the cells at the tip, much better performance.
|
||||
((MagicMissile)ch.sprite.parent.recycle( MagicMissile.class )).reset(
|
||||
MagicMissile.SWORDLING,
|
||||
ch.sprite,
|
||||
cell,
|
||||
null
|
||||
);
|
||||
}
|
||||
if(Dungeon.level.heroFOV[bolt.sourcePos] || Dungeon.level.heroFOV[bolt.collisionPos]){
|
||||
Sample.INSTANCE.play( Assets.Sounds.ZAP );
|
||||
}
|
||||
}
|
||||
|
||||
private void spreadFlames(int cell, float strength){
|
||||
if (strength >= 0 && (Dungeon.level.passable[cell] || Dungeon.level.flamable[cell])){
|
||||
affectedCells.add(cell);
|
||||
if (strength >= 1.5f) {
|
||||
visualCells.remove(cell);
|
||||
spreadFlames(cell + PathFinder.CIRCLE8[direction], strength - 1.5f);
|
||||
} else {
|
||||
visualCells.add(cell);
|
||||
}
|
||||
} else if (!Dungeon.level.passable[cell])
|
||||
visualCells.add(cell);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return Random.NormalIntRange( 10,20 );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
return new Ballistica( pos, enemy.pos, Ballistica.MAGIC_BOLT).collisionPos == enemy.pos;
|
||||
}
|
||||
|
||||
protected boolean doAttack( Char enemy ) {
|
||||
|
||||
if (Dungeon.level.distance(pos, enemy.pos) <= 1) {
|
||||
|
||||
return super.doAttack(enemy);
|
||||
|
||||
if (pumpedUp > 0){
|
||||
//we check both from and to in this case as projectile logic isn't always symmetrical.
|
||||
//this helps trim out BS edge-cases
|
||||
return Dungeon.level.distance(enemy.pos, pos) <= 2
|
||||
&& new Ballistica( pos, enemy.pos, Ballistica.PROJECTILE).collisionPos == enemy.pos
|
||||
&& new Ballistica( enemy.pos, pos, Ballistica.PROJECTILE).collisionPos == pos;
|
||||
} else {
|
||||
|
||||
boolean visible = fieldOfView[pos] || fieldOfView[enemy.pos];
|
||||
if (visible) {
|
||||
sprite.attack(enemy.pos);
|
||||
spend(ATTACSWORD_DELAY);
|
||||
shoot(this, enemy.pos);
|
||||
}
|
||||
|
||||
return !visible;
|
||||
return super.canAttack(enemy);
|
||||
}
|
||||
}
|
||||
|
||||
public void teleportEnemy(){
|
||||
spend(3f);
|
||||
|
||||
int bestPos = enemy.pos;
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
if (Dungeon.level.passable[pos + i]
|
||||
&& Actor.findChar(pos+i) == null
|
||||
&& Dungeon.level.trueDistance(pos+i, enemy.pos) > Dungeon.level.trueDistance(bestPos, enemy.pos)){
|
||||
bestPos = pos+i;
|
||||
}
|
||||
@Override
|
||||
public int attackProc( Char enemy, int damage ) {
|
||||
damage = super.attackProc( enemy, damage );
|
||||
if (Random.Int( 3 ) == 0) {
|
||||
Buff.affect( enemy, Ooze.class ).set( Ooze.DURATION );
|
||||
enemy.sprite.burst( 0x000000, 5 );
|
||||
}
|
||||
|
||||
if (enemy.buff(MagicImmune.class) != null){
|
||||
bestPos = enemy.pos;
|
||||
if (pumpedUp > 0) {
|
||||
Camera.main.shake( 3, 0.2f );
|
||||
}
|
||||
|
||||
if (bestPos != enemy.pos){
|
||||
//ScrollOfTeleportation.appear(enemy, bestPos);
|
||||
if (enemy instanceof Hero){
|
||||
((Hero) enemy).interrupt();
|
||||
Dungeon.observe();
|
||||
}
|
||||
}
|
||||
enemyTeleCooldown = 20;
|
||||
return damage;
|
||||
}
|
||||
|
||||
public void onZapComplete(){
|
||||
teleportEnemy();
|
||||
@Override
|
||||
public boolean attack( Char enemy, float dmgMulti, float dmgBonus, float accMulti ) {
|
||||
boolean result = super.attack( enemy, dmgMulti, dmgBonus, accMulti );
|
||||
pumpedUp = 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean getCloser( int target ) {
|
||||
if (pumpedUp != 0) {
|
||||
pumpedUp = 0;
|
||||
sprite.idle();
|
||||
}
|
||||
return super.getCloser( target );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void damage(int dmg, Object src) {
|
||||
if (!BossHealthBar.isAssigned()){
|
||||
BossHealthBar.assignBoss( this );
|
||||
Dungeon.level.seal();
|
||||
}
|
||||
|
||||
super.damage(dmg, src);
|
||||
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
||||
if (lock != null) lock.addTime(dmg*2);
|
||||
|
||||
ColdChestBossLevel.State level = ((ColdChestBossLevel)Dungeon.level).pro();
|
||||
//血量低于360后追加phase并加载楼层的进度方法
|
||||
if (level == ColdChestBossLevel.State.START && this.HP < 360 && phase == 0) {
|
||||
GLog.n("让这场游戏变得更加有趣吧");
|
||||
GameScene.flash(0x808080);
|
||||
((ColdChestBossLevel)Dungeon.level).progress();
|
||||
phase++;
|
||||
} else if(level == ColdChestBossLevel.State.MAZE_START && this.HP < 360 && phase == 1) {
|
||||
GLog.n("让这场游戏变得更加有d趣吧");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die( Object cause ) {
|
||||
|
||||
super.die( cause );
|
||||
|
||||
if(Dungeon.depth!=28){
|
||||
Dungeon.level.unseal();
|
||||
|
||||
GetBossLoot();
|
||||
|
||||
GameScene.bossSlain();
|
||||
Dungeon.level.drop( new SkeletonKey( Dungeon.depth ), pos ).sprite.drop();
|
||||
|
||||
//60% chance of 2 blobs, 30% chance of 3, 10% chance for 4. Average of 2.5
|
||||
int blobs = Random.chances(new float[]{0, 0, 6, 3, 1});
|
||||
for (int i = 0; i < blobs; i++){
|
||||
int ofs;
|
||||
do {
|
||||
ofs = PathFinder.NEIGHBOURS8[Random.Int(8)];
|
||||
} while (!Dungeon.level.passable[pos + ofs]);
|
||||
Dungeon.level.drop( new GooBlob(), pos + ofs ).sprite.drop( pos );
|
||||
}
|
||||
|
||||
Badges.validateBossSlain();
|
||||
|
||||
yell( Messages.get(this, "defeated") );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public void notice() {
|
||||
super.notice();
|
||||
if (!BossHealthBar.isAssigned()) {
|
||||
BossHealthBar.assignBoss(this);
|
||||
Dungeon.level.seal();
|
||||
yell(Messages.get(this, "notice"));
|
||||
for (Char ch : Actor.chars()){
|
||||
if (ch instanceof DriedRose.GhostHero){
|
||||
((DriedRose.GhostHero) ch).sayBoss();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private final String PUMPEDUP = "pumpedup";
|
||||
private final String HEALINC = "healinc";
|
||||
private static final String PHASE ="dimandphase";
|
||||
@Override
|
||||
public void storeInBundle( Bundle bundle ) {
|
||||
|
||||
super.storeInBundle( bundle );
|
||||
phase = bundle.getInt(PHASE);
|
||||
bundle.put( PUMPEDUP , pumpedUp );
|
||||
bundle.put( HEALINC, healInc );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle( Bundle bundle ) {
|
||||
|
||||
super.restoreFromBundle( bundle );
|
||||
bundle.put(PHASE,phase);
|
||||
pumpedUp = bundle.getInt( PUMPEDUP );
|
||||
if (state != SLEEPING) BossHealthBar.assignBoss(this);
|
||||
if ((HP*2 <= HT)) BossHealthBar.bleed(true);
|
||||
|
||||
//if check is for pre-0.9.3 saves
|
||||
healInc = bundle.getInt(HEALINC);
|
||||
|
||||
}
|
||||
|
||||
private void zap() {
|
||||
spend( TIME_TO_ZAP );
|
||||
|
||||
if (hit( this, enemy, true )) {
|
||||
//TODO would be nice for this to work on ghost/statues too
|
||||
if (enemy == Dungeon.hero && Random.Int( 2 ) == 0) {
|
||||
Buff.prolong( enemy, Blindness.class, Degrade.DURATION );
|
||||
Sample.INSTANCE.play( Assets.Sounds.DEBUFF );
|
||||
}
|
||||
|
||||
int dmg = Random.NormalIntRange( 10, 12 );
|
||||
enemy.damage( dmg, new ColdMagicRat.DarkBolt() );
|
||||
|
||||
if (enemy == Dungeon.hero && !enemy.isAlive()) {
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "frost_kill") );
|
||||
}
|
||||
} else {
|
||||
enemy.sprite.showStatus( CharSprite.NEUTRAL, enemy.defenseVerb() );
|
||||
}
|
||||
}
|
||||
|
||||
public void onZapComplete() {
|
||||
zap();
|
||||
next();
|
||||
}
|
||||
|
||||
public void damage(int dmg, Object src) {
|
||||
if (!Dungeon.level.mobs.contains(this)){
|
||||
return;
|
||||
}
|
||||
|
||||
ColdChestBossLevel.State state = ((ColdChestBossLevel)Dungeon.level).pro();
|
||||
|
||||
int hpBracket = HT / 8;
|
||||
|
||||
int beforeHitHP = HP;
|
||||
super.damage(dmg, src);
|
||||
dmg = beforeHitHP - HP;
|
||||
|
||||
if ((beforeHitHP/hpBracket - HP/hpBracket) >= 2){
|
||||
HP = hpBracket * ((beforeHitHP/hpBracket)-1) + 1;
|
||||
}
|
||||
|
||||
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
|
||||
if (lock != null) {
|
||||
int multiple = state == ColdChestBossLevel.State.MAZE_START ? 1 : 4;
|
||||
lock.addTime(dmg*multiple);
|
||||
}
|
||||
|
||||
if (HP == 0 && state == ColdChestBossLevel.State.VSBOSS_START) {
|
||||
Actor.add(new Actor() {
|
||||
|
||||
{
|
||||
actPriority = VFX_PRIO;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
Actor.remove(this);
|
||||
((ColdChestBossLevel)Dungeon.level).progress();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
if (state == ColdChestBossLevel.State.MAZE_START && HP <= OneHP) {
|
||||
HP = OneHP;
|
||||
yell(Messages.get(this, "interesting"));
|
||||
((ColdChestBossLevel) Dungeon.level).progress();
|
||||
BossHealthBar.bleed(true);
|
||||
}
|
||||
}
|
||||
|
||||
protected void onZap( Ballistica bolt ) {
|
||||
|
||||
for( int cell : affectedCells){
|
||||
|
||||
//ignore caster cell
|
||||
if (cell == bolt.sourcePos){
|
||||
continue;
|
||||
}
|
||||
|
||||
//only ignite cells directly near caster if they are flammable
|
||||
if (!Dungeon.level.adjacent(bolt.sourcePos, cell)
|
||||
|| Dungeon.level.flamable[cell]){
|
||||
//GameScene.add( Blob.seed( cell, 1+2, Fire.class ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void shoot(Char ch, int pos){
|
||||
final Ballistica shot = new Ballistica( ch.pos, pos, Ballistica.PROJECTILE);
|
||||
fx(shot, ch);
|
||||
}
|
||||
|
||||
public static boolean throwBomb(final Char thrower, final Char target){
|
||||
|
||||
int targetCell = -1;
|
||||
|
||||
//Targets closest cell which is adjacent to target
|
||||
for (int i : PathFinder.NEIGHBOURS8){
|
||||
int cell = target.pos + i;
|
||||
if (targetCell == -1 ||
|
||||
Dungeon.level.trueDistance(cell, thrower.pos) < Dungeon.level.trueDistance(targetCell, thrower.pos)){
|
||||
targetCell = cell;
|
||||
}
|
||||
}
|
||||
|
||||
if (targetCell == -1){
|
||||
return false;
|
||||
}
|
||||
|
||||
final int finalTargetCell = targetCell;
|
||||
throwingChar = thrower;
|
||||
final BombAbility.BombItem item = new BombAbility.BombItem();
|
||||
thrower.sprite.zap(finalTargetCell);
|
||||
((MissileSprite) thrower.sprite.parent.recycle(MissileSprite.class)).
|
||||
reset(thrower.sprite,
|
||||
finalTargetCell,
|
||||
item,
|
||||
new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
//item.onThrow(finalTargetCell);
|
||||
thrower.next();
|
||||
}
|
||||
});
|
||||
return true;
|
||||
}
|
||||
|
||||
public static class BombAbility extends Buff {
|
||||
|
||||
public int bombPos = -1;
|
||||
private int timer = 3;
|
||||
|
||||
private ArrayList<Emitter> smokeEmitters = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
if (smokeEmitters.isEmpty()){
|
||||
fx(true);
|
||||
}
|
||||
|
||||
PointF p = DungeonTilemap.raisedTileCenterToWorld(bombPos);
|
||||
if (timer == 3) {
|
||||
FloatingText.show(p.x, p.y, bombPos, "3...", CharSprite.NEUTRAL);
|
||||
} else if (timer == 2){
|
||||
FloatingText.show(p.x, p.y, bombPos, "2...", CharSprite.WARNING);
|
||||
} else if (timer == 1){
|
||||
FloatingText.show(p.x, p.y, bombPos, "1...", CharSprite.NEGATIVE);
|
||||
} else {
|
||||
PathFinder.buildDistanceMap( bombPos, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
Sample.INSTANCE.play(Assets.Sounds.BLAST);
|
||||
detach();
|
||||
return true;
|
||||
}
|
||||
|
||||
timer--;
|
||||
spend(TICK);
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void fx(boolean on) {
|
||||
if (on && bombPos != -1){
|
||||
PathFinder.buildDistanceMap( bombPos, BArray.not( Dungeon.level.solid, null ), 2 );
|
||||
for (int i = 0; i < PathFinder.distance.length; i++) {
|
||||
if (PathFinder.distance[i] < Integer.MAX_VALUE) {
|
||||
Emitter e = CellEmitter.get(i);
|
||||
e.pour( SmokeParticle.FACTORY, 0.25f );
|
||||
smokeEmitters.add(e);
|
||||
}
|
||||
}
|
||||
} else if (!on) {
|
||||
for (Emitter e : smokeEmitters){
|
||||
e.burst(BlastParticle.FACTORY, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static final String BOMB_POS = "bomb_pos";
|
||||
private static final String TIMER = "timer";
|
||||
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put( BOMB_POS, bombPos );
|
||||
bundle.put( TIMER, timer );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
bombPos = bundle.getInt( BOMB_POS );
|
||||
timer = bundle.getInt( TIMER );
|
||||
}
|
||||
|
||||
public static class BombItem extends Item {
|
||||
|
||||
{
|
||||
dropsDownHeap = true;
|
||||
unique = true;
|
||||
|
||||
image = ItemSpriteSheet.TENGU_BOMB;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean doPickUp( Hero hero ) {
|
||||
GLog.w( Messages.get(this, "cant_pickup") );
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onThrow(int cell) {
|
||||
super.onThrow(cell);
|
||||
if (throwingChar != null){
|
||||
Buff.append(throwingChar, BombAbility.class).bombPos = cell;
|
||||
throwingChar = null;
|
||||
} else {
|
||||
Buff.append(curUser, BombAbility.class).bombPos = cell;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Emitter emitter() {
|
||||
Emitter emitter = new Emitter();
|
||||
emitter.pos(7.5f, 3.5f);
|
||||
emitter.fillTarget = false;
|
||||
emitter.pour(SmokeParticle.SPEW, 0.05f);
|
||||
return emitter;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private class Hunting extends Mob.Hunting{
|
||||
|
||||
@Override
|
||||
public boolean act(boolean enemyInFOV, boolean justAlerted) {
|
||||
|
||||
enemySeen = enemyInFOV;
|
||||
if (enemyInFOV && !isCharmedBy( enemy ) && canAttack( enemy )) {
|
||||
return useAbility();
|
||||
} else {
|
||||
|
||||
if (!enemyInFOV) {
|
||||
chooseEnemy();
|
||||
if (enemy == null) {
|
||||
//if nothing else can be targeted, target hero
|
||||
enemy = Dungeon.hero;
|
||||
}
|
||||
}
|
||||
target = enemy.pos;
|
||||
|
||||
spend( 6f );
|
||||
return true;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -25,7 +25,8 @@ import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class GoldBAo extends Item {
|
||||
@SuppressWarnings("all")
|
||||
public class MIME extends Item {
|
||||
|
||||
{
|
||||
image = ItemSpriteSheet.DG21;
|
||||
|
@ -44,4 +45,55 @@ public class GoldBAo extends Item {
|
|||
public int value() {
|
||||
return quantity * Random.Int(2500,5500);
|
||||
}
|
||||
|
||||
public static class GOLD_ONE extends MIME {
|
||||
{
|
||||
image = ItemSpriteSheet.MIME_ONE;
|
||||
}
|
||||
@Override
|
||||
public int value() {
|
||||
return quantity * 750;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GOLD_TWO extends MIME {
|
||||
{
|
||||
image = ItemSpriteSheet.MIME_TWO;
|
||||
}
|
||||
@Override
|
||||
public int value() {
|
||||
return quantity * 450;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GOLD_THREE extends MIME {
|
||||
{
|
||||
image = ItemSpriteSheet.MIME_THREE;
|
||||
}
|
||||
@Override
|
||||
public int value() {
|
||||
return quantity * 150;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GOLD_FOUR extends MIME {
|
||||
{
|
||||
image = ItemSpriteSheet.MIME_FOUR;
|
||||
}
|
||||
@Override
|
||||
public int value() {
|
||||
return quantity * 250;
|
||||
}
|
||||
}
|
||||
|
||||
public static class GOLD_FIVE extends MIME {
|
||||
{
|
||||
image = ItemSpriteSheet.MIME_FIVE;
|
||||
}
|
||||
@Override
|
||||
public int value() {
|
||||
return quantity * 1000;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.wands;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.AnkhInvulnerability;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.SoulMark;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.WandEmpower;
|
||||
|
@ -65,7 +66,7 @@ public abstract class DamageWand extends Wand{
|
|||
}
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_STRONG, 0.75f, 1.2f);
|
||||
}
|
||||
return dmg;
|
||||
return Dungeon.hero.buff(AnkhInvulnerability.GodDied.class)!=null ? dmg*2 : dmg;
|
||||
}
|
||||
|
||||
//TODO some naming issues here. Consider renaming this method and externalizing char awareness buff
|
||||
|
@ -86,8 +87,12 @@ public abstract class DamageWand extends Wand{
|
|||
@Override
|
||||
public String statsDesc() {
|
||||
if (levelKnown)
|
||||
return Messages.get(this, "stats_desc", min(), max());
|
||||
return Messages.get(this, "stats_desc", Dungeon.hero.buff(AnkhInvulnerability.GodDied.class)!=null?
|
||||
min()*2:min(), Dungeon.hero.buff(AnkhInvulnerability.GodDied.class)!=null?
|
||||
max()*2:max());
|
||||
else
|
||||
return Messages.get(this, "stats_desc", min(0), max(0));
|
||||
return Messages.get(this, "stats_desc", Dungeon.hero.buff(AnkhInvulnerability.GodDied.class)!=null?
|
||||
min(0)*2:min(0), Dungeon.hero.buff(AnkhInvulnerability.GodDied.class)!=null?
|
||||
max(0)*2:max(0));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel.State.MAZECOMPLE;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel.State.GO_START;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel.State.MAZE_START;
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.levels.ColdChestBossLevel.State.START;
|
||||
|
||||
|
@ -9,21 +10,23 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses.DiamondKnight;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.utils.Bundle;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
//宝藏迷宫 10层
|
||||
public class ColdChestBossLevel extends Level {
|
||||
|
||||
private State pro;
|
||||
|
||||
private DiamondKnight diamond;
|
||||
|
||||
public State pro(){
|
||||
return pro;
|
||||
}
|
||||
private static final String PRO = "pro";
|
||||
|
||||
private static final String PRO = "pro";
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle( Bundle bundle ) {
|
||||
super.restoreFromBundle(bundle);
|
||||
|
@ -37,6 +40,7 @@ public class ColdChestBossLevel extends Level {
|
|||
|
||||
//地图状态
|
||||
public enum State {
|
||||
GO_START,
|
||||
START,
|
||||
MAZE_START,
|
||||
MAZECOMPLE,
|
||||
|
@ -54,7 +58,7 @@ public class ColdChestBossLevel extends Level {
|
|||
this.entrance = 0;
|
||||
this.exit = 0;
|
||||
//首次构建地图
|
||||
pro = START;
|
||||
pro = GO_START;
|
||||
setMapStart();
|
||||
|
||||
return true;
|
||||
|
@ -115,28 +119,28 @@ public class ColdChestBossLevel extends Level {
|
|||
W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,
|
||||
W,J,L,L,L,L,W,L,W,L,W,W,W,W,W,L,L,L,W,W,W,W,W,W,L,L,L,L,W,L,W,W,W,L,W,
|
||||
W,W,W,W,W,L,W,L,W,L,W,W,W,W,W,L,W,W,W,W,W,W,W,W,L,W,L,L,W,L,W,W,W,L,W,
|
||||
W,W,W,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,L,L,L,W,L,L,W,L,W,W,W,L,W,
|
||||
W,W,W,B,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,L,L,L,W,L,L,W,L,W,W,W,L,W,
|
||||
W,W,W,L,W,W,W,L,W,W,W,L,W,L,L,L,L,L,W,L,L,L,L,W,W,W,L,L,L,L,L,L,W,L,W,
|
||||
W,L,L,L,W,L,L,L,L,L,L,L,W,L,W,L,W,L,W,W,W,L,L,W,L,L,L,L,L,L,W,L,W,L,W,
|
||||
W,L,W,L,W,L,W,W,W,W,W,W,W,W,W,L,W,L,W,L,L,L,L,W,L,L,W,W,W,W,W,L,W,L,W,
|
||||
W,T,W,L,W,L,W,W,W,W,W,W,W,W,W,L,W,L,W,L,L,L,L,W,L,L,W,W,W,W,W,T,W,L,W,
|
||||
W,W,W,L,L,L,L,L,L,W,L,W,L,L,W,L,W,W,W,L,L,W,W,W,L,L,L,L,L,L,W,W,W,L,W,
|
||||
W,W,W,L,W,W,W,W,W,W,L,W,L,L,W,L,W,L,L,L,L,W,L,W,L,L,W,W,W,L,W,L,L,L,W,
|
||||
W,W,W,L,L,W,L,W,L,L,L,L,L,L,W,L,W,W,W,W,W,W,L,W,L,L,L,L,W,L,W,L,L,L,W,
|
||||
W,W,W,L,L,W,L,W,L,W,W,W,W,W,W,L,W,L,W,L,L,W,L,W,L,L,W,L,W,L,L,L,W,L,W,
|
||||
W,W,W,L,L,L,L,W,L,L,W,L,L,L,W,L,L,L,W,L,L,W,L,W,L,L,W,L,W,L,W,W,W,L,W,
|
||||
W,W,W,W,W,W,L,L,L,L,W,L,L,L,W,L,W,W,W,L,L,L,L,L,L,L,W,L,L,L,L,L,W,L,W,
|
||||
W,W,W,L,L,L,L,L,L,L,W,L,L,L,L,L,W,W,W,L,L,W,L,W,L,L,W,W,W,W,L,W,W,L,W,
|
||||
W,W,W,L,L,L,L,L,L,L,W,L,L,L,L,L,W,L,D,B,L,W,L,W,L,L,W,W,W,W,L,W,W,L,W,
|
||||
W,W,W,W,W,L,L,W,L,L,L,L,L,L,L,L,W,W,W,L,L,W,L,W,L,L,L,L,L,L,L,L,W,L,W,
|
||||
W,W,W,L,L,L,W,W,L,W,W,W,L,W,L,L,L,L,W,L,W,W,W,W,W,L,L,L,L,L,L,L,W,L,W,
|
||||
W,W,W,L,L,L,L,W,L,W,W,W,L,W,L,L,L,L,W,L,L,W,L,L,L,L,L,W,W,W,W,W,W,L,W,
|
||||
W,W,W,L,L,L,L,W,L,W,W,W,L,W,L,L,W,L,L,L,L,W,L,W,L,L,L,L,L,L,L,L,L,L,W,
|
||||
W,W,W,L,L,L,W,W,B,W,W,W,L,W,L,L,L,L,W,L,W,W,W,W,W,L,L,L,L,L,L,L,W,L,W,
|
||||
W,W,W,L,L,L,L,W,L,D,L,W,L,W,L,L,L,L,W,L,L,W,L,L,L,L,L,W,W,W,W,W,W,L,W,
|
||||
W,W,W,L,L,L,L,W,L,W,W,W,L,W,L,L,W,L,L,L,L,W,L,W,L,L,L,L,L,L,L,L,L,B,W,
|
||||
W,W,W,L,W,W,W,W,L,L,L,L,L,L,L,L,W,L,L,L,L,W,L,W,W,W,L,L,W,L,L,L,L,W,W,
|
||||
W,W,W,L,L,L,L,W,L,L,L,L,L,L,L,L,W,W,W,W,L,L,L,W,L,W,W,L,W,W,W,W,W,W,W,
|
||||
W,W,W,L,L,L,L,W,L,L,L,L,W,W,W,L,W,L,L,L,L,L,L,W,L,L,L,L,L,L,L,L,L,W,W,
|
||||
W,L,L,L,L,L,L,L,L,L,L,L,W,L,L,L,W,L,W,W,W,W,L,W,L,W,W,W,W,W,W,W,L,W,W,
|
||||
W,L,W,L,L,W,W,W,W,L,W,W,W,W,W,W,W,L,L,L,L,W,L,L,L,L,L,L,L,L,L,W,L,L,W,
|
||||
W,L,W,L,L,L,L,L,W,L,L,L,L,L,W,L,W,W,W,W,L,W,L,L,L,L,L,L,W,L,L,W,L,L,W,
|
||||
W,L,W,W,W,W,L,L,W,L,L,W,W,W,W,L,L,W,L,W,L,W,L,L,W,W,W,L,W,L,L,L,L,L,W,
|
||||
W,T,W,W,W,W,L,L,W,L,L,W,W,W,W,L,L,W,L,W,L,W,L,L,W,W,W,L,W,L,L,L,L,L,W,
|
||||
W,W,W,L,L,L,L,L,W,L,L,L,L,L,W,L,L,W,L,L,L,W,L,L,L,L,W,L,W,W,W,W,W,W,W,
|
||||
W,W,W,L,W,L,W,W,W,L,L,L,W,L,W,L,L,W,W,W,L,W,W,W,W,W,W,L,W,L,L,L,L,L,W,
|
||||
W,W,W,L,W,L,L,L,W,L,L,L,W,L,W,L,L,W,L,L,L,L,L,L,L,L,W,L,L,L,W,W,W,L,W,
|
||||
|
@ -144,8 +148,8 @@ public class ColdChestBossLevel extends Level {
|
|||
W,W,W,W,W,L,L,W,W,L,W,L,W,L,W,W,W,W,L,L,W,L,L,W,L,L,L,L,W,L,W,W,W,L,W,
|
||||
W,W,W,L,L,L,W,W,W,L,W,L,W,L,L,W,L,L,L,L,L,L,L,W,L,L,L,L,W,L,L,L,L,L,W,
|
||||
W,W,W,L,W,L,L,L,W,L,W,L,W,L,L,W,L,W,W,W,W,W,L,W,W,W,W,W,W,W,W,W,W,W,W,
|
||||
W,W,W,L,W,L,W,L,W,W,W,W,W,L,W,W,L,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,W,
|
||||
W,L,L,L,W,L,W,L,L,L,L,L,L,L,L,W,W,W,W,W,W,L,W,L,L,L,W,L,L,L,W,L,L,X,W,
|
||||
W,W,W,L,W,L,W,L,W,W,W,W,W,L,W,W,T,L,L,L,W,L,L,L,W,L,L,L,W,L,L,L,W,L,W,
|
||||
W,B,L,L,W,L,W,L,L,L,L,L,L,L,L,W,W,W,W,W,W,L,W,L,L,L,W,L,L,L,W,L,T,X,W,
|
||||
W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,W,
|
||||
};
|
||||
|
||||
|
@ -155,72 +159,84 @@ public class ColdChestBossLevel extends Level {
|
|||
map = WorldRoomShort.clone();
|
||||
}
|
||||
|
||||
private void setMazeStart() {
|
||||
entrance = HOME;
|
||||
map = MazeRoom.clone();
|
||||
private static final HashMap<Integer, Integer> MAIN_PORTAL = new HashMap<>(5);
|
||||
{
|
||||
MAIN_PORTAL.put(32 + WIDTH * 33, WIDTH*3 + 3);
|
||||
MAIN_PORTAL.put(211, 628);
|
||||
MAIN_PORTAL.put(1136, 533);
|
||||
MAIN_PORTAL.put(841, 1156);
|
||||
MAIN_PORTAL.put(241, 474);
|
||||
}
|
||||
|
||||
private static final HashMap<Integer, Integer> IF_MAIN_PORTAL = new HashMap<>(5);
|
||||
{
|
||||
IF_MAIN_PORTAL.put(32 + WIDTH * 33, WIDTH*3 + 3);
|
||||
IF_MAIN_PORTAL.put(211, 628);
|
||||
IF_MAIN_PORTAL.put(1136, 533);
|
||||
IF_MAIN_PORTAL.put(841, 1156);
|
||||
IF_MAIN_PORTAL.put(241, 474);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void occupyCell(Char ch) {
|
||||
super.occupyCell(ch);
|
||||
|
||||
if (ch == Dungeon.hero){
|
||||
switch (pro){
|
||||
case START:
|
||||
if (map[getBossDoor] == Terrain.DOOR && ch.pos == LDBossDoor) {
|
||||
progress();
|
||||
}
|
||||
break;
|
||||
case MAZE_START:
|
||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])) {
|
||||
if (pro != MAZECOMPLE && mob instanceof DiamondKnight && mob.HP > 350) {
|
||||
changeMap(MazeRoom);
|
||||
pro = MAZECOMPLE;
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MAZECOMPLE:
|
||||
break;
|
||||
}
|
||||
if (map[getBossDoor] == Terrain.DOOR && ch.pos == LDBossDoor && ch == hero) {
|
||||
progress();
|
||||
}
|
||||
|
||||
|
||||
for (Mob mob : Dungeon.level.mobs.toArray(new Mob[0])){
|
||||
if(mob instanceof DiamondKnight && mob.HP >400){
|
||||
GLog.n("ColdChestBoss");
|
||||
} else if (pro != MAZE_START && mob instanceof DiamondKnight && mob.HP >350) {
|
||||
GLog.n("让这场游戏变得更加有趣吧");
|
||||
GameScene.flash(0x808080);
|
||||
pro = MAZE_START;
|
||||
if(ch == hero){
|
||||
//指定区域
|
||||
if(MAIN_PORTAL.containsKey(ch.pos) && pro == MAZE_START) {
|
||||
ScrollOfTeleportation.appear(ch, IF_MAIN_PORTAL.get(ch.pos));
|
||||
//传送目标区域
|
||||
hero.interrupt();
|
||||
Dungeon.observe();
|
||||
GameScene.updateFog();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//GLog.n(String.valueOf(hero.pos));
|
||||
}
|
||||
|
||||
public void progress(){
|
||||
switch (pro) {
|
||||
case START:
|
||||
case GO_START:
|
||||
//如果有生物来到BossDoor的下一个坐标,且生物是玩家,那么触发seal().
|
||||
seal();
|
||||
DiamondKnight boss = new DiamondKnight();
|
||||
boss.state = boss.WANDERING;
|
||||
boss.pos = WIDTH*19+17;
|
||||
GameScene.add( boss );
|
||||
set( getBossDoor, Terrain.LOCKED_DOOR );
|
||||
GameScene.updateMap( getBossDoor );
|
||||
set( HOME, Terrain.EMPTY );
|
||||
GameScene.updateMap( HOME );
|
||||
Dungeon.observe();
|
||||
seal();
|
||||
DiamondKnight bossx = new DiamondKnight();
|
||||
bossx.state = bossx.WANDERING;
|
||||
bossx.pos = WIDTH*19+17;
|
||||
GameScene.add( bossx );
|
||||
set( getBossDoor, Terrain.LOCKED_DOOR );
|
||||
GameScene.updateMap( getBossDoor );
|
||||
set( HOME, Terrain.EMPTY );
|
||||
GameScene.updateMap( HOME );
|
||||
Dungeon.observe();
|
||||
pro = START;
|
||||
break;
|
||||
case START:
|
||||
//血量低于360后且在START枚举中
|
||||
for (Mob boss : Dungeon.level.mobs.toArray(new Mob[0])) {
|
||||
if(boss instanceof DiamondKnight) {
|
||||
//如果楼层为开始且boss血量小于360 二阶段
|
||||
if (pro == START && boss.HP < 360) {
|
||||
//动态修改整个房间
|
||||
changeMap(MazeRoom);
|
||||
//宝箱王移动到看戏位
|
||||
ScrollOfTeleportation.appear(boss, MDX);
|
||||
//玩家移动到初始位
|
||||
ScrollOfTeleportation.appear(hero, STARTPOS);
|
||||
boss.HP = 360;
|
||||
pro = MAZE_START;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MAZE_START:
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
protected void createMobs() {
|
||||
|
||||
|
@ -228,6 +244,9 @@ public class ColdChestBossLevel extends Level {
|
|||
|
||||
private static final int getBossDoor = WIDTH*11+17;
|
||||
private static final int LDBossDoor = WIDTH*12+17;
|
||||
|
||||
public static final int MDX = WIDTH*28+31;
|
||||
public static final int STARTPOS = WIDTH+4;
|
||||
private static final int HOME = WIDTH*2+17;
|
||||
|
||||
@Override
|
||||
|
|
|
@ -182,7 +182,7 @@ public class InterlevelScene extends PixelScene {
|
|||
fadeTime += 0.9f; //adds 1 second total
|
||||
//speed up transition when debugging
|
||||
} else if (DeviceCompat.isDebug()){
|
||||
fadeTime = 0.85f;
|
||||
fadeTime = 0.1f;
|
||||
}
|
||||
|
||||
SkinnedBlock bg = new SkinnedBlock(Camera.main.width, Camera.main.height, loadingAsset ){
|
||||
|
|
|
@ -436,6 +436,13 @@ public class ItemSpriteSheet {
|
|||
public static final int ARTIFACT_ROSE2 = ARTIFACTS+21;
|
||||
public static final int ARTIFACT_ROSE3 = ARTIFACTS+22;
|
||||
public static final int Gold_Iron = ARTIFACTS+23;
|
||||
|
||||
public static final int MIME_ONE = ARTIFACTS+24;
|
||||
public static final int MIME_TWO = ARTIFACTS+25;
|
||||
public static final int MIME_THREE = ARTIFACTS+26;
|
||||
public static final int MIME_FOUR = ARTIFACTS+27;
|
||||
public static final int MIME_FIVE = ARTIFACTS+28;
|
||||
|
||||
static{
|
||||
assignItemRect(ARTIFACT_CLOAK, 9, 15);
|
||||
assignItemRect(ARTIFACT_ARMBAND, 16, 13);
|
||||
|
|
|
@ -12,7 +12,7 @@ public class SwordLingSprites extends CharSprite{
|
|||
public PosTweener tweener;
|
||||
private Callback callback;
|
||||
|
||||
public float time = 1f;
|
||||
public float time;
|
||||
|
||||
public SwordLingSprites() {
|
||||
super();
|
||||
|
@ -37,7 +37,7 @@ public class SwordLingSprites extends CharSprite{
|
|||
PointF pointF1 = worldToCamera(to);
|
||||
PointF d = PointF.diff(pointF1,pointF);
|
||||
angle = 90 - (float)(Math.atan2(d.x,d.y) / 3.1415926 * 180);
|
||||
speed.set(d).normalize().scale(200f);
|
||||
speed.set(d).normalize().scale(10f);
|
||||
angularSpeed = 0;
|
||||
|
||||
tweener = new PosTweener(this,pointF1,1f);
|
||||
|
|
|
@ -44,7 +44,7 @@ public class BossSettingWindows extends Window {
|
|||
cb.setRect(GAP, 500, WIDTH - GAP * 2, BOX_HEIGHT);
|
||||
}
|
||||
|
||||
if(i == 1 || i == 0 || i==4){
|
||||
if(1==2){
|
||||
cb.alpha(0.4f);
|
||||
cb.active=false;
|
||||
cb.checked(false);
|
||||
|
|
Loading…
Reference in New Issue
Block a user