Update V0.6.1.0-Beta3.5
This commit is contained in:
parent
287c2da8ad
commit
a6be4212fe
|
@ -101,6 +101,9 @@ dependencies {
|
|||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
|
||||
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
|
||||
implementation "com.badlogicgames.gdx-controllers:gdx-controllers-android:$gdxControllersVersion"
|
||||
|
||||
//修复小米手表与低安卓系统的WebView冲突兼容问题
|
||||
implementation 'androidx.appcompat:appcompat:1.0.2'
|
||||
}
|
||||
|
||||
// called every time gradle gets executed, takes the native dependencies of
|
||||
|
|
|
@ -13,6 +13,10 @@
|
|||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
|
||||
<!--Fixed OBSERVE_GRANT_REVOKE_PERMISSIONS-->
|
||||
<uses-permission android:name="android.permission.OBSERVE_GRANT_REVOKE_PERMISSIONS"
|
||||
tools:ignore="ProtectedPermissions" />
|
||||
|
||||
<!-- We perform a runtime check to ensure controllers are disabled on API 14 & 15 -->
|
||||
<uses-sdk tools:overrideLibrary="com.badlogicgames.gdx.controllers" />
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ allprojects {
|
|||
appName = 'Magic Ling Pixel Dungeon'
|
||||
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
|
||||
|
||||
appVersionCode =900902
|
||||
appVersionName = '0.6.3.0-Beta2.1'
|
||||
appVersionCode =900904
|
||||
appVersionName = '0.6.3.0-Beta3.1'
|
||||
|
||||
appJavaCompatibility = JavaVersion.VERSION_11
|
||||
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -2,6 +2,18 @@
|
|||
|
||||
actors.hero.hero.heartdied=死亡不是终点,而是新的开始。
|
||||
|
||||
actors.mobs.brutebot.name=重甲豺狼
|
||||
actors.mobs.brutebot.desc=豺狼人从击败的冒险者身上获得了盔甲,看来豺狼人们终于意识到拿个盾真的没有什么用了……\n\n虽然重甲豺狼对冒险家的威胁极大,但沉重的装甲使他们行动缓慢……\n\n通常来说矮人们会雇佣一些这种豺狼来帮他们干活。重甲豺狼非常喜欢用武器砸人,但是他们的武器并不是很结实,所以他们会经常把武器砸坏,然后再去找矮人们要新的武器。
|
||||
actors.mobs.brutebot$brutebotrage.name=临死一搏
|
||||
actors.mobs.brutebot$brutebotrage.desc=这个重甲豺狼的死亡已经不可避免,但它想拉你作为陪葬品!\n\n时间的推移或是外界的伤害都会消磨护盾。在护盾消散殆尽之际,重甲豺狼会彻底消亡。然而,一定要小心,在这一阶段重甲豺狼远程和近战会造成{巨额伤害,且攻击间隔大幅度缩减{ !\n\n剩余的护盾:%d。
|
||||
actors.mobs.brutebot.enraged=激怒
|
||||
actors.mobs.brutebot.died=你激怒了重甲豺狼,它将会在死亡前尽全力攻击你!并且它呼唤了本层的所有敌人。
|
||||
actors.mobs.brutebot$focus.name=红眼凝视
|
||||
actors.mobs.brutebot$focus.desc=这个重甲豺狼已经完全凝视于目标的一举一动,似乎能预料到目标的下一步动作。\n\n红眼凝视中的重甲豺狼一定会格挡下一次物理攻击。格挡会分散重甲豺狼的注意力,使得他们需要一段时间重新集中精力来成功格挡攻击。在移动时重甲豺狼恢复地相对更快。
|
||||
actors.mobs.brutebot.def_verb=格挡
|
||||
actors.mobs.brutebot.parried=盾反
|
||||
actors.mobs.brutebot.ondeath=你被重甲豺狼杀死了……,下次请小心……
|
||||
|
||||
actors.mobs.bosses.diamondknight.name=拟态之王
|
||||
actors.mobs.bosses.diamondknight.desc=拟态的最终结果就是无限接近人类。\n原本作用拟形的钻石宝箱外壳化作盔甲,包裹住如王般的内在。\n衪是所有拟形怪的王——至少衪是这么认为的。\n王会战斗到最后一刻,直到粉身碎骨。
|
||||
|
||||
|
|
|
@ -675,6 +675,7 @@ items.artifacts.driedrose$ghosthero.seen_crivuefruit_3=你动不动就吃苹果
|
|||
items.artifacts.driedrose$ghosthero.seen_tengu_1=唯一剩下的囚犯是个危险的暗杀者。真应景……
|
||||
items.artifacts.driedrose$ghosthero.seen_tengu_2=我们被他困住了!
|
||||
items.artifacts.driedrose$ghosthero.seen_tengu_3=有关那个面具的鬼故事我听过不少……
|
||||
|
||||
items.artifacts.driedrose$ghosthero.seen_dm300_1=让挖矿的机器追杀外来者这种事只有矮人才干得出来。
|
||||
items.artifacts.driedrose$ghosthero.seen_dm300_2=真是个大家伙……
|
||||
items.artifacts.driedrose$ghosthero.seen_dm300_3=这东西怎么弄的,能运作这么久?
|
||||
|
|
|
@ -60,6 +60,9 @@ badges$badge.death_from_hunger.desc=死于饥饿
|
|||
badges$badge.death_from_falling.title=变成薄饼
|
||||
badges$badge.death_from_falling.desc=死于坠落
|
||||
|
||||
badges$badge.brute_bot_died.title=豺狼的复仇
|
||||
badges$badge.brute_bot_died.desc=在重甲豺狼暴怒阶段下被它杀死……
|
||||
|
||||
badges$badge.kill_rotheart.title=铲除腐莓之心
|
||||
badges$badge.kill_rotheart.desc=完成老杖匠的腐莓之心任务,使冰雪监狱得到暂时的安定。
|
||||
|
||||
|
@ -163,10 +166,10 @@ badges$badge.clear_water.title=净化大师
|
|||
badges$badge.clear_water.desc=完成挑战:污泥浊水
|
||||
|
||||
badges$badge.ghostdage.title=白幽祝福
|
||||
badges$badge.ghostdage.desc=_在幽妹处获得一次+4品质武器或护甲\n\n_(镀层需求:+5品质武器)
|
||||
badges$badge.ghostdage.desc=_在幽妹处获得一次+3品质武器或护甲\n\n_(镀层需求:+4品质武器)
|
||||
|
||||
badges$badge.dageto.title=白幽神谕
|
||||
badges$badge.dageto.desc=在幽妹处获得一次_+5_品质武器或护甲\n\n[你已成功镀层[
|
||||
badges$badge.dageto.desc=在幽妹处获得一次_+4_品质武器或护甲\n\n[你已成功镀层[
|
||||
|
||||
badges$badge.endied.title=终焉之旅
|
||||
badges$badge.endied.desc=_(获得彩蛋武器终焉)_,目前版本暂时无法获得
|
||||
|
@ -199,7 +202,7 @@ badges$badge.big_x.title=突变风波
|
|||
badges$badge.big_x.desc=基因突变开启通关!你见证了地牢的突变体,同时也看见了玩火必自焚的道理……\n\n_奖励:0层随机护甲(四大基座上)_
|
||||
|
||||
badges$badge.exsg.title=大症若愚
|
||||
badges$badge.exsg.desc=药水癔症只是一个假象,你仍然坚持过来了!\n\n_奖励:1500初始金币,两个经验药水_
|
||||
badges$badge.exsg.desc=药水癔症只是一个假象,你仍然坚持过来了!\n\n_奖励:720初始金币_
|
||||
|
||||
badges$badge.kill_dm720.title=兵不厌“炸”
|
||||
badges$badge.kill_dm720.desc=击杀冰雪矿洞中的DM-720和它的驾驶员。\n\n_奖励:0层额外2阶武器(四大基座上,与冰雪魔女不叠加)_
|
||||
|
@ -245,7 +248,7 @@ badges$badge.spicealboss.title=弱肉强食
|
|||
badges$badge.spicealboss.desc=累计击败全部特殊BOSS,你的威望已经让每个首领对你望而生畏和敬佩不已。
|
||||
|
||||
badges$badge.nyz_shop.title=奈亚大亨
|
||||
badges$badge.nyz_shop.desc=购买终端的物品,让奈亚子自愿入驻0层!\n\n_奖励:0层奈亚子常驻,1200初始金币,5次奈亚子终端商店购买权限_
|
||||
badges$badge.nyz_shop.desc=购买终端的物品,让奈亚子自愿入驻0层!\n\n_奖励:0层奈亚子常驻,320初始金币,5次奈亚子终端商店购买权限_
|
||||
|
||||
badges$badge.high_score_1.title=菜鸟上路
|
||||
badges$badge.high_score_1.desc=在结束游戏时达到 _B级_ 评价。
|
||||
|
|
|
@ -195,6 +195,7 @@ scenes.gamenewsscene.read_more=继续游玩
|
|||
scenes.gamenewsscene$articlebutton.update=最新版本!
|
||||
scenes.gamenewsscene$articlebutton.desc=恭喜!!!\n你的游戏版本为最新,请点击下方继续游玩的按钮以方便你继续游玩这个游戏。\n最新版更新内容如下所示:
|
||||
scenes.gamenewsscene$articlebutton.download=]更新版本]
|
||||
scenes.gamenewsscene$articlebutton.stop_download=暂不更新
|
||||
scenes.gamenewsscene$articlebutton.force_download=点我下载正版并关闭游戏
|
||||
scenes.gamenewsscene$articlebutton.okay=继续游玩
|
||||
scenes.gamenewsscene$newsinfo.metered_network=当连接到一个流量计费的网络,比如移动数据时,为了保证你的话费,我们不会发送更新数据给你。\n\n请连接WIFI后再次尝试,现在可以点击下方继续游玩继续游戏。
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 1.6 KiB |
|
@ -89,6 +89,8 @@ public class Badges {
|
|||
|
||||
READ_BOOK_ONE ( 24 ),
|
||||
|
||||
BRUTE_BOT_DIED ( 25 ),
|
||||
|
||||
//silver
|
||||
NO_MONSTERS_SLAIN ( 32 ),
|
||||
GRIM_WEAPON ( 33 ),
|
||||
|
@ -741,6 +743,12 @@ public class Badges {
|
|||
displayBadge( badge );
|
||||
}
|
||||
|
||||
public static void BRUTE_DIED() {
|
||||
Badge badge = Badge.BRUTE_BOT_DIED;
|
||||
local.add( badge );
|
||||
displayBadge( badge );
|
||||
}
|
||||
|
||||
private static void validateGOODMAKE() {
|
||||
if (global.contains( Badge.KILL_ROTHEART ) &&
|
||||
global.contains( Badge.GET_SC ) &&
|
||||
|
@ -766,7 +774,7 @@ public class Badges {
|
|||
global.contains( Badge.DEATH_FROM_GAS ) &&
|
||||
global.contains( Badge.DEATH_FROM_HUNGER) &&
|
||||
global.contains( Badge.DEATH_FROM_GLYPH) &&
|
||||
global.contains( Badge.DEATH_FROM_FALLING)) {
|
||||
global.contains( Badge.DEATH_FROM_FALLING) && global.contains( Badge.HALOFIRE_DIED) && global.contains( Badge.BRUTE_BOT_DIED)) {
|
||||
|
||||
Badge badge = Badge.YASD;
|
||||
displayBadge( badge );
|
||||
|
|
|
@ -85,7 +85,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.SewerBossLevel;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.ShopBossLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.YogGodHardBossLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.ZeroLevel;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret.SecretRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
|
@ -463,7 +462,7 @@ public class Dungeon {
|
|||
} else
|
||||
switch (depth) {
|
||||
case 0:
|
||||
level = new ZeroLevel();
|
||||
level = new DM920BossLevel();
|
||||
break;
|
||||
case 1:
|
||||
case 2:
|
||||
|
|
|
@ -46,7 +46,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Sh
|
|||
import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.LevelTeleporter;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.MobPlacer;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask;
|
||||
|
@ -134,10 +133,6 @@ public enum HeroClass {
|
|||
|
||||
public void initHero( Hero hero ) {
|
||||
|
||||
if (Dungeon.isChallenged(Challenges.RLPT)) {
|
||||
new Ankh().quantity(1).identify().collect();
|
||||
}
|
||||
|
||||
if(!Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_3) && Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ){
|
||||
Badges.BOSSTHREE();
|
||||
}
|
||||
|
@ -148,12 +143,11 @@ public enum HeroClass {
|
|||
|
||||
if ( Badges.isUnlocked(Badges.Badge.NYZ_SHOP)){
|
||||
Buff.affect(hero, RandomBuff.class).set( (5), 1 );
|
||||
Dungeon.gold+=1200;
|
||||
Dungeon.gold += 320;
|
||||
}
|
||||
|
||||
if ( Badges.isUnlocked(Badges.Badge.EXSG)){
|
||||
Dungeon.gold += 1500;
|
||||
new PotionOfExperience().quantity(2).identify().collect();
|
||||
Dungeon.gold += 720;
|
||||
}
|
||||
|
||||
if ( Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)){
|
||||
|
@ -168,8 +162,6 @@ public enum HeroClass {
|
|||
new MysteryMeat().quantity(100).identify().collect();
|
||||
new TimekeepersHourglass().quantity(1).identify().collect();
|
||||
|
||||
new Amulet().quantity(1).identify().collect();
|
||||
|
||||
Buff.affect(hero, ChampionHero.AntiMagic.class, 50000f);
|
||||
new WraithAmulet().quantity(1).identify().collect();
|
||||
new BloodthirstyThorn().quantity(1).identify().collect();
|
||||
|
@ -242,10 +234,8 @@ public enum HeroClass {
|
|||
new BookBag().quantity(1).identify().collect();
|
||||
new PotionOfHealing().quantity(3).identify().collect();
|
||||
|
||||
new ScrollOfUpgrade().quantity(1).identify().collect();
|
||||
|
||||
if (!Challenges.isItemBlocked(i)) i.collect();
|
||||
new PotionOfLightningShiledX().quantity(3).identify().collect();
|
||||
new PotionOfLightningShiledX().quantity(2).identify().collect();
|
||||
new ScrollOfIdentify().identify();
|
||||
|
||||
new VelvetPouch().collect();
|
||||
|
|
|
@ -103,7 +103,8 @@ public class Bestiary {
|
|||
case 2:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Monk.class,FireGhost.class,FireGhost.class,Warlock.class));
|
||||
Monk.class,FireGhost.class,
|
||||
Warlock.class,Random.NormalFloat(1,6)>=3 ? BruteBot.class : Warlock.class));
|
||||
case 3:
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
|
@ -249,32 +250,33 @@ public class Bestiary {
|
|||
//1x elemental, 1x warlock, 2x monk, 3x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Warlock.class,
|
||||
Random.NormalFloat(1,6)>=3 ? BruteBot.class : Warlock.class,
|
||||
Monk.class,
|
||||
Golem.class,FireGhost.class));
|
||||
case 19:
|
||||
//1x elemental, 1x warlock, 2x monk, 3x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Monk.class,
|
||||
Golem.class,ShieldHuntsman.class));
|
||||
Golem.class, Warlock.class,ShieldHuntsman.class,
|
||||
Random.NormalFloat(1,6)>3 ? BruteBot.class : Warlock.class));
|
||||
case 20:
|
||||
//1x elemental, 1x warlock, 2x monk, 3x golem
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Elemental.random(),
|
||||
Warlock.class, Warlock.class,
|
||||
Random.NormalFloat(1,6)>3 ? BruteBot.class : Warlock.class,
|
||||
Monk.class,
|
||||
Golem.class, Golem.class,Ice_Scorpio.class));
|
||||
|
||||
case 21:
|
||||
//3x succubus, 3x evil eye
|
||||
return new ArrayList<>(Arrays.asList(
|
||||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class));
|
||||
Eye.class,ShieldHuntsman.class));
|
||||
case 22:
|
||||
//3x succubus, 3x evil eye
|
||||
return Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ? new ArrayList<>(Arrays.asList(
|
||||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class,RedMurderer.class,MolotovHuntsman.class)) :
|
||||
Eye.class,ShieldHuntsman.class,RedMurderer.class,MolotovHuntsman.class)) :
|
||||
new ArrayList<>(Arrays.asList(
|
||||
Eye.class,ShieldHuntsman.class,Ice_Scorpio.class));
|
||||
Eye.class,ShieldHuntsman.class));
|
||||
case 23:
|
||||
//1x: succubus, 2x evil eye, 3x scorpio
|
||||
return Dungeon.isDLC(Conducts.Conduct.BOSSRUSH) ? new ArrayList<>(Arrays.asList(
|
||||
|
|
|
@ -0,0 +1,329 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Bleeding;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ShieldBuff;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Sleep;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.traps.AlarmTrap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BruteBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.audio.Sample;
|
||||
import com.watabou.utils.Bundle;
|
||||
import com.watabou.utils.Callback;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class BruteBot extends Mob implements Callback,Hero.Doom {
|
||||
protected float focusCooldown = 0;
|
||||
public int count = Random.NormalIntRange(1,2);
|
||||
protected boolean hasRaged = false;
|
||||
{
|
||||
spriteClass = BruteBotSprite.class;
|
||||
|
||||
HP = HT = 120;
|
||||
defenseSkill = 12;
|
||||
|
||||
baseSpeed=0.75f;
|
||||
|
||||
EXP = 15;
|
||||
maxLvl = 24;
|
||||
|
||||
loot = Generator.Category.WEAPON;
|
||||
lootChance = 0.25f;
|
||||
|
||||
properties.add(Property.MINIBOSS);
|
||||
}
|
||||
|
||||
protected void triggerEnrage(){
|
||||
Buff.affect(this, BruteBot.BruteBotRage.class).setShield(HT/2 + 40);
|
||||
if (Dungeon.level.heroFOV[pos]) {
|
||||
sprite.showStatus( CharSprite.NEGATIVE, Messages.get(this, "enraged") );
|
||||
AlarmTrap trap = new AlarmTrap();
|
||||
trap.pos = super.pos;
|
||||
trap.activate();
|
||||
GLog.n(Messages.get(this, "died"));
|
||||
}
|
||||
spend( TICK );
|
||||
hasRaged = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
boolean result = super.act();
|
||||
if (buff(BruteBot.Focus.class) == null && state == HUNTING && focusCooldown <= 0) {
|
||||
Buff.affect( this, BruteBot.Focus.class );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized boolean isAlive() {
|
||||
if (super.isAlive()){
|
||||
return true;
|
||||
} else {
|
||||
if (!hasRaged){
|
||||
triggerEnrage();
|
||||
}
|
||||
return !buffs(BruteBotRage.class).isEmpty();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int damageRoll() {
|
||||
return buff(BruteBot.BruteBotRage.class) != null ?
|
||||
Random.NormalIntRange( 20, 50 ) :
|
||||
Random.NormalIntRange( 15, 20 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int attackSkill( Char target ) {
|
||||
return 16;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int defenseSkill( Char enemy ) {
|
||||
if (buff(BruteBot.Focus.class) != null && paralysed == 0 && state != SLEEPING){
|
||||
return INFINITE_EVASION;
|
||||
}
|
||||
return super.defenseSkill( enemy );
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void spend( float time ) {
|
||||
focusCooldown -= time;
|
||||
super.spend( time );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void move( int step, boolean travelling) {
|
||||
// moving reduces cooldown by an additional 0.67, giving a total reduction of 1.67f.
|
||||
// basically monks will become focused notably faster if you kite them.
|
||||
if (travelling) focusCooldown -= 0.67f;
|
||||
super.move( step, travelling);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String defenseVerb() {
|
||||
BruteBot.Focus f = buff(BruteBot.Focus.class);
|
||||
if (f == null) {
|
||||
return super.defenseVerb();
|
||||
} else {
|
||||
f.detach();
|
||||
if (sprite != null && sprite.visible) {
|
||||
Sample.INSTANCE.play(Assets.Sounds.HIT_PARRY, 1, Random.Float(0.96f, 1.05f));
|
||||
}
|
||||
focusCooldown = Random.NormalFloat( 6, 7 );
|
||||
return Messages.get(this, "parried");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean canAttack( Char enemy ) {
|
||||
return new Ballistica( pos, enemy.pos, Ballistica.MAGIC_BOLT).collisionPos == enemy.pos;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void aggro(Char ch) {
|
||||
//cannot be aggroed to something it can't see
|
||||
if (ch == null || fieldOfView == null || fieldOfView[ch.pos]) {
|
||||
super.aggro(ch);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public int drRoll() {
|
||||
return Random.NormalIntRange(8, 12);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int attackProc(Char enemy, int damage) {
|
||||
|
||||
switch (count) {
|
||||
case 1:
|
||||
if(Random.Int(16) == 0){
|
||||
Buff.prolong(enemy, Cripple.class, Cripple.DURATION);
|
||||
}
|
||||
|
||||
break;
|
||||
case 2:
|
||||
if(Random.Int(16) == 0) {
|
||||
Buff.affect(enemy, Bleeding.class).set(5f);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
super.attackProc(enemy, damage);
|
||||
break;
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean doAttack( Char enemy ) {
|
||||
|
||||
if (Dungeon.level.distance( pos, enemy.pos ) <= 1) {
|
||||
|
||||
|
||||
return super.doAttack( enemy );
|
||||
|
||||
} else {
|
||||
spend( buff(BruteBot.BruteBotRage.class) != null? 1f : 3f );
|
||||
if (sprite != null && (sprite.visible || enemy.sprite.visible)) {
|
||||
sprite.attack( enemy.pos );
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void call() {
|
||||
next();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void die(Object cause) {
|
||||
super.die(cause);
|
||||
|
||||
if (cause == Chasm.class){
|
||||
hasRaged = true; //don't let enrage trigger for chasm deaths
|
||||
}
|
||||
|
||||
if(Random.Float()<0.25f){
|
||||
Dungeon.level.drop(Generator.randomArmor(), pos ).sprite.drop();
|
||||
}
|
||||
|
||||
Dungeon.level.drop( new Gold( Random.IntRange( 80, 120 ) ), pos ).sprite.drop();;
|
||||
}
|
||||
|
||||
public static class BruteBotRage extends ShieldBuff {
|
||||
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean act() {
|
||||
|
||||
if (target.HP > 0){
|
||||
detach();
|
||||
return true;
|
||||
}
|
||||
|
||||
absorbDamage( 2);
|
||||
|
||||
if (shielding() <= 0){
|
||||
target.die(null);
|
||||
}
|
||||
|
||||
spend( TICK );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon () {
|
||||
return BuffIndicator.FURY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString () {
|
||||
return Messages.get(this, "name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc () {
|
||||
return Messages.get(this, "desc", shielding());
|
||||
}
|
||||
|
||||
{
|
||||
immunities.add(Terror.class);
|
||||
}
|
||||
}
|
||||
|
||||
public static class Focus extends Buff {
|
||||
|
||||
{
|
||||
type = buffType.POSITIVE;
|
||||
announced = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int icon() {
|
||||
return BuffIndicator.MIND_VISION;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void tintIcon(Image icon) {
|
||||
icon.hardlight(0x00ff0000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return Messages.get(this, "name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String desc() {
|
||||
return Messages.get(this, "desc");
|
||||
}
|
||||
}
|
||||
|
||||
private static final String NUM_CONTS = "numConts";
|
||||
private static final String HAS_RAGED = "has_raged";
|
||||
|
||||
private static String FOCUS_COOLDOWN = "focus_cooldown";
|
||||
@Override
|
||||
public void storeInBundle(Bundle bundle) {
|
||||
super.storeInBundle(bundle);
|
||||
bundle.put(NUM_CONTS, count);
|
||||
bundle.put(HAS_RAGED, hasRaged);
|
||||
bundle.put( FOCUS_COOLDOWN, focusCooldown );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void restoreFromBundle(Bundle bundle) {
|
||||
super.restoreFromBundle(bundle);
|
||||
count = bundle.getInt(NUM_CONTS);
|
||||
hasRaged = bundle.getBoolean(HAS_RAGED);
|
||||
focusCooldown = bundle.getInt( FOCUS_COOLDOWN );
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDeath() {
|
||||
|
||||
if( hasRaged ) {
|
||||
Badges.BRUTE_DIED();
|
||||
}
|
||||
|
||||
Dungeon.fail( getClass() );
|
||||
GLog.n( Messages.get(this, "ondeath") );
|
||||
}
|
||||
|
||||
|
||||
{
|
||||
immunities.add( Sleep.class );
|
||||
immunities.add( HalomethaneBurning.class );
|
||||
immunities.add( Burning.class );
|
||||
immunities.add( ToxicGas.class );
|
||||
}
|
||||
|
||||
}
|
|
@ -129,8 +129,8 @@ public abstract class Mob extends Char {
|
|||
for (int i = 0; i < flakes; i++){
|
||||
int ofs;
|
||||
do {
|
||||
ofs = PathFinder.NEIGHBOURS8[Random.Int(4)];
|
||||
} while (!Dungeon.level.passable[pos + ofs]);
|
||||
ofs = PathFinder.NEIGHBOURS9[Random.Int(4)];
|
||||
} while (!(Dungeon.level.passable[pos + ofs] || pos + ofs == this.pos));
|
||||
switch (Random.Int(5)) {
|
||||
case 0:
|
||||
Dungeon.level.drop( ( Generator.random(Generator.Category.POTION)), pos+ofs );
|
||||
|
|
|
@ -21,8 +21,6 @@
|
|||
|
||||
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
|
||||
|
||||
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Conducts;
|
||||
|
@ -284,12 +282,11 @@ public class SlimeKing extends Mob {
|
|||
|
||||
private void pullEnemy( Char enemy, int pullPos ){
|
||||
enemy.pos = pullPos;
|
||||
enemy.sprite.place(pullPos);
|
||||
Dungeon.level.occupyCell(enemy);
|
||||
|
||||
Cripple.prolong(enemy, Cripple.class, 4f);
|
||||
|
||||
if (enemy == hero) {
|
||||
hero.interrupt();
|
||||
if (enemy == Dungeon.hero) {
|
||||
Dungeon.hero.interrupt();
|
||||
Dungeon.observe();
|
||||
GameScene.updateFog();
|
||||
}
|
||||
|
@ -352,19 +349,13 @@ public class SlimeKing extends Mob {
|
|||
@Override
|
||||
public boolean act( boolean enemyInFOV, boolean justAlerted ) {
|
||||
enemySeen = enemyInFOV;
|
||||
// //放风筝必死 恼
|
||||
// //140血强制更新玩家血量为1 赋予燃烧 失明 流血 弱化
|
||||
// if (++HP+1 >= 141){
|
||||
// hero.HP = 1;
|
||||
// Buff.affect(hero, HalomethaneBurning.class).reignite(hero);
|
||||
// GLog.b( Messages.get(this, "cus") );
|
||||
// }
|
||||
|
||||
if (!chainsUsed
|
||||
&& enemyInFOV
|
||||
&& !isCharmedBy( enemy )
|
||||
&& !canAttack( enemy )
|
||||
&& Dungeon.level.distance( pos, enemy.pos ) < 3
|
||||
&& Random.Int(3) == 0
|
||||
&& Dungeon.level.distance( pos, enemy.pos ) < 5
|
||||
|
||||
|
||||
&& chain(enemy.pos)){
|
||||
return !(sprite.visible || enemy.sprite.visible);
|
||||
|
|
|
@ -50,7 +50,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EnergyParticle
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ScanningBeam;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.quest.BackGoKey;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
||||
|
@ -746,10 +745,6 @@ public class FireMagicDied extends Mob implements Callback {
|
|||
|
||||
Dungeon.level.drop(new Gold().quantity(5000), pos).sprite.drop();
|
||||
|
||||
Ankh woc = new Ankh();
|
||||
woc.blessed = true;
|
||||
woc.identify();
|
||||
|
||||
Dungeon.level.unseal();
|
||||
|
||||
Buff.affect(hero, ShopLimitLock.class).set((1), 1);
|
||||
|
|
|
@ -324,7 +324,7 @@ public class Ghost extends NPC {
|
|||
Generator.Category c = Generator.wepTiers[wepTier - 1];
|
||||
weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
||||
|
||||
//26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4, 5%+5
|
||||
//26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4
|
||||
float itemLevelRoll = Random.Float();
|
||||
int itemLevel;
|
||||
if (itemLevelRoll < 0.74f){
|
||||
|
@ -336,20 +336,24 @@ public class Ghost extends NPC {
|
|||
} else if (itemLevelRoll < 0.90f) {
|
||||
itemLevel = 3;
|
||||
hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" );
|
||||
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)){
|
||||
hero.sprite.showStatus( CharSprite.POSITIVE, "+5!!!" );
|
||||
if(( !Badges.isUnlocked(Badges.Badge.DAGETO))) {
|
||||
Statistics.dageCollected = 2;
|
||||
Badges.GhostDageCollected();
|
||||
}
|
||||
itemLevel = 5;
|
||||
} else {
|
||||
itemLevel = 4;
|
||||
hero.sprite.showStatus( CharSprite.WARNING, "+4!!!" );
|
||||
if(( !Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
||||
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
||||
Statistics.dageCollected = 1;
|
||||
Badges.GhostDageCollected();
|
||||
}
|
||||
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) {
|
||||
hero.sprite.showStatus(CharSprite.POSITIVE, "+4!!!");
|
||||
if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) {
|
||||
Statistics.dageCollected = 2;
|
||||
Badges.GhostDageCollected();
|
||||
}
|
||||
itemLevel = 4;
|
||||
} else {
|
||||
hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" );
|
||||
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
||||
Statistics.dageCollected = 1;
|
||||
Badges.GhostDageCollected();
|
||||
}
|
||||
itemLevel = 3;
|
||||
}
|
||||
weapon.upgrade(itemLevel);
|
||||
armor.upgrade(itemLevel);
|
||||
|
|
|
@ -16,7 +16,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.food.Pasty;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfFrost;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHaste;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlame;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
|
||||
|
@ -102,7 +101,7 @@ public class NullDiedTO extends NTNPC {
|
|||
shop15 = new MeatPie();
|
||||
shop16 = new LightFood();
|
||||
shop17 = new ScrollOfIdentify();
|
||||
shop18 = new PotionOfHealing();
|
||||
shop18 = new PotionOfLiquidFlame();
|
||||
|
||||
shop19 = new PotionOfHaste();
|
||||
shop20 = new ScrollOfRemoveCurse();
|
||||
|
|
|
@ -80,7 +80,7 @@ public class WraithAmulet extends Artifact {
|
|||
exp += 5;
|
||||
Buff.affect(Dungeon.hero, Invisibility.class, Invisibility.DURATION/2);
|
||||
GLog.p(Messages.get(this,"ghost"));
|
||||
cooldown = 45 - (level / 2);
|
||||
cooldown = 40 - (level / 2);
|
||||
charge--;
|
||||
} else {
|
||||
GLog.i(Messages.get(this,"nochareup"));
|
||||
|
@ -159,7 +159,7 @@ public class WraithAmulet extends Artifact {
|
|||
//I must add Complete WraithAmulet
|
||||
//Ok,Ling will Complete WraithAmulet
|
||||
upgrade();
|
||||
exp += level * 50;
|
||||
exp += level * 25;
|
||||
GLog.p(Messages.get(this,"ghoststong"));
|
||||
}
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ public class WraithAmulet extends Artifact {
|
|||
ScrollOfTeleportation.appear(hero, target);
|
||||
Dungeon.observe();
|
||||
hero.sprite.emitter().start(ShadowParticle.UP, 0.05f, 10);
|
||||
amulet.cooldown = 95;
|
||||
amulet.cooldown = 300;
|
||||
amulet.charge -= 6;
|
||||
} else {
|
||||
GLog.w(Messages.get(this, "notnpc"));
|
||||
|
|
|
@ -61,7 +61,7 @@ public class Sai extends MeleeWeapon {
|
|||
//50x0.1+7x0.5+1=10+3.5+1=15
|
||||
if(attacker.HP >= attacker.HT){
|
||||
GLog.p("血量已满!无法回血");
|
||||
} else {
|
||||
} else if (Random.Float()<0.15f) {
|
||||
R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5);
|
||||
attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5;
|
||||
attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP"));
|
||||
|
|
|
@ -40,7 +40,6 @@ 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.HornOfPlenty;
|
||||
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.artifacts.TimekeepersHourglass;
|
||||
|
@ -270,7 +269,7 @@ public enum Catalog {
|
|||
ARTIFACTS.seen.put( EtherealChains.class, false);
|
||||
ARTIFACTS.seen.put( HornOfPlenty.class, false);
|
||||
//ARTIFACTS.seen.put( LloydsBeacon.class, false);
|
||||
ARTIFACTS.seen.put( MasterThievesArmband.class, false);
|
||||
//ARTIFACTS.seen.put( MasterThievesArmband.class, false);
|
||||
ARTIFACTS.seen.put( SandalsOfNature.class, false);
|
||||
ARTIFACTS.seen.put( TalismanOfForesight.class, false);
|
||||
ARTIFACTS.seen.put( TimekeepersHourglass.class, false);
|
||||
|
|
|
@ -112,8 +112,10 @@ public class ZeroLevel extends Level {
|
|||
drop( ( Generator.randomUsingDefaults( Generator.Category.SCROLL ) ), this.width * 20 + 17 );
|
||||
drop( ( Generator.randomUsingDefaults( Generator.Category.SCROLL ) ), this.width * 19 + 16 );
|
||||
|
||||
drop( new Ankh(), this.width * 17 + 20 );
|
||||
drop( new Stylus(), this.width * 19 + 20 );
|
||||
drop( new Ankh(), this.width * 17 + 20 ).type =
|
||||
Heap.Type.FOR_SALE;
|
||||
drop( new Stylus(), this.width * 19 + 20 ).type =
|
||||
Heap.Type.FOR_SALE;
|
||||
|
||||
drop( ( Generator.randomUsingDefaults( Generator.Category.STONE ) ), this.width * 16 + 19 );
|
||||
drop( ( Generator.randomUsingDefaults( Generator.Category.FOOD ) ), this.width * 20 + 19 );
|
||||
|
|
|
@ -9,7 +9,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Nxhy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
|
||||
|
@ -30,7 +29,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.lightblack.OilPotion;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
|
||||
|
@ -139,7 +137,6 @@ public class NxhyShopRoom extends SpecialRoom {
|
|||
itemsToSpawn2.add(TippedDart.randomTipped(2));
|
||||
itemsToSpawn2.add(new MerchantsBeacon());
|
||||
itemsToSpawn2.add(ChooseBag(Dungeon.hero.belongings));
|
||||
itemsToSpawn2.add(new PotionOfHealing());
|
||||
itemsToSpawn2.add(new ScrollOfTransmutation());
|
||||
//itemsToSpawn2.add(new DriedRose());
|
||||
itemsToSpawn2.add(Generator.randomUsingDefaults(Generator.Category.POTION));
|
||||
|
@ -187,7 +184,6 @@ public class NxhyShopRoom extends SpecialRoom {
|
|||
} else if (Int == 3) {
|
||||
itemsToSpawn2.add(new Honeypot());
|
||||
}
|
||||
itemsToSpawn2.add(new Ankh());
|
||||
itemsToSpawn2.add(new StoneOfAugmentation());
|
||||
TimekeepersHourglass hourglass = Dungeon.hero.belongings.getItem(TimekeepersHourglass.class);
|
||||
if (hourglass != null) {
|
||||
|
|
|
@ -22,19 +22,11 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Belongings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Nxhy;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.MagicalHolster;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.PotionBandolier;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.ScrollHolder;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLevitation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MeleeWeapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||
|
@ -43,7 +35,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
|
|||
import com.watabou.utils.Point;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class NxhyShopRoomList extends SpecialRoom {
|
||||
|
||||
|
@ -139,9 +130,6 @@ public class NxhyShopRoomList extends SpecialRoom {
|
|||
switch (Dungeon.depth) {
|
||||
default:
|
||||
w = (MeleeWeapon) Generator.random(Generator.wepTiers[1]);
|
||||
itemsToSpawn.add( new PotionOfHealing() );
|
||||
itemsToSpawn.add( new PotionOfHealing() );
|
||||
itemsToSpawn.add( new PotionOfHealing() );
|
||||
itemsToSpawn.add( Generator.randomUsingDefaults( Generator.Category.STONE ) );
|
||||
itemsToSpawn.add( Generator.randomUsingDefaults( Generator.Category.STONE ) );
|
||||
itemsToSpawn.add( Generator.randomUsingDefaults( Generator.Category.STONE ) );
|
||||
|
@ -176,55 +164,7 @@ public class NxhyShopRoomList extends SpecialRoom {
|
|||
itemsToSpawn.add( new PotionOfLevitation() );
|
||||
itemsToSpawn.add( new PotionOfLevitation() );
|
||||
itemsToSpawn.add( new PotionOfLevitation() );
|
||||
itemsToSpawn.add( new Ankh() );
|
||||
itemsToSpawn.add( new Ankh() );
|
||||
itemsToSpawn.add( new Ankh() );
|
||||
itemsToSpawn.add( new Ankh() );
|
||||
return itemsToSpawn;
|
||||
}
|
||||
|
||||
protected static Bag ChooseBag(Belongings pack){
|
||||
|
||||
//generate a hashmap of all valid bags.
|
||||
HashMap<Bag, Integer> bags = new HashMap<>();
|
||||
if (!Dungeon.LimitedDrops.VELVET_POUCH.dropped()) bags.put(new VelvetPouch(), 1);
|
||||
if (!Dungeon.LimitedDrops.SCROLL_HOLDER.dropped()) bags.put(new ScrollHolder(), 0);
|
||||
if (!Dungeon.LimitedDrops.POTION_BANDOLIER.dropped()) bags.put(new PotionBandolier(), 0);
|
||||
if (!Dungeon.LimitedDrops.MAGICAL_HOLSTER.dropped()) bags.put(new MagicalHolster(), 0);
|
||||
|
||||
if (bags.isEmpty()) return null;
|
||||
|
||||
//count up items in the main bag
|
||||
for (Item item : pack.backpack.items) {
|
||||
for (Bag bag : bags.keySet()){
|
||||
if (bag.canHold(item)){
|
||||
bags.put(bag, bags.get(bag)+1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//find which bag will result in most inventory savings, drop that.
|
||||
Bag bestBag = null;
|
||||
for (Bag bag : bags.keySet()){
|
||||
if (bestBag == null){
|
||||
bestBag = bag;
|
||||
} else if (bags.get(bag) > bags.get(bestBag)){
|
||||
bestBag = bag;
|
||||
}
|
||||
}
|
||||
|
||||
if (bestBag instanceof VelvetPouch){
|
||||
Dungeon.LimitedDrops.VELVET_POUCH.drop();
|
||||
} else if (bestBag instanceof ScrollHolder){
|
||||
Dungeon.LimitedDrops.SCROLL_HOLDER.drop();
|
||||
} else if (bestBag instanceof PotionBandolier){
|
||||
Dungeon.LimitedDrops.POTION_BANDOLIER.drop();
|
||||
} else if (bestBag instanceof MagicalHolster){
|
||||
Dungeon.LimitedDrops.MAGICAL_HOLSTER.drop();
|
||||
}
|
||||
|
||||
return bestBag;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -3,17 +3,14 @@
|
|||
//
|
||||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Nyz;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Honeypot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.MerchantsBeacon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Bomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Firebomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Flashbang;
|
||||
|
@ -22,7 +19,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bombs.HolyBomb;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.Noisemaker;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.bombs.RegrowthBomb;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.GrassKingBooks;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAugmentation;
|
||||
|
@ -131,7 +127,6 @@ public class NyzBombAndBooksRoom extends SpecialRoom {
|
|||
itemsToSpawn2.add (new FrostBomb().quantity(1));
|
||||
itemsToSpawn2.add(new MerchantsBeacon());
|
||||
itemsToSpawn2.add(new GrassKingBooks().quantity(2));
|
||||
itemsToSpawn2.add(new PotionOfHealing());
|
||||
itemsToSpawn2.add(new ScrollOfTransmutation());
|
||||
//itemsToSpawn2.add(new DriedRose());
|
||||
itemsToSpawn2.add(new ScrollOfMagicMapping());
|
||||
|
@ -144,9 +139,7 @@ public class NyzBombAndBooksRoom extends SpecialRoom {
|
|||
} else if (Int == 3) {
|
||||
itemsToSpawn2.add(new Honeypot());
|
||||
}
|
||||
itemsToSpawn2.add(new Ankh());
|
||||
itemsToSpawn2.add(new StoneOfAugmentation());
|
||||
TimekeepersHourglass hourglass = Dungeon.hero.belongings.getItem(TimekeepersHourglass.class);
|
||||
int Int2 = Random.Int(10);
|
||||
if (Int2 == 0) {
|
||||
rare = Generator.random(Generator.Category.WAND);
|
||||
|
|
|
@ -269,7 +269,7 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继
|
|||
ShatteredPixelDungeon.scene().add(new WndOptions(Icons.get(Icons.CHANGES),
|
||||
article.title,
|
||||
article.summary,
|
||||
Messages.get(this, "download")) {
|
||||
Messages.get(this, "download"),Messages.get(this, "stop_download")) {
|
||||
@Override
|
||||
protected void onSelect(int index) {
|
||||
if (index == 0) {
|
||||
|
@ -299,6 +299,8 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继
|
|||
Gdx.app.exit();
|
||||
}
|
||||
|
||||
} else {
|
||||
ShatteredPixelDungeon.switchNoFade(TitleScene.class);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.BruteBot;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Bolas;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Tomahawk;
|
||||
import com.watabou.noosa.TextureFilm;
|
||||
import com.watabou.utils.Callback;
|
||||
|
||||
public class BruteBotSprite extends MobSprite {
|
||||
private Animation cast;
|
||||
|
||||
|
||||
public BruteBotSprite() {
|
||||
super();
|
||||
|
||||
texture( Assets.Sprites.BRUTE );
|
||||
|
||||
TextureFilm frames = new TextureFilm( texture, 12, 16 );
|
||||
|
||||
idle = new Animation( 2, true );
|
||||
idle.frames( frames, 42, 42, 42, 43, 43, 42, 42, 42 );
|
||||
|
||||
run = new Animation( 12, true );
|
||||
run.frames( frames, 45, 46, 47, 48 );
|
||||
|
||||
attack = new Animation( 12, false );
|
||||
attack.frames( frames, 43, 44 );
|
||||
|
||||
die = new Animation( 12, false );
|
||||
die.frames( frames, 49, 50, 51 );
|
||||
|
||||
cast = attack.clone();
|
||||
play( idle );
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void attack( int cell ) {
|
||||
if (!Dungeon.level.adjacent(cell, ch.pos)) {
|
||||
switch (((BruteBot) ch).count){
|
||||
case 1: default:
|
||||
((MissileSprite)parent.recycle( MissileSprite.class )).
|
||||
reset( this, cell, new Bolas(), new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
ch.onAttackComplete();
|
||||
}
|
||||
} );
|
||||
play( cast );
|
||||
turnTo( ch.pos , cell );
|
||||
break;
|
||||
case 2:
|
||||
((MissileSprite)parent.recycle( MissileSprite.class )).
|
||||
reset( this, cell, new Tomahawk(), new Callback() {
|
||||
@Override
|
||||
public void call() {
|
||||
ch.onAttackComplete();
|
||||
}
|
||||
} );
|
||||
play( cast );
|
||||
turnTo( ch.pos , cell );
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
super.attack( cell );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onComplete( Animation anim ) {
|
||||
if (anim == zap) {
|
||||
idle();
|
||||
}
|
||||
super.onComplete( anim );
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.ChangesScene;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.AutoShopRoBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BlueBatSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.BruteBotSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ClearElementalSprites;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdGuardSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdRatSprite;
|
||||
|
@ -30,6 +31,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.MagicGirlSprite;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MolotovHuntsmanSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.MurdererSprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.NxhySprite;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.NyzSprites;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.OGPDNQHZTT;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.RedSwarmSprite;
|
||||
|
@ -52,6 +54,7 @@ import java.util.ArrayList;
|
|||
public class vM0_6_7_X_Changes {
|
||||
|
||||
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
|
||||
add_v0_6_46_Changes(changeInfos);
|
||||
add_v0_6_45_Changes(changeInfos);
|
||||
add_v0_6_44_Changes(changeInfos);
|
||||
add_v0_6_43_Changes(changeInfos);
|
||||
|
@ -100,6 +103,48 @@ public class vM0_6_7_X_Changes {
|
|||
add_v0_6_0_Changes(changeInfos);
|
||||
}
|
||||
|
||||
public static void add_v0_6_46_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
||||
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta3.0", true, "");
|
||||
changes.hardlight(Window.TITLE_COLOR);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes = new ChangeInfo("新内容", false, null);
|
||||
changes.hardlight(Window.GREEN_COLOR);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("新徽章:豺狼的复仇"),
|
||||
("别惹它们,我是说真的-----已逝去的冒险者")));
|
||||
|
||||
changes.addButton(new ChangeButton(new BruteBotSprite(), ("新怪物:重甲豺狼"),
|
||||
("矮人雇佣的高智能豺狼,拿到了以前倒霉的冒险家的装备,是矮人的贴身保镖,拥有高集群化思想,一定小心它们。")));
|
||||
|
||||
changes = new ChangeInfo("平衡", false, null);
|
||||
changes.hardlight(Window.RED_COLOR);
|
||||
changeInfos.add(changes);
|
||||
|
||||
changes.addButton(new ChangeButton(Icons.get(Icons.BADGES), ("徽章改动"),
|
||||
("大症若愚:1500金币改为720金币,并且去除经验药水。\n\n奈亚大亨:金币改为追加320金币,去除经验药水加成。")));
|
||||
|
||||
changes.addButton(new ChangeButton(new NxhySprite(), ("额外商人商品调整"),
|
||||
("除了小恶魔,现在额外商人不再贩卖十字架与治疗药水!")));
|
||||
|
||||
changes.addButton(new ChangeButton(new GhostSprite(), ("幽妹奖励调整"),
|
||||
("现在最高奖励为+4,而不是+5!")));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WRALIPS), ("暗金宝石护符"),
|
||||
("使用的后的冷却时间大幅度提升,并且升级需求调整")));
|
||||
|
||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀"),
|
||||
("调整吸血鬼刀的权重值。")));
|
||||
|
||||
changes.addButton(new ChangeButton(new FireCrystalSprites(), ("圣火魔女"),
|
||||
("圣火魔女即将在主线移除,且现在不再掉落重生十字架。")));
|
||||
|
||||
changes.addButton(new ChangeButton(new PinkLingSprite(), ("0层改动"),
|
||||
("奇迹与魔法都不是免费的,现在0层的额外十字架和刻笔需要购买。")));
|
||||
|
||||
}
|
||||
|
||||
public static void add_v0_6_45_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
||||
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta2.0", true, "");
|
||||
changes.hardlight(Window.TITLE_COLOR);
|
||||
|
|
|
@ -0,0 +1,210 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.services.analytics;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.utils.GameSettings;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
public class Analytics {
|
||||
public static AnalyticsService service;
|
||||
|
||||
public static AnalyticsBelongingsData convertBelongingsToData(Hero hero) {
|
||||
AnalyticsBelongingsData analyticsBelongingsData = new AnalyticsBelongingsData();
|
||||
analyticsBelongingsData.items = new LinkedHashMap();
|
||||
Iterator it = hero.belongings.iterator();
|
||||
while (it.hasNext()) {
|
||||
Weapon weapon = (Item) it.next();
|
||||
if (weapon.visiblyUpgraded() > 22 || !Dungeon.customSeedText.isEmpty()) {
|
||||
analyticsBelongingsData.cheater = true;
|
||||
}
|
||||
if (weapon.isEquipped(hero) || Dungeon.quickslot.contains(weapon)) {
|
||||
boolean z = ((Item) weapon).levelKnown;
|
||||
((Item) weapon).levelKnown = true;
|
||||
analyticsBelongingsData.items.put(weapon.analyticsName(), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
if (weapon instanceof Weapon) {
|
||||
Weapon weapon2 = weapon;
|
||||
Weapon.Enchantment enchantment = weapon2.enchantment;
|
||||
if (enchantment != null) {
|
||||
analyticsBelongingsData.items.put("Enchant: ".concat(enchantment.getClass().getSimpleName()), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
}
|
||||
if (weapon2.augment != null) {
|
||||
if (weapon instanceof SpiritBow) {
|
||||
LinkedHashMap linkedHashMap = analyticsBelongingsData.items;
|
||||
linkedHashMap.put("BowAug: " + weapon2.augment.name(), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
} else {
|
||||
LinkedHashMap linkedHashMap2 = analyticsBelongingsData.items;
|
||||
linkedHashMap2.put("WepAug: " + weapon2.augment.name(), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (weapon instanceof Armor) {
|
||||
Armor armor = (Armor) weapon;
|
||||
Armor.Glyph glyph = armor.glyph;
|
||||
if (glyph != null) {
|
||||
analyticsBelongingsData.items.put("Glyph: ".concat(glyph.getClass().getSimpleName()), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
}
|
||||
if (armor.augment != null) {
|
||||
LinkedHashMap linkedHashMap3 = analyticsBelongingsData.items;
|
||||
linkedHashMap3.put("ArmAug: " + armor.augment.name(), Integer.valueOf(weapon.visiblyUpgraded()));
|
||||
}
|
||||
}
|
||||
((Item) weapon).levelKnown = z;
|
||||
}
|
||||
}
|
||||
return analyticsBelongingsData;
|
||||
}
|
||||
|
||||
public static AnalyticsGameData convertGameToData() {
|
||||
AnalyticsGameData analyticsGameData = new AnalyticsGameData();
|
||||
analyticsGameData.gameVersion = Game.version;
|
||||
analyticsGameData.heroCls = Dungeon.hero.heroClass.name();
|
||||
analyticsGameData.heroSubCls = Dungeon.hero.subClass.name();
|
||||
ArmorAbility armorAbility = Dungeon.hero.armorAbility;
|
||||
if (armorAbility == null) {
|
||||
analyticsGameData.heroArmorAbility = "NONE";
|
||||
} else {
|
||||
analyticsGameData.heroArmorAbility = armorAbility.getClass().getSimpleName();
|
||||
}
|
||||
analyticsGameData.heroLvl = Dungeon.hero.lvl;
|
||||
analyticsGameData.depth = Dungeon.depth;
|
||||
analyticsGameData.deepest = Statistics.deepestFloor;
|
||||
analyticsGameData.ascent = Statistics.highestAscent;
|
||||
analyticsGameData.spawnersAlive = Statistics.spawnersAlive;
|
||||
analyticsGameData.duration = Statistics.duration;
|
||||
analyticsGameData.challengeMask = Dungeon.challenges;
|
||||
Hero hero = Dungeon.hero;
|
||||
analyticsGameData.upgrades = hero.upgrades;
|
||||
analyticsGameData.crafts = hero.crafted;
|
||||
analyticsGameData.talents = new LinkedHashMap();
|
||||
Iterator it = Dungeon.hero.talents.iterator();
|
||||
int i = 0;
|
||||
while (it.hasNext()) {
|
||||
LinkedHashMap linkedHashMap = (LinkedHashMap) it.next();
|
||||
i++;
|
||||
for (Talent talent : linkedHashMap.keySet()) {
|
||||
if (((Integer) linkedHashMap.get(talent)).intValue() > 0 && !Dungeon.hero.metamorphedTalents.containsValue(talent)) {
|
||||
LinkedHashMap linkedHashMap2 = analyticsGameData.talents;
|
||||
linkedHashMap2.put(i + ": " + talent.name(), (Integer) linkedHashMap.get(talent));
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Badges.isUnlocked(Badges.Badge.CHAMPION_3)) {
|
||||
analyticsGameData.bestBossBeaten = "8.6+ Challenges";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.CHAMPION_2)) {
|
||||
analyticsGameData.bestBossBeaten = "7.3+ Challenges";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.CHAMPION_1)) {
|
||||
analyticsGameData.bestBossBeaten = "6.1+ Challenges";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.VICTORY)) {
|
||||
analyticsGameData.bestBossBeaten = "5.Yog-Dzewa";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_4)) {
|
||||
analyticsGameData.bestBossBeaten = "4.King of Dwarves";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_3)) {
|
||||
analyticsGameData.bestBossBeaten = "3.DM-300";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_2)) {
|
||||
analyticsGameData.bestBossBeaten = "2.Tengu";
|
||||
} else if (Badges.isUnlocked(Badges.Badge.BOSS_SLAIN_1)) {
|
||||
analyticsGameData.bestBossBeaten = "1.Goo";
|
||||
} else {
|
||||
analyticsGameData.bestBossBeaten = "0.None";
|
||||
}
|
||||
analyticsGameData.ratMogrifyFound = Badges.isUnlocked(Badges.Badge.FOUND_RATMOGRIFY);
|
||||
if (!Dungeon.customSeedText.isEmpty()) {
|
||||
analyticsGameData.cheater = true;
|
||||
}
|
||||
if (analyticsGameData.heroLvl > 30) {
|
||||
analyticsGameData.cheater = true;
|
||||
}
|
||||
for (Integer num : analyticsGameData.upgrades.values()) {
|
||||
if (num.intValue() > 22) {
|
||||
analyticsGameData.cheater = true;
|
||||
}
|
||||
}
|
||||
return analyticsGameData;
|
||||
}
|
||||
|
||||
public static void disable() {
|
||||
SPDSettings.analytics(false);
|
||||
if (supportsAnalytics()) {
|
||||
service.disable();
|
||||
}
|
||||
}
|
||||
|
||||
public static void enable() {
|
||||
if (supportsAnalytics()) {
|
||||
service.enable();
|
||||
SPDSettings.analytics(true);
|
||||
trackGameSettings();
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean supportsAnalytics() {
|
||||
if (service != null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void trackBossBeaten(Char r3) {
|
||||
if (supportsAnalytics() && SPDSettings.analytics()) {
|
||||
AnalyticsGameData convertGameToData = convertGameToData();
|
||||
AnalyticsBelongingsData convertBelongingsToData = convertBelongingsToData(Dungeon.hero);
|
||||
if (!convertGameToData.cheater && !convertBelongingsToData.cheater) {
|
||||
service.trackBossBeaten(convertGameToData, convertBelongingsToData, r3.getClass().getSimpleName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void trackException(Throwable th) {
|
||||
if (supportsAnalytics() && SPDSettings.analytics()) {
|
||||
service.trackException(th);
|
||||
}
|
||||
}
|
||||
|
||||
public static void trackGameSettings() {
|
||||
String str;
|
||||
if (supportsAnalytics() && SPDSettings.analytics()) {
|
||||
Boolean landscape = SPDSettings.landscape();
|
||||
if (landscape == null) {
|
||||
if (PixelScene.landscape()) {
|
||||
str = "landscape_default";
|
||||
} else {
|
||||
str = "portrait_default";
|
||||
}
|
||||
} else if (landscape.booleanValue()) {
|
||||
str = "landscape_forced";
|
||||
} else {
|
||||
str = "portrait_forced";
|
||||
}
|
||||
service.trackGameSettings(SPDSettings.powerSaver(), SPDSettings.brightness(), SPDSettings.visualGrid(), SPDSettings.toolbarMode(), SPDSettings.flipToolbar(), SPDSettings.flipTags(), SPDSettings.quickSwapper(), GameSettings.getBoolean("system_font", false), str);
|
||||
}
|
||||
}
|
||||
|
||||
public static void trackRunEnd(String str) {
|
||||
if (supportsAnalytics() && SPDSettings.analytics()) {
|
||||
AnalyticsGameData convertGameToData = convertGameToData();
|
||||
if (!convertGameToData.cheater) {
|
||||
service.trackRunEnd(convertGameToData, str);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void trackScreen(String str) {
|
||||
if (supportsAnalytics() && SPDSettings.analytics()) {
|
||||
service.trackScreen(str);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.services.analytics;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
public class AnalyticsBelongingsData {
|
||||
public boolean cheater = false;
|
||||
public LinkedHashMap<String, Integer> items;
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.services.analytics;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
|
||||
public class AnalyticsGameData {
|
||||
public int ascent;
|
||||
public String bestBossBeaten;
|
||||
public int challengeMask;
|
||||
public boolean cheater = false;
|
||||
public LinkedHashMap<Integer, LinkedHashMap<String, Integer>> crafts;
|
||||
public int deepest;
|
||||
public int depth;
|
||||
public float duration;
|
||||
public String gameVersion;
|
||||
public String heroArmorAbility;
|
||||
public String heroCls;
|
||||
public int heroLvl;
|
||||
public String heroSubCls;
|
||||
public boolean ratMogrifyFound;
|
||||
public int spawnersAlive;
|
||||
public LinkedHashMap<String, Integer> talents;
|
||||
public LinkedHashMap<String, Integer> upgrades;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package com.shatteredpixel.shatteredpixeldungeon.services.analytics;
|
||||
|
||||
public abstract class AnalyticsService {
|
||||
public abstract void disable();
|
||||
|
||||
public abstract void enable();
|
||||
|
||||
public abstract void trackBossBeaten(AnalyticsGameData analyticsGameData, AnalyticsBelongingsData analyticsBelongingsData, String str);
|
||||
|
||||
public abstract void trackException(Throwable th);
|
||||
|
||||
public abstract void trackGameSettings(boolean z, int i, int i2, String str, boolean z2, boolean z3, boolean z4, boolean z5, String str2);
|
||||
|
||||
public abstract void trackRunEnd(AnalyticsGameData analyticsGameData, String str);
|
||||
|
||||
public abstract void trackScreen(String str);
|
||||
}
|
Loading…
Reference in New Issue
Block a user