Update V0.6.1.0-Beta5

This commit is contained in:
LingASDJ 2023-04-17 02:05:58 +08:00
parent 77380c90df
commit 1b13a21373
51 changed files with 1131 additions and 568 deletions

1
.gitignore vendored
View File

@ -1,5 +1,6 @@
# Built application files
*.apk
*.smali
# Files for the Dalvik VM
*.dex

View File

@ -17,8 +17,8 @@ allprojects {
appName = 'Magic Ling Pixel Dungeon'
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
appVersionCode =800150
appVersionName = '0.6.1.0-Beta4.986(P3)'
appVersionCode =800850
appVersionName = '0.6.1.0-Beta5(P3)'
appJavaCompatibility = JavaVersion.VERSION_1_8

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 990 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.8 KiB

After

Width:  |  Height:  |  Size: 8.8 KiB

View File

@ -48,7 +48,14 @@ actors.mobs.npcs.autoshoprebot.name=自动食物售货机
actors.buffs.invisibilityring.name=
actors.buffs.invisibilityring.desc=你和周围的地形完全融为一体使你不可能被看到。同时你将每10回合回复1滴血 \n\n当你在虚隐时敌人无法追踪或攻击你。大部分物理攻击和魔法(比如卷轴和法杖)会立即解除虚隐效果。 \n\n剩余的虚隐效果时长%s回合
###LANTERFIRE
actors.buffs.icesworddown.name=刀锋寒冻
actors.buffs.icesworddown.desc=地牢的寒冷已经开始影响到你的武器,现在你的物理伤害会进行一定程度的下降。寒冷值越高,伤害下降越大。\n\n地牢的寒冷是由深处的暗黑能量驱使的随着不断的深入地牢寒冷会越来越刺入骨髓从而造成更加急剧的威胁。要降低寒冷可以寻找篝火房间这里是能Δ缓慢回复温度的区域Δ。当然在后面的探索中你也会寻找到更多降低寒冷的手段。
actors.buffs.icesworddown.ice=\n\n当前玩家物理伤害为_
actors.buffs.nyctophobia.name=光芒前路
actors.buffs.nyctophobia.name2=灯火摇曳
actors.buffs.nyctophobia.name3=微暗寂光

View File

@ -1,5 +1,4 @@
####MLPD-P3文本
items.weapon.melee.sdbsword.name=钻石大剑
items.weapon.melee.sdbsword.desc=钻石制成的奇特大剑,现在它已经给予了足够多的能量,它回到了巅峰时刻\n剑身残留着钻石宝箱王的魔力因此对其他魔力有着莫名的亲和性。相比于其他武器这把武器会随着等级的提升增加更多伤害。\n这把武器攻击速度极慢,但精准极高。\n该武器已经重回巅峰可以发射剑气。
@ -32,6 +31,8 @@ items.wands.hightwand.wandofhighthunderstorm.stats_desc=这支法杖能向任何
items.wands.hightwand.wandofhighthunderstorm.bmage_desc=当_战斗法师_以雷暴之杖近战攻击目标时能像拥有电击附魔一样有概率释放电弧攻击附近的目标同时获得额外的奥术护盾。
items.wands.hightwand.wandofhighthunderstorm.eleblast_desc=雷暴之杖的元素风暴造成15%伤害击晕目标8回合并使水体带电。
###MLPD
items.lightblack.oilpotion.name= 油瓶
items.lightblack.oilpotion.desc=里面蕴含了提灯需要的物质,在提灯熄灭前,它总能重新装填并让提灯重新发光。
@ -143,6 +144,12 @@ items.weapon.melee.endingblade.ac_lastcrystal=Γ激光晶柱Γ
items.weapon.melee.endingblade.ac_diedghost=✦死亡宣告✦
items.weapon.melee.endingblade.ac_healreset=_千里追魂_
items.weapon.melee.washcrime.name=涤罪
items.weapon.melee.washcrime.desc=铁链的末端绑了一把巨镰,上面的Γ血迹Γ已然生锈。\n命中有几率释放✦未安息的亡魂✦助战并给敌人施加✦虚弱✦效果,武器伤害随杀敌数增加,但在一定阈值后停止增加。
items.weapon.melee.washcrime$diedghost.name=未安息的亡魂
items.weapon.melee.washcrime$diedghost.desc=肉身已然逝去,灵魂尚未得到安息,脑海遵照主人的意愿,直到真正的死亡降临。
#MLPDSTOREYBOOKS
items.books.bookslist.hellfirebooks.name=《浊焰事件》

View File

@ -142,8 +142,8 @@ challenges.sbsg_desc=地牢中的神秘魔力让一些生物发生了重大的
challenges.exsg = Π药水癔症Π
challenges.exsg_desc=药水癔症详细规则:\n力量药水--20%概率力量-1\n灵视药剂--50%概率喝后失明5回合\n隐形药剂--30%概率喝后立刻怒吼\n经验药剂--40%概率喝后立刻流血6回合\n极速药剂--50%概率喝后立刻残废8回合\n==========================\n小型口粮 吃后立刻获得极速8回合\n炖肉 吃后立刻升级\n冷冻生肉片 吃后获得奥术护盾\n全肉大饼 吃后立刻获得8回合极速 且+1力量\n不知道何种原因大部分正面药水你都感觉有毒\n部分药水完全处于DeBuff,但食物却会很有用!而且地牢里面还会追加自动售货机,会售卖一些更加高级的东西。
challenges.icedied = Π雪虐风饕Π
challenges.icedied_desc=很显然,地牢的雪越下越大了,在这严寒里面,生存的法则将进一步让我们活得更久。\n-地牢的寒冷值从6层开始将提升20%的寒冷,且篝火房间一旦被激活不再无限变成40回合的燃烧,商人会贩卖更多特殊物品。
challenges.icedied = 雪虐风饕(未完成)
challenges.icedied_desc=很显然,地牢的雪越下越大了,在这严寒里面,生存的法则将进一步让我们活得更久。\n篝火房间一旦被激活不再无限变成40回合的寒冷抑制,商人会贩卖更多特殊物品。
challenges.dhxd =灯火前路
challenges.dhxd_desc= 灯火指引着前进的道路,提灯引路,灯火前行![此为三挑以上的特殊机制,但你也可以直接开启它!]

View File

@ -501,4 +501,7 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x54=-V0.6.1-Beta4.5\n1.修复奈亚
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x55=-V0.6.1-Beta4.9\n1.修复一些小型错误\n2.修复玫瑰秘卷的错误回合
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x58=-V0.6.1-Beta5\n1.修复FlameC02的越界错误\n2.修复浊焰魔女被秒杀的Bug\n3.修复一些细小错误
//ui.changelist.mlpd.vm0_5_x_changes.xxx//

View File

@ -372,7 +372,8 @@ windows.wndstory.sewersboss=森林的底部并不像往常那样只有树根,
#windows.wndstory.prison=多年以前一座地下监狱为了收容危险的犯罪者而建立于此。由于其严格的监管和高安全性,地表各处的囚犯都被带到这里经受时间的折磨。 \n\n但不久之后下方充斥着黑暗的瘴气在这里弥漫开来扭曲了罪犯和狱卒的心智。\n\n监狱里充斥开来的混乱使其彻底失去了秩序于是城市封锁了整个监狱。现今已经没有人知道这些高墙之下经历过无数死亡的生物究竟会是什么样子...\n\n现在这里已经乱套你只能将所有东西全部杀掉。
windows.wndstory.prison=后续场景尚未开发目前暂时为P2的内容。
windows.wndstory.prison=水晶之心所散发出来的寒气结合了地表树木汇集的水汽,化作阵阵飘雪散落在这个古旧的监狱中。\n\n这里相较于地表更为寒冷但还不至于让人瑟瑟发抖。\n\n监狱如今早已没有生命的气息亡灵生物和死灵占据着这个破败的废墟。
windows.wndstory.prisonboss=如果你做了坏事,就会付出与之相匹配的代价。\n\n希望与绝望是一个相对量\n\n这是她曾经对天狗说过的话\n\n\
\n\n\n\n\n\n\
@ -455,3 +456,22 @@ windows.wnddlc.title=娱乐模式
conducts.null=什么都不选择
conducts.bossrush=首领对决
conducts.bossrush_desc=被你击败过多次的首领们熟识了英雄的技能,并掌握了一定的对策。它们盘踞在地牢中,等待复仇的时机。\n-你不知道这次又会有怎样的危机需要应对。\n-但你感觉到这次的冒险绝对与其他时期有所不同。\n-娱乐模式仅可选择一种模式游玩。
windows.wnddlcx.title=难度选择-Beta
difficulty.null=默认难度(一般)
difficulty.easy=简单
difficulty.normal=普通
difficulty.hard=困难
difficulty.impossible=炼狱
difficulty.easy_desc=踏上一次简单的旅行,我们知晓每一次胜利。简单难度调整如下:\n\n-1.所有怪物_攻速降低50%_\n-2.所有怪物_移速降低25%_\n-3.英雄击败怪物的经验将提升_1.5倍_若结果未获得整数则向下取整。\n-4._寒冷值_不再自然降低(未实装)
difficulty.normal_desc=这只是一场普通不能再普通的一场地牢调查。普通难度的所有属性均为默认值。
difficulty.hard_desc=直面地牢,前方只有黑暗,为了胜利,我们必须通过这场试炼。困难难度调整如下:\n\n-1.所有怪物_攻速提升50%_\n-2.所有怪物_移速提升25%_\n-3.英雄击败怪物将只能获得原有基础的_50%经验_,若结果未获得整数则保底获得1经验。\n-4.治疗效果只能获得原有基础上的_50%加成_
difficulty.impossible_desc=魔绫全部内容更新完后,完成至少两个结局后可以开启炼狱难度。

View File

@ -1,5 +1,16 @@
#MLPD
windows.wnddlcx.title=Select Difficulty
difficulty.null=Normal
difficulty.easy=Easy
difficulty.normal=Normal
difficulty.hard=Hard
difficulty.impossible=Impossible
#difficulty.easy_desc=踏上一次简单的旅行,我们知晓每一次胜利。简单难度调整如下:\n\n-1.所有怪物_攻速减少50%_\n-2.所有怪物_移速降低25%_\n-3.所有怪物_闪避下降30%_\n-4.英雄击败怪物将获得_1.5倍经验_\n-5.食物回复饥饿效果提升_1.2倍_\n-6._寒冷值_不再自然降低
#difficulty.normal_desc=但愿这只是一次调查。
#difficulty.hard_desc=前进吧英雄调查地牢的真相。所有怪物血量提升25%。
#difficulty.impossible_desc=魔绫全部内容更新完后,完成至少两个结局后可以开启炼狱难度。
windows.wndsettings$extendtab.quickslots=Quickslots Setting
windows.wndsettings$extendtab.wxts=Tips: Adjust the shortcut bar after entering the game

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

View File

@ -143,7 +143,8 @@ public class Assets {
public static final String TALENT_BUTTON = "interfaces/talent_button.png";
public static final String TALENT_BUTTON_DARK = "interfaces/talent_button_dark.png";
public static final String HERO_ICONS = "interfaces/hero_icons.png";
}
public static final String HAICONS = "interfaces/happymode.png";
}
//these points to resource bundles, not raw asset files
public static class Messages {

View File

@ -1,92 +1,100 @@
package com.shatteredpixel.shatteredpixeldungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.watabou.utils.Bundlable;
import com.watabou.utils.Bundle;
import java.util.ArrayList;
import java.util.Arrays;
//难度系统
public enum Difficulty {
EASY,
MEDIUM,
HARD
// IMPOSSIBLE
public class Difficulty {
public enum DifficultyConduct {
NULL,
EASY(1.2f),
NORMAL(2.5f),
HARD(1.75f);
// IMPOSSIBLE(1.5f);
public float scoreMod;
DifficultyConduct(){
scoreMod = 1f;
}
DifficultyConduct(float scoreMod){
this.scoreMod = scoreMod;
}
{
@Override
public boolean isUnlocked() {
return Badges.isUnlocked(Badges.Badge.VICTORY_ALL_CLASSES);
public String toString() {
return Messages.get(Difficulty.class, this.name());
}
};
public boolean isUnlocked() {
return true;
}
public float mobHealthFactor() {
switch (this) {
case EASY:
return 2/3f;
case MEDIUM: default:
return 1f;
case HARD:
return 1 + 1/3f;
// case IMPOSSIBLE:
// return 2f;
public String desc(){
return Messages.get(Difficulty.class, name() + "_desc");
}
}
public float mobDamageFactor() {
switch (this) {
case EASY:
return 0.5f;
case MEDIUM: default:
return 1f;
case HARD:
return 1.5f;
// case IMPOSSIBLE:
// return 2f;
public static class HardStorage implements Bundlable {
public ArrayList<DifficultyConduct> difficultyConducts;
public HardStorage() {
difficultyConducts = new ArrayList<>();
}
public HardStorage(DifficultyConduct... difficultyConducts) {this.difficultyConducts = new ArrayList<>(Arrays.asList(difficultyConducts));}
public HardStorage(HardStorage storage) {this.difficultyConducts = new ArrayList<>(storage.difficultyConducts);}
@Override
public void storeInBundle(Bundle bundle) {
ArrayList<String> conductIds = new ArrayList<>();
for (DifficultyConduct difficultyConduct : difficultyConducts){
conductIds.add(difficultyConduct.name());
}
bundle.put("difficultyConducts", conductIds.toArray(new String[0]));
}
@Override
public void restoreFromBundle(Bundle bundle) {
difficultyConducts.clear();
if (bundle.getStringArray("difficultyConducts") != null) {
String[] difficultyConductsIds = bundle.getStringArray("difficultyConducts");
for (String conduct : difficultyConductsIds) {
difficultyConducts.add(DifficultyConduct.valueOf(conduct));
}
}
}
public String getDebugString(){
if (difficultyConducts.isEmpty()){
return "NULL";
}
StringBuilder str = new StringBuilder();
for (DifficultyConduct difficultyConduct : difficultyConducts){
str.append(difficultyConduct.name()).append(",");
}
str.delete(str.length() - 1, str.length());
return str.toString();
}
public boolean isConductedAtAll(){
return !difficultyConducts.isEmpty();
}
public boolean oneConduct(){
return difficultyConducts.size() == 1;
}
public boolean isConducted(DifficultyConduct mask){
return isConductedAtAll() && difficultyConducts.contains(mask);
}
public DifficultyConduct getFirst(){
if (isConductedAtAll()) return difficultyConducts.get(0);
return null;
}
}
public float moraleFactor() {
switch (this) {
case EASY:
return 2/3f;
case MEDIUM: default:
return 1f;
case HARD:
return 1 + 1/3f;
// case IMPOSSIBLE:
// return 2f;
}
}
public int degradationAmount() {
switch (this) {
case EASY://Easy = 3 drop in durability per hit (200 hits until break)
return 3;
case MEDIUM: default://Medium = 6 drop in durability per hit (100 hits until break)
return 6;
case HARD://Hard = 12 drop in durability per hit (83 hits until break)
return 12;
// case IMPOSSIBLE:
// return 20;//Impossible = 20 drop in durability per hit (50 hits until break)
}
}
public static Difficulty fromInt(int diff) {
switch (diff) {
case 1:
return EASY;
case 2: default:
return MEDIUM;
case 3:
return HARD;
// case 4:
// return IMPOSSIBLE;
}
}
public String title() {
return Messages.get(Difficulty.class, name());
}
}
}

View File

@ -239,7 +239,13 @@ public class Dungeon {
public static int challenges;
public static Conducts.ConductStorage dlcs;
// public static Conducts.ConductStorage dlcs;
//
// public static Difficulty.HardStorage difficultys;
public static Conducts.ConductStorage dlcs = new Conducts.ConductStorage();
public static Difficulty.HardStorage difficultys = new Difficulty.HardStorage();
public static int mobsToChampion;
public static int mobsToStateLing;
@ -265,8 +271,12 @@ public class Dungeon {
version = Game.versionCode;
challenges = SPDSettings.challenges();
//娱乐模式
dlcs = new Conducts.ConductStorage(SPDSettings.dlc());
//难度模式
difficultys = new Difficulty.HardStorage(SPDSettings.difficulty());
mobsToChampion = -1;
mobsToStateLing = -1;
@ -336,6 +346,10 @@ public class Dungeon {
return dlcs.isConducted(mask);
}
public static boolean isDIFFICULTY(Difficulty.DifficultyConduct mask ) {
return difficultys.isConducted(mask);
}
public static Level newLevel() {
Dungeon.level = null;
@ -692,6 +706,8 @@ public class Dungeon {
private static final String SEED = "seed";
private static final String CHALLENGES = "challenges";
private static final String DLCS = "dlcs";
private static final String DIFFICULTY = "difficulty";
private static final String MOBS_TO_CHAMPION = "mobs_to_champion";
private static final String HERO = "hero";
private static final String DEPTH = "depth";
@ -715,7 +731,15 @@ public class Dungeon {
bundle.put( VERSION, version );
bundle.put( SEED, seed );
bundle.put( CHALLENGES, challenges );
// //娱乐模式
bundle.put( DLCS,dlcs);
dlcs.storeInBundle(bundle);
difficultys.storeInBundle(bundle);
// //难度选择
bundle.put(DIFFICULTY, difficultys );
bundle.put( MOBS_TO_CHAMPION, mobsToChampion );
bundle.put( MOBS_TO_STATELING, mobsToStateLing );
@ -794,7 +818,7 @@ public class Dungeon {
saveGame( GamesInProgress.curSlot );
saveLevel( GamesInProgress.curSlot );
GamesInProgress.set( GamesInProgress.curSlot, depth, challenges, hero );
GamesInProgress.set( GamesInProgress.curSlot, depth, challenges, hero,dlcs,difficultys );
}
}
@ -818,7 +842,9 @@ public class Dungeon {
QuickSlotButton.reset();
Dungeon.challenges = bundle.getInt( CHALLENGES );
dlcs.restoreFromBundle(bundle);
difficultys.restoreFromBundle(bundle);
Dungeon.mobsToChampion = bundle.getInt( MOBS_TO_CHAMPION );
Dungeon.mobsToStateLing = bundle.getInt( MOBS_TO_STATELING );
@ -946,6 +972,12 @@ public class Dungeon {
info.version = bundle.getInt( VERSION );
info.challenges = bundle.getInt( CHALLENGES );
info.dlcs = new Conducts.ConductStorage();
info.dlcs.restoreFromBundle(bundle);
info.difficulty = new Difficulty.HardStorage();
info.difficulty.restoreFromBundle(bundle);
Hero.preview( info, bundle.getBundle( HERO ) );
Statistics.preview( info, bundle );
}

View File

@ -122,13 +122,17 @@ public class GamesInProgress {
}
public static void set(int slot, int depth, int challenges,
Hero hero) {
Hero hero,Conducts.ConductStorage dlcs,Difficulty.HardStorage difficulty) {
Info info = new Info();
info.slot = slot;
info.depth = depth;
info.challenges = challenges;
info.dlcs = dlcs;
info.difficulty= difficulty;
info.seed = Dungeon.seed;
info.customSeed = Dungeon.customSeedText;
@ -171,6 +175,11 @@ public class GamesInProgress {
public int depth;
public int version;
public int challenges;
public Conducts.ConductStorage dlcs;
public Difficulty.HardStorage difficulty;
public int icehp;
public String name;
public int level;

View File

@ -209,7 +209,7 @@ public class SPDSettings extends GameSettings {
//Interface
public static final String KEY_ONE_CONDUCT = "one_conduct";
public static final String KEY_FPSLIMIT = "fpslimit";
public static final String KEY_TWO_CONDUCT = "two_conduct";
public static final String KEY_UI_SIZE = "full_ui";
public static final String KEY_QUICKSLOTS = "quickslots";
@ -262,6 +262,7 @@ public class SPDSettings extends GameSettings {
public static final String KEY_CHALLENGES = "challenges";
public static final String KEY_DLC = "dlc";
public static final String KEY_DIFFICULTY = "difficulty";
public static final String KEY_INTRO = "intro";
@ -287,10 +288,23 @@ public class SPDSettings extends GameSettings {
return getInt( KEY_CHALLENGES, 0, 0, Challenges.MAX_VALUE );
}
//DLC SYSTEM
public static void dlc( Conducts.ConductStorage value ) {
put( KEY_DLC, value);
}
public static Conducts.ConductStorage dlc() {
return getBundlable(KEY_DLC, new Conducts.ConductStorage());
}
//HARD SYSTEM
public static Difficulty.HardStorage difficulty() {
return getCundlable(KEY_DIFFICULTY, new Difficulty.HardStorage());
}
public static void difficulty(Difficulty.HardStorage value ) {
cut( KEY_DIFFICULTY, value);
}
private static final String BUNDLABLE="b";
@ -302,24 +316,33 @@ public class SPDSettings extends GameSettings {
return defValue;
}
}
private static final String CUNDLABLE="c";
public static <T extends Bundlable> T getCundlable(String key, T defValue){
try {
Bundle b = Bundle.fromString(getString(key,""));
return (T)b.get(CUNDLABLE);
} catch (Exception e) {
return defValue;
}
}
public static void put( String key, Bundlable value ) {
Bundle b = new Bundle();
b.put(BUNDLABLE,value);
put(key,b.toString());
}
public static Conducts.ConductStorage dlc() {
return getBundlable(KEY_DLC, new Conducts.ConductStorage());
public static void cut( String key, Bundlable value ) {
Bundle b = new Bundle();
b.put(CUNDLABLE,value);
put(key,b.toString());
}
public static boolean twoConduct() {return getBoolean(KEY_TWO_CONDUCT, true);}
public static boolean oneConduct() {return getBoolean(KEY_ONE_CONDUCT, true);}
public static void oneConduct(boolean value){
put(KEY_ONE_CONDUCT, value);
}
public static void supportNagged( boolean value ) {
put( KEY_SUPPORT_NAGGED, value );
}

View File

@ -21,6 +21,8 @@
package com.shatteredpixel.shatteredpixeldungeon.actors;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Electricity;
@ -54,6 +56,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Haste;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HasteLing;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hex;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Hunger;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.IceSwordDown;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LifeLink;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LostInventory;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicGirlDebuff.MagicGirlSayKill;
@ -80,6 +83,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.rogue.DeathMark;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.warrior.Endure;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Elemental;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.AntiMagic;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.glyphs.Potential;
@ -99,6 +103,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Grim;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.darts.ShockingDart;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Chasm;
import com.shatteredpixel.shatteredpixeldungeon.levels.features.Door;
@ -108,6 +113,7 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.BArray;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.Game;
import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundlable;
import com.watabou.utils.Bundle;
@ -188,7 +194,7 @@ public abstract class Char extends Actor {
return true;
} else if (c instanceof Hero
&& alignment == Alignment.ALLY
&& Dungeon.level.distance(pos, c.pos) <= 2*Dungeon.hero.pointsInTalent(Talent.ALLY_WARP)){
&& Dungeon.level.distance(pos, c.pos) <= 2* hero.pointsInTalent(Talent.ALLY_WARP)){
return true;
} else {
return false;
@ -213,7 +219,7 @@ public abstract class Char extends Actor {
int curPos = pos;
//warp instantly with allies in this case
if (c == Dungeon.hero && Dungeon.hero.hasTalent(Talent.ALLY_WARP)){
if (c == hero && hero.hasTalent(Talent.ALLY_WARP)){
PathFinder.buildDistanceMap(c.pos, BArray.or(Dungeon.level.passable, Dungeon.level.avoid, null));
if (PathFinder.distance[pos] == Integer.MAX_VALUE){
return true;
@ -237,12 +243,12 @@ public abstract class Char extends Actor {
c.spend( 1 / c.speed() );
if (c == Dungeon.hero){
if (Dungeon.hero.subClass == HeroSubClass.FREERUNNER){
Buff.affect(Dungeon.hero, Momentum.class).gainStack();
if (c == hero){
if (hero.subClass == HeroSubClass.FREERUNNER){
Buff.affect(hero, Momentum.class).gainStack();
}
Dungeon.hero.busy();
hero.busy();
}
return true;
@ -292,6 +298,25 @@ public abstract class Char extends Actor {
HP = Math.min(HP, HT);
}
public static <T extends Mob> T create(Class<T> type) {
T mob;
try {
mob = type.newInstance();
} catch (InstantiationException | IllegalAccessException e) {
Game.reportException(e);
throw new RuntimeException(e.getCause());
}
mob.onCreate();
mob.updateHT(true);
return mob;
}
public static <T extends Mob> T create(Class<T> type, Level level) {
return create(type);
}
protected void onCreate() {};
@Override
public void storeInBundle( Bundle bundle ) {
@ -362,8 +387,8 @@ public abstract class Char extends Actor {
Preparation prep = buff(Preparation.class);
if (prep != null){
dmg = prep.damageRoll(this);
if (this == Dungeon.hero && Dungeon.hero.hasTalent(Talent.BOUNTY_HUNTER)) {
Buff.affect(Dungeon.hero, Talent.BountyHunterTracker.class, 0.0f);
if (this == hero && hero.hasTalent(Talent.BOUNTY_HUNTER)) {
Buff.affect(hero, Talent.BountyHunterTracker.class, 0.0f);
}
} else {
dmg = damageRoll();
@ -442,16 +467,16 @@ public abstract class Char extends Actor {
enemy.sprite.flash();
if (!enemy.isAlive() && visibleFight) {
if (enemy == Dungeon.hero) {
if (enemy == hero) {
if (this == Dungeon.hero) {
if (this == hero) {
return true;
}
Dungeon.fail( getClass() );
GLog.n( Messages.capitalize(Messages.get(Char.class, "kill", name())) );
} else if (this == Dungeon.hero) {
} else if (this == hero) {
GLog.i( Messages.capitalize(Messages.get(Char.class, "defeat", enemy.name())) );
}
}
@ -551,6 +576,11 @@ public abstract class Char extends Actor {
damage *= 2f;
}
if ( buff(IceSwordDown.class) != null ){
//0.2+20x0.005=0.2+100
damage *= 1-(0.2f+(hero.icehp*0.005f));
}
for (ChampionEnemy buff : buffs(ChampionEnemy.class)){
damage *= buff.meleeDamageFactor();
buff.onAttackProc( enemy );
@ -581,6 +611,10 @@ public abstract class Char extends Actor {
speed *= buff.speedFactor();
}
for (HasteLing.MobLing mobspeed : buffs(HasteLing.MobLing.class)){
speed *= mobspeed.speedFactor();
}
return speed;
}
@ -893,7 +927,7 @@ public abstract class Char extends Actor {
pos = step;
if (this != Dungeon.hero) {
if (this != hero) {
sprite.visible = Dungeon.level.heroFOV[pos];
}

View File

@ -1,4 +1,30 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.Difficulty;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
public class HasteLing extends Haste{
//难度系统 敌人移速
public static class MobLing extends Haste{
@Override
public int icon() {
return BuffIndicator.NONE;
}
public float speedFactor(){
if (Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.EASY)) {
return 0.7f;
} else if (Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.NORMAL)) {
return 1f;
} else if (Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.HARD)) {
return 1.15f;
} else {
return 1f;
}
}
}
}

View File

@ -21,6 +21,8 @@
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.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -45,7 +47,7 @@ public class Healing extends Buff {
@Override
public boolean act(){
target.HP = Math.min(target.HT, target.HP + healingThisTick());
if (target.HP == target.HT && target instanceof Hero){
@ -70,9 +72,15 @@ public class Healing extends Buff {
}
public void setHeal(int amount, float percentPerTick, int flatPerTick){
healingLeft = amount;
percentHealPerTick = percentPerTick;
flatHealPerTick = flatPerTick;
if (Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.HARD)) {
healingLeft = amount/2;
percentHealPerTick = percentPerTick/2;
flatHealPerTick = flatPerTick/2;
} else {
healingLeft = amount;
percentHealPerTick = percentPerTick;
flatHealPerTick = flatPerTick;
}
}
public void increaseHeal( int amount ){

View File

@ -68,7 +68,7 @@ public class Hunger extends Buff implements Hero.Doom {
if (Dungeon.level.locked
|| target.buff(WellFed.class) != null
|| target.buff(ScrollOfChallenge.ChallengeArena.class) != null|| Dungeon.depth == 0){
|| target.buff(ScrollOfChallenge.ChallengeArena.class) != null || Dungeon.depth == 0){
spend(STEP);
return true;
}

View File

@ -0,0 +1,95 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.noosa.Image;
import com.watabou.utils.Bundle;
public class IceHealHP extends Buff {
{
type = buffType.POSITIVE;
}
public static int level = 0;
private int interval = 1;
@Override
public boolean act() {
if (target.isAlive()) {
spend(interval);
if (level <= 0) {
detach();
}
}
return true;
}
public int level() {
return level;
}
public void set( int value, int time ) {
//decide whether to override, preferring high value + low interval
if (Math.sqrt(interval)*level <= Math.sqrt(time)*value) {
level = value;
interval = time;
spend(time - cooldown() - 1);
}
}
@Override
public float iconFadePercent() {
if (target instanceof Hero){
float max = ((Hero) target).lvl;
return Math.max(0, (max-level)/max);
}
return 0;
}
@Override
public String toString() {
return Messages.get(this, "name");
}
@Override
public String desc() {
return Messages.get(this, "desc", level, dispTurns(visualcooldown()));
}
private static final String LEVEL = "level";
private static final String INTERVAL = "interval";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( INTERVAL, interval );
bundle.put( LEVEL, level );
}
@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
interval = bundle.getInt( INTERVAL );
level = bundle.getInt( LEVEL );
}
@Override
public void tintIcon(Image icon) {
icon.hardlight(0x808080);
}
@Override
public int icon() {
return BuffIndicator.NONE;
}
}

View File

@ -1,5 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@ -12,33 +14,48 @@ public class IceHpBuff extends Buff implements Hero.Doom {
private static final String LEVEL = "level";
private static final String PARTIALDAMAGE = "partialDamage";
private static final float STEP = 100.0f;
private static final float STEP = 50.0f;
private float level;
private float partialDamage;
@Override
public boolean act() {
//第一阶段 刀锋寒冻(Thanks:二月)
if(hero.icehp>=15){
Buff.affect(hero, IceSwordDown.class).set( (100), 1 );
} else {
Buff.detach( hero, IceSwordDown.class );
}
if (Dungeon.depth <= 5) {
spend(STEP);
return true;
} else if (Dungeon.level.locked || this.target.buff(LighS.class) != null) {
} else if (Dungeon.level.locked || this.target.buff(IceHealHP.class) != null) {
hero.healIcehp(1);
spend(STEP);
return true;
//燃起来了
}else if(this.target.buff(HalomethaneBurning.class) != null || this.target.buff(Burning.class) != null){
hero.healIcehp(1);
spend(25f);
return true;
} else {
Hero hero = (Hero) this.target;
if (!this.target.isAlive()) {
diactivate();
return true;
}
if (hero.lanterfire > 30) {
hero.damageLantern(1);
if (hero.icehp < 25) {
hero.damageIcehp(1);
spend(17f-(float) Dungeon.depth/5);
} else {
spend(STEP);
}
return true;
}
}
@Override

View File

@ -0,0 +1,88 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.buffs;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.watabou.utils.Bundle;
public class IceSwordDown extends Buff {
{
type = buffType.POSITIVE;
}
public static int level = 0;
private int interval = 1;
@Override
public boolean act() {
if (target.isAlive()) {
spend(interval);
if (level <= 0) {
detach();
}
}
return true;
}
public int level() {
return level;
}
public void set( int value, int time ) {
//decide whether to override, preferring high value + low interval
if (Math.sqrt(interval)*level <= Math.sqrt(time)*value) {
level = value;
interval = time;
spend(time - cooldown() - 1);
}
}
@Override
public float iconFadePercent() {
if (target instanceof Hero){
float max = ((Hero) target).lvl;
return Math.max(0, (max-level)/max);
}
return 0;
}
@Override
public String toString() {
return Messages.get(this, "name");
}
@Override
public String desc() {
return Messages.get(this, "desc")+Messages.get(this, "ice")+(1-(0.2f+(hero.icehp*0.005f)))*100+"%_";
}
private static final String LEVEL = "level";
private static final String INTERVAL = "interval";
@Override
public void storeInBundle( Bundle bundle ) {
super.storeInBundle( bundle );
bundle.put( INTERVAL, interval );
bundle.put( LEVEL, level );
}
@Override
public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle( bundle );
interval = bundle.getInt( INTERVAL );
level = bundle.getInt( LEVEL );
}
@Override
public int icon() {
return BuffIndicator.ICE_SWORDDOWN;
}
}

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.hero;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.AQUAPHOBIA;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.DHXD;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO;
import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.HARD;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.HelpSettings;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive;
@ -1759,8 +1760,10 @@ public class Hero extends Char {
}
public void earnExp( int exp, Class source ) {
this.exp += exp;
//保底经验获取 难度系统
this.exp += Dungeon.isDIFFICULTY(HARD) ? (exp==0 ? exp+1 : exp) : exp;
float percent = exp/(float)maxExp();
EtherealChains.chainsRecharge chains = buff(EtherealChains.chainsRecharge.class);
@ -2707,13 +2710,15 @@ public class Hero extends Char {
//TODO 寒冰值系统
public void damageIcehp(int value){
icehp -= value;
hero.sprite.showStatus(0x009999, String.valueOf(value));
icehp += value;
hero.sprite.showStatus(0x009999, String.valueOf("-"+value));
}
public void healIcehp(int value){
icehp = Math.min(lanterfire+value,100);
hero.sprite.showStatus(0x00ffff, String.valueOf(value));
if(icehp > 0) {
icehp -= value;
}
hero.sprite.showStatus(0x00ffff, String.valueOf("+"+value));
}
}

View File

@ -53,9 +53,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.KingsCrown;
import com.shatteredpixel.shatteredpixeldungeon.items.TengusMask;
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;
@ -125,6 +125,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.RedBloodMoon;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SDBSword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SkyShield;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WarHammer;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WashCrime;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingKnife;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingStone;
@ -186,6 +187,8 @@ public enum HeroClass {
new Gauntlet().quantity(1).identify().collect();
new WashCrime().quantity(1).identify().collect();
new Cake().quantity(100).identify().collect();
new TengusMask().quantity(1).identify().collect();
new KingsCrown().quantity(1).identify().collect();
@ -193,7 +196,7 @@ public enum HeroClass {
new ScrollOfTransmutation().quantity(45).identify().collect();
new BeaconOfReturning().quantity(11).identify().collect();
new WarHammer().quantity(1).identify().collect();
new ChaliceOfBlood().quantity(1).identify().collect();
new EtherealChains().quantity(1).identify().collect();
new Firebloom.Seed().quantity(50).identify().collect();
new Blindweed.Seed().quantity(50).identify().collect();
new StoneOfFlock().quantity(50).identify().collect();

View File

@ -366,14 +366,14 @@ public class DimandKing extends Boss {
}
new Flare(5, 32).color(0xFF6060, false).show(sprite, 1.5f);
yell(Messages.get(this,"buff_all"));
doYogLasers();
//doYogLasers();
}
private void sacrificeSubject(){
Buff.affect(this, SacrificeSubjectListener.class, 3f);
new Flare(6, 32).color(0xFF22FF, false).show(sprite, 1.5f);
yell(Messages.get(this, "sacrifice"));
doYogLasers();
//doYogLasers();
}
private void deathRattleSubject(){
@ -391,7 +391,7 @@ public class DimandKing extends Boss {
}
new Flare(7, 32).color(0x303030, false).show(sprite, 1.5f);
yell(Messages.get(this,"death_rattle"));
doYogLasers();
//doYogLasers();
}
private void extraSummonSubject(){
@ -400,7 +400,7 @@ public class DimandKing extends Boss {
summonSubject(3);
summonsMade++;
yell(Messages.get(this, "more_summon"));
doYogLasers();
//doYogLasers();
new Flare(4, 32).color(0x4040FF, false).show(sprite, 1.5f);
}
@ -872,18 +872,18 @@ public class DimandKing extends Boss {
summonSubject(2, DKGhoul.class);
summonSubject(3, DKGhoul.class);
++wave;
doYogLasers();
//doYogLasers();
spend(TICK*9);
}else if(wave == 1){
summonSubject(1, DKGhoul.class);
summonSubject(5, DKMonk.class);
++wave;
doYogLasers();
//doYogLasers();
spend(TICK*12);
}else if(wave == 2){
summonSubject(1, DKGhoul.class);
summonSubject(2, DKWarlock.class);
doYogLasers();
//doYogLasers();
summonSubject(6, DKGhoul.class);
summonSubject(6, DKGhoul.class);
++wave;
@ -896,7 +896,7 @@ public class DimandKing extends Boss {
summonSubject(11, DKMonk.class);
summonSubject(5, OGPDZSLS.class);
summonSubject(7, SRPDHBLR.class);
doYogLasers();
//doYogLasers();
++wave;
spend(TICK*15);
}else if(wave == 4){
@ -906,7 +906,7 @@ public class DimandKing extends Boss {
summonSubject(2, DKGhoul.class);
summonSubject(5, OGPDZSLS.class);
summonSubject(7, SRPDHBLR.class);
doYogLasers();
//doYogLasers();
summonSubject(5, DM100.class);
++wave;
spend(TICK*14);
@ -918,7 +918,7 @@ public class DimandKing extends Boss {
summonSubject(8, DKMonk.class);
summonSubject(2, DKGhoul.class);
summonSubject(5, OGPDZSLS.class);
doYogLasers();
//doYogLasers();
summonSubject(7, SRPDHBLR.class);
summonSubject(5, DM100.class);
++wave;
@ -928,7 +928,7 @@ public class DimandKing extends Boss {
summonSubject(3, DKMonk.class);
summonSubject(3, DKMonk.class);
summonSubject(3, DKWarlock.class);
doYogLasers();
//doYogLasers();
summonSubject(2, DKGhoul.class);
summonSubject(5, OGPDZSLS.class);
summonSubject(7, SRPDHBLR.class);
@ -937,11 +937,10 @@ public class DimandKing extends Boss {
summonSubject(5, DM200.class);
summonSubject(5, Skeleton.class);
summonSubject(5, Necromancer.class);
summonSubject(5, RedNecromancer.class);
++wave;
spend(TICK*12);
}else{
doYogLasers();
//doYogLasers();
//only need to kill one.
summonSubject(3, DKWarlock.class);
spend(TICK);

View File

@ -31,19 +31,21 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.HalomethaneFire;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Charm;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HalomethaneBurning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfAggression;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.FlameC01Sprite;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.tweeners.AlphaTweener;
import com.watabou.utils.Bundle;
import com.watabou.utils.Callback;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
@ -51,7 +53,7 @@ import java.util.HashSet;
public class FlameC01 extends Mob {
private static final float TIME_TO_BURN = 1f;
private static final float TIME_TO_BURN = 3f;
public int gasTankPressure;
@ -59,7 +61,6 @@ public class FlameC01 extends Mob {
private HashSet<Integer> affectedCells;
//the cells to trace fire shots to, for visual effects.
private HashSet<Integer> visualCells;
private int direction = 0;
public void spawnAround( int pos ) {
for (int n : PathFinder.NEIGHBOURS4) {
@ -70,17 +71,13 @@ public class FlameC01 extends Mob {
}
}
}
private int summonCooldown = 10;
private int delay = 0;
private static final float SPAWN_DELAY = 2f;
public static FlameC01 spawnAt(int pos ) {
if (!Dungeon.level.solid[pos] && Actor.findChar( pos ) == null) {
FlameC01 w = new FlameC01();
w.adjustStats( Dungeon.depth );
w.adjustStats();
w.pos = pos;
w.state = w.HUNTING;
GameScene.add( w, SPAWN_DELAY );
@ -96,9 +93,7 @@ public class FlameC01 extends Mob {
}
}
private int level;
public void adjustStats( int level ) {
this.level = level;
public void adjustStats() {
defenseSkill = attackSkill( null ) * 5;
enemySeen = true;
}
@ -262,15 +257,11 @@ public class FlameC01 extends Mob {
public void shoot(Char ch, int pos){
final Ballistica shot = new Ballistica( ch.pos, pos, Ballistica.PROJECTILE);
fx(shot, new Callback() {
@Override
public void call() {
onZap(shot);
}
}, ch);
fx(shot, ch);
}
ConeAOE cone;
protected void fx(Ballistica bolt, Callback callback, Char ch ) {
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<>();
@ -280,70 +271,33 @@ public class FlameC01 extends Mob {
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[left(direction)], strength - 1);
spreadFlames(c + PathFinder.CIRCLE8[direction], strength - 1);
spreadFlames(c + PathFinder.CIRCLE8[right(direction)], strength - 1);
} else {
visualCells.add(c);
}
}
cone = new ConeAOE( bolt,
maxDist,
80 + 40,Ballistica.MAGIC_BOLT);
//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.
for (Ballistica ray : cone.rays){
((MagicMissile)ch.sprite.parent.recycle( MagicMissile.class )).reset(
MagicMissile.FIRE,
MagicMissile.HALOFIRE,
ch.sprite,
cell,
ray.path.get(ray.dist),
null
);
}
MagicMissile.boltFromChar( ch.sprite.parent,
MagicMissile.FIRE,
ch.sprite,
bolt.path.get(dist/2),
callback );
Buff.affect( enemy, HalomethaneBurning.class ).reignite( enemy, 7f );
//GameScene.add( Blob.seed( target.pos, 7, HalomethaneFire.class ) );
if(Dungeon.level.heroFOV[bolt.sourcePos] || Dungeon.level.heroFOV[bolt.collisionPos]){
Sample.INSTANCE.play( Assets.Sounds.ZAP );
}
}
//burn... BURNNNNN!.....
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[left(direction)], strength - 1.5f);
spreadFlames(cell + PathFinder.NEIGHBOURS9[direction], strength - 1.5f);
spreadFlames(cell + PathFinder.CIRCLE8[right(direction)], strength - 1.5f);
} else {
visualCells.add(cell);
}
} else if (!Dungeon.level.passable[cell])
visualCells.add(cell);
}
private int left(int direction){
return direction == 0 ? 3 : direction-1;
}
private int right(int direction){
return direction == 3 ? 0 : direction+1;
}
protected void onZap( Ballistica bolt ) {
for( int cell : affectedCells){
@ -354,10 +308,7 @@ public class FlameC01 extends Mob {
}
//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, HalomethaneFire.class ) );
}
GameScene.add( Blob.seed( cell, 1+2, HalomethaneFire.class ) );
}
}

View File

@ -22,13 +22,16 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.DHXD;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.SBSG;
import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.EASY;
import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.HARD;
import static com.shatteredpixel.shatteredpixeldungeon.Difficulty.DifficultyConduct.NORMAL;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.BGMPlayer;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Difficulty;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
@ -96,16 +99,25 @@ public abstract class Mob extends Char {
}
public ArrayList<Item> items;
//TODO LIST
@Override
public void updateHT(boolean boostHP) {
// HP = HT = (int) (normalHP(level) * healthFactor);
// HP = HT *= Dungeon.difficulty.mobHealthFactor() * CustomGame.Modifier.MOB_HP_FACTOR.getLocal();
// //Bosses (obviously) have higher HP
if (properties().contains(Property.BOSS)) {
HP = HT *= 5;
} else if (properties().contains(Property.MINIBOSS)) {
HP = HT *= 2;
if(Dungeon.isDIFFICULTY(EASY)){
HP = HT = (int) (0.8f * HP);
} else if(Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.NORMAL)){
HP=HT *= 1f;
} else if(Dungeon.isDIFFICULTY(HARD)){
HP=HT *= 1.25f;
if (properties().contains(Property.BOSS)) {
HP = HT *= 5f;
} else if (properties().contains(Property.MINIBOSS)) {
HP = HT *= 2f;
}
} else {
HP=HT *= 1f;
}
super.updateHT(boostHP);
}
@ -242,6 +254,8 @@ public abstract class Mob extends Char {
if (buff(Terror.class) != null || buff(Dread.class) != null ){
state = FLEEING;
}
enemy = chooseEnemy();
@ -592,6 +606,19 @@ public abstract class Mob extends Char {
public float attackDelay() {
float delay = 1f;
if ( buff(Adrenaline.class) != null) delay /= 1.5f;
//难度系统 敌人攻速
if(Dungeon.isDIFFICULTY(EASY)){
delay = 1.5f;
} else if(Dungeon.isDIFFICULTY(NORMAL)){
delay = 1f;
} else if(Dungeon.isDIFFICULTY(HARD)){
delay /= 1.5f;
} else{
delay = 1f;
}
return super.attackDelay()*(delay);
}
@ -600,8 +627,8 @@ public abstract class Mob extends Char {
if(Dungeon.isChallenged(DHXD)){
damageAttackProcLanterMob();
}
return super.attackProc(enemy,
(int) (damage*(Dungeon.isChallenged(SBSG) ? (0.6f * scaleFactor) : 1)));
return super.attackProc(enemy, damage);
}
//写在Mob主类从而方便后续维护
@ -665,10 +692,25 @@ public abstract class Mob extends Char {
@Override
public int defenseSkill( Char enemy ) {
if ( !surprisedBy(enemy)
float modifier =1f;
boolean seen = (enemySeen && enemy.invisible == 0);
//难度系统-闪避
if(Dungeon.isDIFFICULTY(EASY)){
modifier *= 0.7f;
} else if(Dungeon.isDIFFICULTY(NORMAL)){
modifier *= 1f;
} else if(Dungeon.isDIFFICULTY(HARD)){
modifier *= 1.3f;
} else {
modifier *= 1f;
}
if (enemy == Dungeon.hero && !Dungeon.hero.canSurpriseAttack()) seen = true;
if ( seen
&& paralysed == 0
&& !(alignment == Alignment.ALLY && enemy == hero)) {
return (int) (this.defenseSkill/(Dungeon.isChallenged(SBSG) ? (0.4f * scaleFactor) : 1));
&& !(alignment == Alignment.ALLY && enemy == Dungeon.hero)) {
return Math.round(this.defenseSkill * modifier);
} else {
return 0;
}
@ -779,8 +821,21 @@ public abstract class Mob extends Char {
Statistics.qualifiedForNoKilling = false;
int exp = Dungeon.hero.lvl <= maxLvl ? EXP : 0;
//难度系统 英雄获得的经验
if (exp > 0) {
Dungeon.hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "exp", exp));
if(Dungeon.isDIFFICULTY(EASY)){
exp *= 1.5f;
} else if(Dungeon.isDIFFICULTY(Difficulty.DifficultyConduct.NORMAL)){
exp *= 1f;
} else if(Dungeon.isDIFFICULTY(HARD)){
exp *= 0.5f;
} else {
exp *= 1f;
}
//保底经验
Dungeon.hero.sprite.showStatus(CharSprite.POSITIVE, Messages.get(this, "exp",
Dungeon.isDIFFICULTY(HARD) ? (exp==0 ? exp+1 : exp) : exp));
}
Dungeon.hero.earnExp(exp, getClass());
}

View File

@ -370,6 +370,11 @@ public class DMZERO extends Mob
buff.detach();
}
}
for (Buff buff : hero.buffs()) {
if (buff instanceof RandomBuff.DiedBuff) {
buff.detach();
}
}
Statistics.amuletObtained = true;
obj = new NullDiedTO();
((NullDiedTO) obj).pos = pos;

View File

@ -40,7 +40,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Monk;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Necromancer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDZSLS;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedMurderer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedNecromancer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.SRPDHBLR;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Skeleton;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Tengu;
@ -1388,7 +1387,7 @@ public class DwarfMaster extends Boss {
summonSubject(5, DM200.class);
summonSubject(3, Skeleton.class);
summonSubject(3, Necromancer.class);
summonSubject(3, RedNecromancer.class);
//summonSubject(3, RedNecromancer.class);
Buff.affect(this, RoseShiled.class, 20f);
Buff.affect(this, Haste.class, 5f);
Buff.affect(this, ArcaneArmor.class).set(Dungeon.hero.lvl + 10, 10);

View File

@ -325,6 +325,12 @@ public class FireMagicDied extends Mob implements Callback {
@Override
public boolean act() {
//热修复处理
if (Dungeon.hero.buff(LockedFloor.class) != null){
die(true);
}
if (phase == 1 && HP <= 350) {
//actScanning();
if (Dungeon.level.water[pos] && HP < HT) {
@ -563,7 +569,7 @@ public class FireMagicDied extends Mob implements Callback {
}
zap();
} else {
//doYogLasers();
////doYogLasers();
if (Random.Int( 3 ) == 0) {
Buff.affect( hero, HalomethaneBurning.class ).reignite( hero, 24f );
enemy.sprite.burst( 0x000000, 5 );
@ -672,7 +678,7 @@ public class FireMagicDied extends Mob implements Callback {
}
//properties.add(Property.IMMOVABLE);
ScrollOfTeleportation.appear(this, ShopBossLevel.throneling);
//doYogLasers();
////doYogLasers();
sprite.centerEmitter().start( Speck.factory( Speck.SCREAM ), 0.4f, 2 );
Sample.INSTANCE.play( Assets.Sounds.CHALLENGE );
phase = 2;
@ -935,6 +941,7 @@ public class FireMagicDied extends Mob implements Callback {
@Override
public boolean act() {
delay--;
if (delay <= 0){
if (summon == FireMagicDied.ColdGuradA.class){

View File

@ -1,6 +1,13 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.IceHealHP;
import com.shatteredpixel.shatteredpixeldungeon.sprites.LanFireSprites;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
public class LanFire extends NPC {
{
@ -8,4 +15,28 @@ public class LanFire extends NPC {
properties.add(Property.BOSS);
properties.add(Property.IMMOVABLE);
}
public static boolean seenBefore = false;
@Override
public boolean interact(Char c) {
return false;
}
@Override
protected boolean act() {
if (!seenBefore && Dungeon.level.heroFOV[pos]) {
seenBefore = true;
Buff.affect(hero, IceHealHP.class).set( (100), 1 );
GLog.p("篝火的温暖照亮每一个在寒冷中徒步的冒险者,在寒冷而又凛冽的地牢中,这里是唯一的休息站。");
spend(TICK);
return true;
} else if(seenBefore && !Dungeon.level.heroFOV[pos]) {
seenBefore = false;
Buff.detach( hero, IceHealHP.class );
GLog.n("离开温暖的篝火休息站,前方迎面而来的又是凛冽的寒风。");
return true;
}
return super.act();
}
}

View File

@ -37,14 +37,14 @@ import com.watabou.utils.Random;
public class xykl extends Mob {
private static final String COMBO = "combo";
public RedBloodMoon weapon;
private String[] attackCurse = {"烧,快烧起来!", "扭曲的世界",
private final String[] attackCurse = {"烧,快烧起来!", "扭曲的世界",
"滚开!",
"你不可能再继续前进了!", "你这个狡猾的恶魔!", "去死,全部都去死吧!",
"去死,你这肮脏的怪物!", "啊!",
"尝尝我的怒火!",
"誓死守护我的主人!"};
private int combo = 0;
private String[] deathCurse = {"再一次,我辜负了你!", "对不起,主人!我尽力了!",
private final String[] deathCurse = {"再一次,我辜负了你!", "对不起,主人!我尽力了!",
"我……对不起……", "我再一次没能守护好你", "神啊...帮帮我吧...",
"一切已经结束了吗?", "我……太弱了……", "300年前我辜负了她300年后我辜负了你"};
@ -69,7 +69,7 @@ public class xykl extends Mob {
public int attackProc(Char enemy, int damage) {
if (Random.Int(0, 10) > 7) {
this.sprite.showStatus(16711680, this.attackCurse[Random.Int(this.attackCurse.length)], new Object[0]);
this.sprite.showStatus(16711680, this.attackCurse[Random.Int(this.attackCurse.length)]);
}
int damage2 = xykl.super.attackProc(enemy, this.combo + damage);
this.combo++;
@ -89,7 +89,7 @@ public class xykl extends Mob {
public void die(Object cause) {
xykl.super.die(cause);
if (cause != Chasm.class) {
this.sprite.showStatus(16711680, this.deathCurse[Random.Int(this.deathCurse.length)], new Object[0]);
this.sprite.showStatus(16711680, this.deathCurse[Random.Int(this.deathCurse.length)]);
RedBloodMoon.deadking--;
}
}

View File

@ -44,7 +44,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.OGPDZSLS;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Piranha;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Rat;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedMurderer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedNecromancer;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RedSwarm;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RipperDemon;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.RotHeart;
@ -428,7 +427,7 @@ public class MobPlacer extends TestItem{
Flame(FlameB01.class, DictSpriteSheet.FLAME),
NQHZ(OGPDNQHZ.class, DictSpriteSheet.OGPDNQHZ),
REDBS(RedNecromancer.class, DictSpriteSheet.REDBS),
//REDBS(RedNecromancer.class, DictSpriteSheet.REDBS),
SLXJ(SpectralNecromancer.class, DictSpriteSheet.SLXJ),
BMHR(ShieldHuntsman.class, DictSpriteSheet.BMHR),
XTG(XTG100.class, DictSpriteSheet.XTG),

View File

@ -144,6 +144,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.SkyShield;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Spear;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Sword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WarHammer;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WashCrime;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Whip;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortsword;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.Bolas;
@ -394,10 +395,11 @@ public class Generator {
WarHammer.class,
Glaive.class,
Greataxe.class,
Greatshield.class
Greatshield.class,
WashCrime.class
};
WEP_T5.probs = new float[]{ 6, 5, 5, 4, 4, 4 };
WEP_T5.probs = new float[]{ 6, 5, 5, 4, 4, 4,2 };
WEP_T6.classes = new Class<?>[]{
IceFishSword.class,

View File

@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Burning;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Terror;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vulnerable;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.watabou.utils.Random;
@ -54,16 +53,13 @@ public class WarHammer extends MeleeWeapon {
switch (Random.Int(6)) {
case 0:case 1:case 2:case 3:
default:
return max(buffedLvl());
return super.proc( attacker, defender, damage );
case 4:case 5:
Buff.prolong(defender, Vertigo.class, 12f+level);
Buff.prolong(defender, Terror.class, 12f+level);
Buff.affect(defender, Burning.class).reignite(defender,5f+level);
//Over Level 3,Not Debuff
if(Random.Float()<0.65f && level <3) {
Buff.affect(attacker, Vulnerable.class, 6f);
}
return max(buffedLvl());
return super.proc( attacker, defender, damage );
}
}

View File

@ -0,0 +1,168 @@
package com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Weakness;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Wraith;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.sprites.WraithSprite;
import com.watabou.utils.Bundle;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
public class WashCrime extends MeleeWeapon {
private int killmobs = 0;
private int spawnmobs = 0;
@Override
public int min(int lvl) {
return tier + //base
lvl+killmobs/5; //level scaling
}
@Override
public int max(int lvl) {
return 5*(tier+1) + //base
lvl*(tier+1)+killmobs/5; //level scaling
}
{
image = ItemSpriteSheet.DASlade;
hitSound = Assets.Sounds.HIT;
hitSoundPitch = 1.1f;
tier = 5;
RCH = 3; //lots of extra reach
DLY = 2; //Slow Speed
}
@Override
public int STRReq(int lvl) {
return (9 + tier * 2) - (int)(Math.sqrt(8 * lvl + 1) - 1)/2;
//19 base strength req, up from 18
}
@Override
public void restoreFromBundle(Bundle bundle) {
super.restoreFromBundle(bundle);
killmobs = bundle.getInt("lvl");
spawnmobs = bundle.getInt("vlv");
}
@Override
public void storeInBundle(Bundle bundle) {
super.storeInBundle(bundle);
bundle.put("lvl", killmobs);
bundle.put("vlv",spawnmobs);
}
@Override
public int proc(Char attacker, Char defender, int damage ) {
if(killmobs > 61 ){
killmobs=60;
} else if (defender.HP <= damage && killmobs < 61) {
//目标血量小于实际伤害判定为死亡
killmobs++;
}
if (killmobs>= 2) {
for (int i : PathFinder.NEIGHBOURS9){
if (!Dungeon.level.solid[attacker.pos + i]
&& !Dungeon.level.pit[attacker.pos + i]
&& Actor.findChar(attacker.pos + i) == null
&& attacker == Dungeon.hero && spawnmobs < 1 && this.level>1 ) {
WashCrime.DiedGhost Mob = new WashCrime.DiedGhost();
Mob.pos = defender.pos + i;
Mob.aggro(defender);
GameScene.add(Mob);
Dungeon.level.occupyCell(Mob);
spawnmobs++;
CellEmitter.get(Mob.pos).burst(Speck.factory(Speck.EVOKE), 4);
break;
} else if(!Dungeon.level.solid[attacker.pos + i]
&& !Dungeon.level.pit[attacker.pos + i]
&& Actor.findChar(attacker.pos + i) == null
&& attacker == Dungeon.hero && spawnmobs<2 && this.level>6 ){
WashCrime.DiedGhost Mob = new WashCrime.DiedGhost();
Mob.pos = defender.pos + i;
Mob.aggro(defender);
GameScene.add(Mob);
Dungeon.level.occupyCell(Mob);
spawnmobs++;
CellEmitter.get(Mob.pos).burst(Speck.factory(Speck.EVOKE), 4);
} else if(!Dungeon.level.solid[attacker.pos + i]) {
spawnmobs = 0;
return super.proc( attacker, defender, damage );
}
}
if (Random.NormalIntRange(1, 4) == 4) {
Buff.prolong(defender, Weakness.class, 8f);
} else {
return super.proc(attacker, defender, damage);
}
}
return super.proc(attacker, defender, damage);
}
public class DiedGhost extends Wraith {
{
state = WANDERING;
spriteClass = WraithSprite.class;
alignment = Alignment.ALLY;
WANDERING = new Wandering();
properties.add(Property.UNDEAD);
}
public DiedGhost() {
HP = HT = 5 + killmobs/10;
defenseSkill = 4 + killmobs/10;
}
@Override
public int drRoll() {
return Random.Int(3+killmobs/10, 6+killmobs/10);
}
public void die(Object cause) {
super.die(cause);
spawnmobs=0;
}
private class Wandering extends Mob.Wandering{
@Override
public boolean act(boolean enemyInFOV, boolean justAlerted) {
if (!enemyInFOV){
destroy();
sprite.die();
return true;
} else {
return super.act(true, justAlerted);
}
}
}
}
}

View File

@ -38,6 +38,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Blindness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ChampionEnemy;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.HasteLing;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicalSight;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MindVision;
@ -525,6 +526,7 @@ public abstract class Level implements Bundlable {
if(Dungeon.isChallenged(SBSG)){
ChampionEnemy.rollForStateLing(m);
}
Buff.affect(m, HasteLing.MobLing.class, HasteLing.MobLing.DURATION*2000f);
return m;
}

View File

@ -237,6 +237,10 @@ public abstract class RegularLevel extends Level {
initRooms.add(new NxhyShopRoom());
}
if(Dungeon.depth>=6 && Dungeon.depth <= 9){
initRooms.add(new LanFireRoom());
}
if (Dungeon.NyzshopOnLevel()) {
Buff.affect(hero, RandomBuff.class).set( (3 + Random.Int(9)+hero.STR/6+hero.HP/30)/Random.Int(1,2)+5, 1 );
initRooms.add(new NyzBombAndBooksRoom());
@ -274,10 +278,10 @@ public abstract class RegularLevel extends Level {
}
}
if(Dungeon.depth==6){
initRooms.add(new LanFireRoom());
}
//
// if(Dungeon.depth==6){
// initRooms.add(new LanFireRoom());
// }
return initRooms;
}

View File

@ -23,7 +23,6 @@ import com.watabou.noosa.audio.Sample;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Objects;
public class ShopBossLevel extends Level {
@ -38,6 +37,8 @@ public class ShopBossLevel extends Level {
private static final int D = Terrain.STATUE;
private static final int H = Terrain.WELL;
private static final int B = Terrain.STATUE;
//portals. (from, to).
private static final int WIDTH = 35;
@ -63,7 +64,7 @@ public class ShopBossLevel extends Level {
}
FireMagicDied boss = new FireMagicDied();
boss.pos = WIDTH*17 + 17;
boss.pos = WIDTH*16 + 17;
GameScene.add(boss);
//activateAll();
@ -81,6 +82,8 @@ public class ShopBossLevel extends Level {
public static int TRUEPosition = WIDTH * 17 + 17;
public static int FALSEPosition = WIDTH * 22 + 17;
public static int DiedPosition = WIDTH*17 + 17;
@Override
public void unseal() {
super.unseal();
@ -108,7 +111,7 @@ public class ShopBossLevel extends Level {
public void occupyCell( Char ch ) {
super.occupyCell( ch );
if (map[entrance] == Terrain.ENTRANCE && map[exit] != Terrain.EXIT
if (map[entrance] == Terrain.STATUE && map[exit] != Terrain.EXIT
&& ch == hero && Dungeon.level.distance(ch.pos, entrance) >= 2) {
seal();
}
@ -136,7 +139,7 @@ public class ShopBossLevel extends Level {
public int getSummoningPos(){
Mob king = getKing();
//fixed
HashSet<FireMagicDied.Summoning> summons = Objects.requireNonNull(king).buffs(FireMagicDied.Summoning.class);
HashSet<FireMagicDied.Summoning> summons = king.buffs(FireMagicDied.Summoning.class);
ArrayList<Integer> positions = new ArrayList<>();
for (int pedestal : pedestals) {
boolean clear = true;
@ -228,7 +231,7 @@ public class ShopBossLevel extends Level {
S,S,S,W,W,P,P,P,R,P,P,R,X,X,G,G,G,R,X,X,G,G,G,R,P,P,R,P,P,P,W,W,S,S,S,
S,S,S,S,W,W,P,R,P,P,P,R,X,X,X,G,D,R,X,G,G,G,G,R,P,P,P,R,P,W,W,S,S,S,S,
S,S,S,S,S,W,W,P,P,P,P,R,X,X,X,X,G,R,G,D,G,G,G,R,P,P,P,P,W,W,S,S,S,S,S,
S,S,S,S,S,S,W,W,R,R,R,R,H,R,R,R,R,G,R,R,R,R,H,R,R,R,R,W,W,S,S,S,S,S,S,
S,S,S,S,S,S,W,W,R,R,R,R,H,R,R,R,R,B,R,R,R,R,H,R,R,R,R,W,W,S,S,S,S,S,S,
S,S,S,S,S,W,W,P,P,P,P,R,G,G,G,D,G,R,G,X,X,X,X,R,P,P,P,P,W,W,S,S,S,S,S,
S,S,S,S,W,W,P,R,P,P,P,R,G,G,G,G,X,R,D,G,X,X,X,R,P,P,P,R,P,W,W,S,S,S,S,
S,S,S,W,W,P,P,P,R,P,P,R,G,G,G,X,X,R,G,G,G,X,X,R,P,P,R,P,P,P,W,W,S,S,S,

View File

@ -47,6 +47,7 @@ import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.DungeonSeed;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndChallenges;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndDLC;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndDLCX;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndHeroInfo;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndKeyBindings;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndMessage;
@ -488,22 +489,8 @@ public class HeroSelectScene extends PixelScene {
IconButton DiffcultButton = new IconButton(new ItemSprite(ItemSpriteSheet.DIFFCULTBOOT)) {
@Override
protected void onClick() {
if(1==2){
Game.runOnRenderThread(() -> ShatteredPixelDungeon.scene().add(new WndTextInput(Messages.get(WndStartGame.class,"custom_name"),
Messages.get(WndStartGame.class, "custom_name_desc")+SPDSettings.heroName(),
SPDSettings.heroName(), 20,
false, Messages.get(WndStartGame.class,"custom_name_set"),
Messages.get(WndStartGame.class,"custom_name_clear")){
@Override
public void onSelect(boolean name, String str) {
if (name) {
SPDSettings.heroName(str);
} else {
SPDSettings.heroName("");
}
icon(Icons.get(SPDSettings.heroName().equals("") ? RENAME_OFF : Icons.RENAME_ON));
}
}));
if(1==1){
ShatteredPixelDungeon.scene().addToFront(new WndDLCX(SPDSettings.difficulty(), true));
} else {
ShatteredPixelDungeon.scene().addToFront(new WndMessage("获得_不屈斗士_徽章后解锁难度系统。--暂未实装"));
}

View File

@ -182,7 +182,7 @@ public class InterlevelScene extends PixelScene {
fadeTime += 0.9f; //adds 1 second total
//speed up transition when debugging
} else if (DeviceCompat.isDebug()){
fadeTime = 0.1f;
fadeTime = 0.85f;
}
SkinnedBlock bg = new SkinnedBlock(Camera.main.width, Camera.main.height, loadingAsset ){

View File

@ -757,6 +757,8 @@ public class ItemSpriteSheet {
public static final int PBlade = BAGS+76;
public static final int DASlade = BAGS+77;
static{
assignItemRect(VIAL, 16, 16);
assignItemRect(POUCH, 14, 15);

View File

@ -43,7 +43,7 @@ import java.util.LinkedHashMap;
public class BuffIndicator extends Component {
//transparent icon
public static final int NONE = 66;
public static final int NONE = 68;
//FIXME this is becoming a mess, should do a big cleaning pass on all of these
//and think about tinting options
@ -117,6 +117,8 @@ public class BuffIndicator extends Component {
public static final int DEBUFF_DOWN = 64;
public static final int GOBUFF_UPRD = 65;
public static final int ICE_SWORDDOWN = 66;
public static final int SIZE_SMALL = 7;
public static final int SIZE_LARGE = 16;

View File

@ -14,12 +14,14 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300SpiderSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300Sprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DiedMonkLoaderSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DimandKingSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.FlameBoiSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.IceStalSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.sprites.KagenoNusujinSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.LanFireSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MagicGirlSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MimicSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.MolotovHuntsmanSprite;
@ -45,6 +47,8 @@ import java.util.ArrayList;
public class vM0_6_7_X_Changes {
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
add_v0_6_30_Changes(changeInfos);
add_v0_6_29_Changes(changeInfos);
add_v0_6_28_Changes(changeInfos);
add_v0_6_27_Changes(changeInfos);
add_v0_6_26_Changes(changeInfos);
@ -76,6 +80,65 @@ public class vM0_6_7_X_Changes {
add_v0_6_0_Changes(changeInfos);
}
public static void add_v0_6_30_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta5(P3)", true, "");
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);
changes = new ChangeInfo("新内容", false, null);
changes.hardlight(Window.GREEN_COLOR);
changeInfos.add(changes);
Image issxsaxs =new DimandKingSprite();
issxsaxs.scale.set(PixelScene.align(0.8f));
changes.addButton(new ChangeButton(issxsaxs,("关于宝箱之王?"),
("由于机制较于复杂,且时间不太充足。将在后续更新进行完善,敬请期待。")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DASlade), ("新武器:涤罪[捐赠物品]"),
("感谢_落白_的投稿该武器是一个5阶武器初始19力量20%生成概率。可以召唤✦未安息的亡魂✦助战,自身基准攻击力随着杀敌数追加,但有上限。")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.CHALLANEESICON_14), ("寒冷系统0.1测试版"),
("监狱层追加寒冷系统最高阈值为25")));
changes.addButton(new ChangeButton(new LanFireSprites(), ("篝火系统0.1测试版"),
("寒冷系统0.1测试版配套机制,降低寒冷阈值。\n\nP.S.:还有一个彩蛋降低寒冷阈值的方法,请自行探索哦")));
Image issxsas =new Image(Assets.Interfaces.BUFFS_LARGE, 32, 64, 16, 16);
issxsas.scale.set(PixelScene.align(1f));
changes.addButton(new ChangeButton(issxsas,
("新Buff:刀锋寒冻"),
("寒冷系统0.1测试版配套惩罚机制,降低物理伤害。")));
changes = new ChangeInfo("改动", false, null);
changes.hardlight(Window.CYELLOW);
changeInfos.add(changes);
changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16),
Messages.get(ChangesScene.class, "bugfixes"), Messages.get(vM0_6_7_X_Changes.class, "bug_06X58")));
}
public static void add_v0_6_29_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta4.999(P3)", true, "");
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);
changes = new ChangeInfo("新内容", false, null);
changes.hardlight(Window.GREEN_COLOR);
changeInfos.add(changes);
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DIFFCULTBOOT), ("难度系统测试版"),
("难度系统开始测试。")));
changes = new ChangeInfo("改动", false, null);
changes.hardlight(Window.CYELLOW);
changeInfos.add(changes);
changes.addButton(new ChangeButton(new Image("sprites/spinner.png", 144, 0, 16, 16),
Messages.get(ChangesScene.class,
"bugfixes"),
("修复了一些Bug")));
}
public static void add_v0_6_28_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.1.0-Beta4.975-987(P3)", true, "");
changes.hardlight(Window.TITLE_COLOR);

View File

@ -1,297 +0,0 @@
//package com.shatteredpixel.shatteredpixeldungeon.windows;
//
//import com.shatteredpixel.shatteredpixeldungeon.Challenges;
//import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
//import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
//import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
//import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
//import com.shatteredpixel.shatteredpixeldungeon.sprites.GnollSprite;
//import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
//import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
//import com.shatteredpixel.shatteredpixeldungeon.sprites.RatSprite;
//import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
//import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
//import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
//import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
//import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
//import com.watabou.noosa.Image;
//import com.watabou.noosa.ui.Component;
//import com.watabou.utils.Callback;
//
//import java.util.ArrayList;
//
//public class NewWndChallenges extends Window {
//
// private static final int WIDTH = 120;
// private static final int TTL_HEIGHT = 16;
// private static final int BTN_HEIGHT = 16;
// private static final int GAP = 1;
//
// private boolean editable;
// private ArrayList<NewWndChallenges.ChallengeButton> boxes;
//
// public int index = 0;
// private static int boundIndex(int index) {
// int result = index;
// while (result < 0) result += 9;
// while (result >= Challenges.NAME_IDS.length) result -= 9;
// result = (int) (Math.floor(result / 9.0)) * 9;
// return result;
// }
// protected Callback backPressCallback;
//
// private int checked;
// public NewWndChallenges(int checked, boolean editable ) {
//
// super();
//
// this.checked = checked;
// this.editable = editable;
//
// RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 12 );
// title.hardlight( TITLE_COLOR );
// title.setPos(
// (WIDTH - title.width()) / 2,
// (TTL_HEIGHT - title.height()) / 2
// );
// PixelScene.align(title);
// add( title );
//
// boxes = new ArrayList<>();
//
// float pos = TTL_HEIGHT;
//
// float infoBottom = 0;
// index = boundIndex(index);
// for (int i = index; i < index + 9; i++) {
//
// if (i >= Challenges.NAME_IDS.length) break;
// final String challenge = Challenges.NAME_IDS[i];
//
// if (i > 0 && i % 3 == 0) {
// pos += GAP;
// }
// NewWndChallenges.ChallengeInfo info = new NewWndChallenges.ChallengeInfo(foundChallangeIcon(i) /*挑战的LOGO*/, challenge, false /*是否冲突*/, null
// /*冲突按钮的点击回调*/);
// NewWndChallenges.ChallengeButton cb = info.check;
// cb.checked((checked & Challenges.MASKS[i]) != 0);
// cb.active = editable;
// boxes.add( cb );
// info.setRect((i % 3) * 40, pos, 40, 0);
// infoBottom = Math.max(infoBottom, info.bottom());
//
// add( info );
//
// if (i % 3 == 2) {
// pos = infoBottom;
// }
// }
// RedButton btnPrev; RedButton btnNext; RedButton btnFirst; RedButton btnLast;
// btnPrev = new RedButton("上页" /*需要替换为国际化文本*/) {
// @Override
// protected void onClick() {
// index = boundIndex(index - 9);
// NewWndChallenges.this.hide();
// ShatteredPixelDungeon.scene().addToFront(new NewWndChallenges(refreshChecked(checked), editable) {
// {
// index = NewWndChallenges.this.index;
// backPressCallback = NewWndChallenges.this.backPressCallback;
// }
// });
// }
// };
// add( btnPrev );
// pos += GAP;
//
// btnPrev.setRect(0, pos, (WIDTH - GAP) * 0.5f, BTN_HEIGHT);
// btnNext = new RedButton("下页" /*需要替换为国际化文本*/) {
// @Override
// protected void onClick() {
// index = boundIndex(index + 9);
// NewWndChallenges.this.hide();
// ShatteredPixelDungeon.scene().addToFront(new NewWndChallenges(refreshChecked(checked), editable) {
// {
// index = NewWndChallenges.this.index;
// backPressCallback = NewWndChallenges.this.backPressCallback;
// }
// });
// }
// };
// add( btnNext );
// btnNext.setRect(btnPrev.right() + GAP, pos, (WIDTH - GAP) * 0.5f, BTN_HEIGHT);
//
// pos += BTN_HEIGHT;
//
// btnFirst = new RedButton("首页" /*需要替换为国际化文本*/) {
// @Override
// protected void onClick() {
// index = 0;
// NewWndChallenges.this.hide();
// ShatteredPixelDungeon.scene().addToFront(new NewWndChallenges(refreshChecked(checked), editable) {
// {
// index = NewWndChallenges.this.index;
// backPressCallback = NewWndChallenges.this.backPressCallback;
// }
// });
// }
// };
// add( btnFirst );
// pos += GAP;
//
// btnFirst.setRect(0, pos, (WIDTH - GAP) * 0.5f, BTN_HEIGHT);
// btnLast = new RedButton("末页" /*需要替换为国际化文本*/) {
// @Override
// protected void onClick() {
// index = Challenges.NAME_IDS.length - 1;
// NewWndChallenges.this.hide();
// ShatteredPixelDungeon.scene().addToFront(new NewWndChallenges(refreshChecked(checked), editable) {
// {
// index = NewWndChallenges.this.index;
// backPressCallback = NewWndChallenges.this.backPressCallback;
// }
// });
// }
// };
// add( btnLast );
// btnLast.setRect(btnFirst.right() + GAP, pos, (WIDTH - GAP) * 0.5f, BTN_HEIGHT);
//
// pos += BTN_HEIGHT;
//
// resize( WIDTH, (int)pos );
// }
//
// @Override
// public void onBackPressed() {
//
// if (editable) {
// int value = 0;
// for (int i=0; i < boxes.size(); i++) {
// if (boxes.get( i ).checked()) {
// value |= Challenges.MASKS[i];
// }
// }
// SPDSettings.challenges( value );
// }
//
// super.onBackPressed();
// }
//
// private int refreshChecked(int checked) {
// int value = checked;
// for (int i = 0; i < boxes.size(); i ++) {
// if (index + i >= Challenges.MASKS.length) break;
// value &= ~Challenges.MASKS[index + i];
// if (boxes.get( i ).checked()) {
// value |= Challenges.MASKS[index + i];
// }
// }
// return value;
// }
//
// private static class ChallengeButton extends IconButton {
// private boolean checked = false;
// public ChallengeButton() {
// super( Icons.get( Icons.CHALLENGE_OFF ));
// }
// @Override
// protected void onClick() {
// checked(!checked);
// }
// public boolean checked() {
// return checked;
// }
// public void checked( boolean checked ) {
// this.checked = checked;
// icon( Icons.get( checked ? Icons.CHALLENGE_ON : Icons.CHALLENGE_OFF ) );
// }
// }
//
// private static class ChallengeInfo extends Component {
// Image icon;
// IconButton info;
// NewWndChallenges.ChallengeButton check;
// IconButton conflict;
// public ChallengeInfo(Image icon, String challenge, boolean conflict, Callback onConflict) {
// super();
// this.icon = icon;
// add( icon );
// info = new IconButton(Icons.get(Icons.INFO)){
// @Override
// protected void onClick() {
// ShatteredPixelDungeon.scene().add(
// new WndTitledMessage(new Image(NewWndChallenges.ChallengeInfo.this.icon),
// Messages.titleCase(Messages.get(Challenges.class, challenge)),
// Messages.get(Challenges.class, challenge+"_desc"))
// );
// }
// };
// add( info );
// check = new NewWndChallenges.ChallengeButton();
// add( check );
// if (conflict) {
// this.conflict = new IconButton(Icons.get(Icons.WARNING)) {
// @Override
// protected void onClick() {
// if (onConflict != null) onConflict.call();
// }
// };
// add( this.conflict );
// }
// else this.conflict = null;
// }
//
// @Override
// protected void layout() {
// icon.x = x + (width - 32) / 2;
// icon.y = y;
// PixelScene.align( icon );
// info.setRect(icon.x + icon.width, y, 16, BTN_HEIGHT);
// PixelScene.align( info );
// if (conflict == null) {
// check.setRect(x + (width - 16) / 2, y + BTN_HEIGHT, 16, BTN_HEIGHT);
// PixelScene.align( check );
// }
// else {
// check.setRect(x + (width - 32) / 2, y + BTN_HEIGHT, 16, BTN_HEIGHT);
// PixelScene.align( check );
// conflict.setRect(check.right(), check.top(), 16, BTN_HEIGHT);
// PixelScene.align( conflict );
// }
// height = BTN_HEIGHT * 2;
// }
//
// }
//
// private static Image foundChallangeIcon(int i) {
//
// if (Challenges.NAME_IDS[i].equals("no_food")) {
// return new ItemSprite(ItemSpriteSheet.OVERPRICED,new ItemSprite.Glowing( 0xFF0000 ));
// } else if (Challenges.NAME_IDS[i].equals("no_armor")) {
// return new ItemSprite(ItemSpriteSheet.ARMOR_MAGE,new ItemSprite.Glowing( 0xFF0000 ));
// } else if (Challenges.NAME_IDS[i].equals("no_healing")) {
// return new RatSprite();
// } else if (Challenges.NAME_IDS[i].equals("no_herbalism")) {
// return new GnollSprite();
// } else if (Challenges.NAME_IDS[i].equals("darkness")) {
// return Icons.get(Icons.NEWS);
// } else if (Challenges.NAME_IDS[i].equals("no_scrolls")) {
// return Icons.get(Icons.LANGS);
// } else if (Challenges.NAME_IDS[i].equals("aquaphobia")) {
// return Icons.get(Icons.SHPX);
// } else if (Challenges.NAME_IDS[i].equals("rlpt")) {
// return Icons.get(Icons.LIBGDX);
// } else if (Challenges.NAME_IDS[i].equals("sbsg")) {
// return Icons.get(Icons.WATA);
// } else if (Challenges.NAME_IDS[i].equals("exsg")) {
// return Icons.get(Icons.SHPX);
// } else if (Challenges.NAME_IDS[i].equals("stronger_bosses")) {
// return Icons.get(Icons.HUNTRESS);
// } else if (Challenges.NAME_IDS[i].equals("dhxd")) {
// return Icons.get(Icons.SKULL);
// } else {
// return Icons.get(Icons.STATS);
// }
//
// }
//
//}

View File

@ -76,7 +76,6 @@ public class WndChallenges extends Window {
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"+
WndChallenges.this.index), 12 );
title.hardlight( TITLE_COLOR );
title.setPos(
(WIDTH - title.width()) / 2,
(TTL_HEIGHT - title.height()) / 2
@ -109,7 +108,7 @@ public class WndChallenges extends Window {
cb.active = editable;
//Disable
if(Challenges.NAME_IDS[i].equals("cs") ){
if(Challenges.NAME_IDS[i].equals("cs")||(Challenges.NAME_IDS[i].equals("icedied"))){
cb.active = false;
cb.checked(false);
cb.visible=false;

View File

@ -73,7 +73,9 @@ public class WndDLC extends Window {
String title = Messages.titleCase(Messages.get(Conducts.class, allConducts.get(index).name()));
ShatteredPixelDungeon.scene().add(
new WndTitledMessage(
new Image(Assets.Interfaces.ICONS, (allConducts.get(index).ordinal() - 1) * 16, 16, 16, 16),
new Image(Assets.Interfaces.HAICONS,
(allConducts.get(index).ordinal() - 1) * 16,
16, 16, 16),
title, message)
);
@ -116,7 +118,7 @@ public class WndDLC extends Window {
info.setRect(cb.right(), pos, 16, BTN_HEIGHT);
content.add(info);
infos.add(info);
Image icon = new Image(Assets.Interfaces.ICONS, (i.ordinal() - 1) * 16, 16, 16, 16);
Image icon = new Image(Assets.Interfaces.HAICONS, (i.ordinal() - 1) * 16, 16, 16, 16);
icon.x = cb.left()+1;
icon.y = cb.top()+1;
content.add(icon);

View File

@ -0,0 +1,186 @@
package com.shatteredpixel.shatteredpixeldungeon.windows;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Difficulty;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.CheckBox;
import com.shatteredpixel.shatteredpixeldungeon.ui.IconButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.watabou.noosa.Image;
import com.watabou.noosa.audio.Sample;
import com.watabou.noosa.ui.Component;
import java.util.ArrayList;
import java.util.Arrays;
public class WndDLCX extends Window {
private final int WIDTH = Math.min(138, (int) (PixelScene.uiCamera.width * 0.9));
private final int HEIGHT = (int) (PixelScene.uiCamera.height * 0.4);
private static final int TTL_HEIGHT = 18;
private static final int BTN_HEIGHT = 18;
private static final int GAP = 1;
private boolean editable;
private ArrayList<IconButton> infos = new ArrayList<>();
private ArrayList<ConduitBox> boxes = new ArrayList<>();
private ScrollPane pane;
public WndDLCX(Difficulty.DifficultyConduct difficultyConduct, boolean editable){
new WndDLCX(new Difficulty.HardStorage(difficultyConduct), editable);
}
public WndDLCX(Difficulty.HardStorage conducts, boolean editable ) {
super();
this.editable = editable;
resize(WIDTH, HEIGHT);
RenderedTextBlock title = PixelScene.renderTextBlock( Messages.get(this, "title"), 12 );
title.hardlight( TITLE_COLOR );
title.setPos(
(WIDTH - title.width()) / 2,
(TTL_HEIGHT - title.height()) / 2
);
PixelScene.align(title);
add( title );
ArrayList<Difficulty.DifficultyConduct> allDifficultyConducts = editable ?
new ArrayList<>(Arrays.asList(Difficulty.DifficultyConduct.values())) :
conducts.difficultyConducts;
ScrollPane pane = new ScrollPane(new Component()) {
@Override
public void onClick(float x, float y) {
int size = boxes.size();
if (editable) {
for (int i = 0; i < size; i++) {
if (boxes.get(i).onClick(x, y)) break;
}
}
size = infos.size();
for (int i = 1; i < size+1; i++) {
if (infos.get(i-1).inside(x, y)) {
int index = allDifficultyConducts.contains(Difficulty.DifficultyConduct.NULL) ? i : i-1;
String message = allDifficultyConducts.get(index).desc();
String title = Messages.titleCase(Messages.get(Difficulty.class,
allDifficultyConducts.get(index).name()));
ShatteredPixelDungeon.scene().add(
new WndTitledMessage(
new Image(Assets.Interfaces.HAICONS,
(allDifficultyConducts.get(index).ordinal()-1) * 16,
0, 16, 16),
title, message)
);
break;
}
}
}
};
add(pane);
pane.setRect(0, title.bottom()+2, WIDTH, HEIGHT - title.bottom() - 2);
Component content = pane.content();
float pos = 2;
for (Difficulty.DifficultyConduct i : allDifficultyConducts) {
final String challenge = i.toString();
ConduitBox cb = new ConduitBox( i == Difficulty.DifficultyConduct.NULL ? challenge : " " + challenge);
cb.checked(conducts.isConducted(i));
if (i == Difficulty.DifficultyConduct.NULL){
cb.checked(false);
cb.visible=false;
}
cb.active = editable;
cb.difficultyConduct = i;
pos += GAP;
cb.setRect(0, pos, WIDTH - 16, BTN_HEIGHT);
if (i == Difficulty.DifficultyConduct.NULL){
cb.setSize(WIDTH, BTN_HEIGHT);
}
content.add(cb);
boxes.add(cb);
if (i != Difficulty.DifficultyConduct.NULL) {
IconButton info = new IconButton(Icons.get(Icons.INFO)) {
@Override
protected void layout() {
super.layout();
hotArea.y = -5000;
}
};
info.setRect(cb.right(), pos, 16, BTN_HEIGHT);
content.add(info);
infos.add(info);
Image icon = new Image(Assets.Interfaces.HAICONS, (i.ordinal() - 1) * 16, 0, 16, 16);
icon.x = cb.left()+1;
icon.y = cb.top()+1;
content.add(icon);
}
pos = cb.bottom();
}
content.setSize(WIDTH, pos);
}
@Override
public void onBackPressed() {
if (editable) {
Difficulty.HardStorage value = new Difficulty.HardStorage();
for (ConduitBox slot : boxes) {
if (slot.checked() && slot.difficultyConduct != Difficulty.DifficultyConduct.NULL) {
value.difficultyConducts.add(slot.difficultyConduct);
}
}
SPDSettings.difficulty( value );
}
super.onBackPressed();
}
public class ConduitBox extends CheckBox{
public Difficulty.DifficultyConduct difficultyConduct;
public ConduitBox(String label) {
super(label);
}
@Override
protected void onClick() {
super.onClick();
if (active){
boolean disableEverything = this.difficultyConduct == Difficulty.DifficultyConduct.EASY || SPDSettings.twoConduct();
for (CheckBox slot : boxes){
if (slot != this && disableEverything) slot.checked(false);
}
}
}
protected boolean onClick(float x, float y) {
if (!inside(x, y)) return false;
Sample.INSTANCE.play(Assets.Sounds.CLICK);
onClick();
return true;
}
@Override
protected void layout() {
super.layout();
hotArea.width = hotArea.height = 0;
if (!editable) icon.alpha(0f);
}
}
}

View File

@ -123,7 +123,7 @@ public class DesktopLauncher {
if (System.getProperties().getProperty("os.name").equals("Windows XP")) {
basePath = "Application Data/.shatteredpixel/Shattered Pixel Dungeon/";
} else {
basePath = "AppData/Roaming/.shatteredpixel/Shattered Pixel Dungeon/";
basePath = "AppData/Roaming/.shatteredpixel/Magic Ling Pixel Dungeon/";
}
} else if (SharedLibraryLoader.isMac) {
basePath = "Library/Application Support/Shattered Pixel Dungeon/";