Update V0.6.4.0-Beta7

This commit is contained in:
LingASDJ 2023-08-08 15:06:22 +08:00
parent 4ccd2b0cbe
commit c66cec96f1
40 changed files with 474 additions and 775 deletions

View File

@ -18,8 +18,8 @@ allprojects {
appName = 'Magic Ling Pixel Dungeon'
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
appVersionCode =901500
appVersionName = '0.6.4.0-Beta6'
appVersionCode =901600
appVersionName = '0.6.4.0-Beta7'
appJavaCompatibility = JavaVersion.VERSION_11

View File

@ -6,25 +6,5 @@ sourceCompatibility = targetCompatibility = appJavaCompatibility
dependencies {
api project(':SPD-classes')
implementation project(':services')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:1.5.0"
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4"
implementation "org.slf4j:slf4j-simple:1.7.25"
implementation 'io.ktor:ktor-client-core-jvm:2.3.0'
implementation 'io.ktor:ktor-client-okhttp-jvm:2.3.0'
implementation 'io.ktor:ktor-client-logging-jvm:2.3.0'
implementation 'io.ktor:ktor-client-content-negotiation:2.3.0'
implementation 'io.ktor:ktor-serialization-kotlinx-json:2.3.0'
}
buildscript {
ext.kotlin_version = '1.8.10'
repositories {
mavenCentral()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlin_version"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 238 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 267 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 292 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 244 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 265 KiB

View File

@ -63,6 +63,8 @@ items.food.crivusfruitsfood.eat_msg2=你感觉味道十分不错,香甜可口
items.quest.crivusfruitsflake.name=赤果碎片
items.quest.crivusfruitsflake.desc=克里弗斯之果破碎时,炸的四分五裂,但看起来大概无法食用。\n\n物品自身并没有什么实际用途但长期的魔力汲取让它拥有一股神秘的力量或许它能商人眼前一亮。它本身还可以用作炼金制作一些不错的东西。再不济它也能提供相当的炼金能量。
# 高阶法杖
items.wands.hightwand.wandofhighthunderstorm.name=风暴雷霆法杖
items.wands.hightwand.wandofhighthunderstorm.staff_name=雷暴之杖
items.wands.hightwand.wandofhighthunderstorm.ondeath=你用风暴雷霆法杖杀死了自己…
@ -71,6 +73,12 @@ items.wands.hightwand.wandofhighthunderstorm.stats_desc=这支法杖能向任何
items.wands.hightwand.wandofhighthunderstorm.bmage_desc=当_战斗法师_以雷暴之杖近战攻击目标时能像拥有电击附魔一样有概率释放电弧攻击附近的目标同时获得额外的奥术护盾。
items.wands.hightwand.wandofhighthunderstorm.eleblast_desc=雷暴之杖的元素风暴造成15%伤害击晕目标8回合并使水体带电。
items.wands.hightwand.wandofbluefuck.name=磷焰法杖
items.wands.hightwand.wandofbluefuck.staff_name=鬼磷之杖
items.wands.hightwand.wandofbluefuck.desc=这根法杖由欧松木制成,饰以紫色宝石,这使它看起来相当庄严。它的顶端噼啪作响嘶嘶而鸣,渴望着释放其强大的魔法。
items.wands.hightwand.wandofbluefuck.stats_desc=该法杖在使用时会产生一股强大的磷焰延伸出一个锥形区域。下一次使用它将消耗_%1$d发充能_并造成_%2$d~%3$d点伤害_。法杖消耗的充能数越多其范围与威力就越大或越强。
items.wands.hightwand.wandofbluefuck.bmage_desc=当_战斗法师_以鬼磷法杖近战攻击目标时能像拥有鬼磷附魔一样有概率将其点燃。
###MLPD
@ -161,12 +169,6 @@ items.scrolls.exotic.scrollofconfusion.desc=当阅读这张秘卷后,所有你
items.scrolls.exotic.scrollofpetrification.name=石化秘卷
items.scrolls.exotic.scrollofpetrification.desc=一道红色的诡异闪光将以恐惧压垮使用者视觉范围内生物的心智并使它们呆立在原地。
items.wands.wandofbluefuck.name=磷焰法杖
items.wands.wandofbluefuck.staff_name=鬼磷之杖
items.wands.wandofbluefuck.desc=这根法杖由欧松木制成,饰以紫色宝石,这使它看起来相当庄严。它的顶端噼啪作响嘶嘶而鸣,渴望着释放其强大的魔法。
items.wands.wandofbluefuck.stats_desc=该法杖在使用时会产生一股强大的磷焰延伸出一个锥形区域。下一次使用它将消耗_%1$d发充能_并造成_%2$d~%3$d点伤害_。法杖消耗的充能数越多其范围与威力就越大或越强。
items.wands.wandofbluefuck.bmage_desc=当_战斗法师_以鬼磷法杖近战攻击目标时能像拥有鬼磷附魔一样有概率将其点燃。
items.weapon.enchantments.haloblazing.name=鬼磷%s
items.weapon.enchantments.haloblazing.desc=这个附魔会使磷火从武器中喷薄而出,能够使用点燃敌人并对正在燃烧的敌人造成中毒的额外伤害。

View File

@ -40,7 +40,7 @@ journal.document.alchemy_guide.exotic_scrolls.body=将一张卷轴与一些炼
journal.document.alchemy_guide.bombs.title=改造炸弹
journal.document.alchemy_guide.bombs.body=一个标准的黑火药炸弹可以与一个特定的物品共炼来制作一个强化炸弹。
journal.document.alchemy_guide.weapons.title=强化武器
journal.document.alchemy_guide.weapons.body=投掷武器与法杖也可参与到炼金反应当中!\n\n每个投掷物可以融化为一定量的液金足以完全修复阶级与等级一样的单件投掷物。\n\n法杖可以裂解为一定量的奥术聚酯足以升级两把同等级的法杖。不可通过此方法将法杖升级至+3以上。\n\n通过注入击败Boss的战利品可以获得更加高阶的法杖并且每个高阶法杖都有至少+2的保底最高+4,优先使用0级法杖如果物品已经有等级请手动放入炼金釜中。
journal.document.alchemy_guide.weapons.body=投掷武器与法杖也可参与到炼金反应当中!\n\n每个投掷物可以融化为一定量的液金足以完全修复阶级与等级一样的单件投掷物。\n\n法杖可以裂解为一定量的奥术聚酯足以升级两把同等级的法杖。不可通过此方法将法杖升级至+3以上
journal.document.alchemy_guide.catalysts.title=炼制催化剂
journal.document.alchemy_guide.catalysts.body=催化剂可以用一张卷轴或一瓶药水与一个种子或一个符石制得。如果原料较为匹配,将不会消耗炼金能量。\n\n催化剂的主要用处是在接下来两页的配方中充当炼金原料不过也可以直接使用以获取一种随机效果。
journal.document.alchemy_guide.brews_elixirs.title=炼制魔药与秘药
@ -48,6 +48,10 @@ journal.document.alchemy_guide.brews_elixirs.body=魔药与秘药是较为高级
journal.document.alchemy_guide.spells.title=提取结晶
journal.document.alchemy_guide.spells.body=法术结晶是封装于结晶中的法术,它们具有不同用途的各类效果并允许多次使用。
journal.document.alchemy_guide.wands.title=高阶物品
journal.document.alchemy_guide.wands.body=高阶物品是地牢中究极的存在,炼制他们需要大量的炼金能量与各种各样的原料。不过,他们的效果也是无与伦比的!\n\n高阶法杖炼制后随机获得2-4级,但获得更加强大的效果\n\n高阶卷轴炼制后就是已鉴定且拥有更加强大的效果\n\n高阶武器炼制后获得很强大的效果加成助你探索冒险。
journal.notes$landmark.well_of_health=生命之泉
journal.notes$landmark.well_of_awareness=觉察之泉
journal.notes$landmark.well_of_transmutation=嬗变之泉

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 87 KiB

View File

@ -84,11 +84,11 @@ public class Assets {
public static final String CITY_BOSS = "environment/custom_tiles/city_boss.png";
public static final String HALLS_SP = "environment/custom_tiles/halls_special.png";
public static final String TILES_COLD = "environment/Reload.png";
public static final String TILES_COLD = "environment/tiles_fire.png";
public static final String TILES_DIED = "environment/tiles_died.png";
public static final String TILES_GOLD = "environment/tiles_gold.png";
public static final String WATER_COLD= "environment/water-1.png";
public static final String WATER_COLD= "environment/water2.png";
public static final String PRISON_EXIT_OLD = "environment/custom_tiles/prison_exit_old.png";
public static final String PRISON_EXIT_NEW = "environment/custom_tiles/prison_exit_new.png";
public static final String P_BOSS = "environment/custom_tiles/p_boss.png";
@ -425,7 +425,7 @@ public class Assets {
public static final String SLIME = "sprites/slime.png";
public static final String SNAKE = "sprites/snake.png";
public static final String NECRO = "sprites/necromancer.png";
public static final String NECRORED = "sprites/rednecromancer.png";
public static final String NECRORED = "sprites/rednecromancer_ex.png";
public static final String GHOUL = "sprites/ghoul.png";
public static final String RIPPER = "sprites/ripper.png";

View File

@ -29,6 +29,9 @@ public class Statistics {
//统计分数
public static int progressScore;
//吃保底
public static int bossWeapons;
public static boolean happyMode = false;
//萨卡班甲鱼二阶段
@ -277,9 +280,14 @@ public class Statistics {
private static final String SAKATWO = "sakatwo";
private static final String BDTX = "bdtx";
public static void storeInBundle( Bundle bundle ) {
bundle.put(BDTX,bossWeapons);
//分数
bundle.put( PROG_SCORE, progressScore );
bundle.put( ITEM_VAL, heldItemValue );
@ -371,6 +379,8 @@ public class Statistics {
//嗜血荆棘等级处理
ChaicBlood = bundle.getInt( CHACEBLOOD );
bossWeapons = bundle.getInt(BDTX);
HealingIsDied = bundle.getInt( HEALDIED );
readBooks = bundle.getInt( READBOOKS );

View File

@ -437,11 +437,9 @@ public class Hero extends Char {
str.append("craft_names_");
str.append(csname);
String[] enus = bundle.getStringArray(str.toString());
StringBuilder pre = new StringBuilder();
pre.append("craft_vals_");
pre.append(csname);
int[] trys = bundle.getIntArray(pre.toString());
LinkedHashMap<String, Integer> lname = new LinkedHashMap<String, Integer>();
String pre = "craft_vals_" + csname;
int[] trys = bundle.getIntArray(pre);
LinkedHashMap<String, Integer> lname = new LinkedHashMap<>();
for(int lisx = 0; lisx < enus.length && lisx < trys.length; ++lisx) {
lname.put(enus[lisx], trys[lisx]);

View File

@ -78,8 +78,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlam
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlameX;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfMindVision;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.elixirs.WaterSoul;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfDragonKingBreath;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.exotic.PotionOfLightStromCloud;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfWealth;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfFlameCursed;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfLullaby;
@ -92,10 +93,10 @@ import com.shatteredpixel.shatteredpixeldungeon.items.spells.MagicalInfusion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfAnmy;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFrost;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLightning;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfMagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfRegrowth;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfScale;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfHightHunderStorm;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.SpiritBow;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Dagger;
@ -163,17 +164,18 @@ public enum HeroClass {
new PotionOfInvisibility().quantity(45).identify().collect();
//new Amulet().quantity(1).identify().collect();
new TengusMask().quantity(1).identify().collect();
new RingOfWealth().quantity(1).identify().collect();
new TimekeepersHourglass().quantity(1).identify().collect();
new WandOfAnmy().quantity(1).identify().collect();
Buff.affect(hero, ChampionHero.AntiMagic.class, 50000f);
new WraithAmulet().quantity(1).identify().collect();
new BloodthirstyThorn().quantity(1).identify().collect();
new PotionOfLightStromCloud().quantity(10).identify().collect();
new WandOfHightHunderStorm().quantity(1).identify().collect();
new WandOfLightning().quantity(1).identify().collect();
new WashCrime().quantity(1).identify().collect();
new MagicTorch().quantity(1).identify().collect();
new LamellarArmor().quantity(1).identify().collect();
new PotionOfDragonKingBreath().quantity(50).identify().collect();
new CrivusFruitsFlake().quantity(50).identify().collect();
new PotionOfHealing().quantity(50).identify().collect();

View File

@ -55,7 +55,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfMagicMapping;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;

View File

@ -1,6 +1,7 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.bosses;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.bossWeapons;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.crivusfruitslevel2;
import static com.shatteredpixel.shatteredpixeldungeon.levels.ForestBossLevel.BRatKingRoom;
import static com.shatteredpixel.shatteredpixeldungeon.levels.ForestBossLevel.ForestBossLasherTWOPos;
@ -17,7 +18,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.Blob;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.CorrosiveGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.blobs.ToxicGas;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Amok;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Barrier;
@ -31,7 +31,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Vertigo;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.DriedRose;
import com.shatteredpixel.shatteredpixeldungeon.items.food.CrivusFruitsFood;
@ -41,8 +40,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.keys.IronKey;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.LifeTreeSword;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.ConeAOE;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
@ -148,11 +145,6 @@ public class CrivusFruits extends Mob {
if(!crivusfruitslevel2){
GameScene.add(Blob.seed(pos, HP<65 ? 50 : 30, DiedBlobs.class));
} else {
if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){
sprite.attack( hero.pos );
spend( 25f );
shoot(this, hero.pos);
}
GameScene.add(Blob.seed(pos, HP<36 ? 150 : 50, DiedBlobs.class));
}
@ -196,14 +188,6 @@ public class CrivusFruits extends Mob {
GameScene.updateMap( WIDTH*11+25 );
}
if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){
sprite.attack( hero.pos );
spend( 3f );
shoot(this, hero.pos);
}
}
//三阶段
@ -218,11 +202,6 @@ public class CrivusFruits extends Mob {
GLog.w(Messages.get(this,"!!!"));
Sample.INSTANCE.play( Assets.Sounds.CHALLENGE );
this.sprite.showStatus(CharSprite.NEGATIVE, "!!!");
if(Dungeon.isChallenged(Challenges.STRONGER_BOSSES)){
sprite.attack( hero.pos );
spend( 3f );
shoot(this, hero.pos);
}
}
return super.act();
@ -293,12 +272,19 @@ public class CrivusFruits extends Mob {
if (!Badges.isUnlocked(Badges.Badge.KILL_APPLE)){
Dungeon.level.drop( new LifeTreeSword(), pos ).sprite.drop();
} else if (Random.Float()<0.4f) {
} else if (Random.Float()<0.4f || Statistics.bossWeapons>=3) {
bossWeapons++;
Dungeon.level.drop( new LifeTreeSword(), pos ).sprite.drop();
if(Statistics.bossWeapons>=3){
Statistics.bossWeapons=0;
GLog.w("你已经连续3局未获得生命树触发保底机制同时你的保底机制次数重置为0");
}
} else {
Dungeon.level.drop( new Food(), pos ).sprite.drop();
}
Badges.KILLSAPPLE();
int blobs = Random.chances(new float[]{0, 0, 6, 3, 1});
@ -324,48 +310,6 @@ public class CrivusFruits extends Mob {
}
}
public void shoot(Char ch, int pos){
final Ballistica shot = new Ballistica( hero.pos, pos, Ballistica.MAGIC_BOLT);
fx(shot, ch);
}
ConeAOE cone;
protected void fx(Ballistica bolt, Char ch ) {
//need to perform flame spread logic here so we can determine what cells to put flames in.
affectedCells = new HashSet<>();
visualCells = new HashSet<>();
int maxDist = 2 + 4*4;
int dist = Math.min(bolt.dist, maxDist);
for (int i = 0; i < PathFinder.CIRCLE8.length; i++){
if (bolt.sourcePos+PathFinder.CIRCLE8[i] == bolt.path.get(1)){
break;
}
}
cone = new ConeAOE( bolt,
maxDist,
80 + 40,Ballistica.MAGIC_BOLT);
visualCells.remove(bolt.path.get(dist));
for (Ballistica ray : cone.rays){
((MagicMissile)ch.sprite.parent.recycle( MagicMissile.class )).reset(
MagicMissile.SHADOW_CONE,
ch.sprite,
ray.path.get(ray.dist),
null
);
}
GameScene.add(Blob.seed(hero.pos, 120, CorrosiveGas.class));
if(Dungeon.level.heroFOV[bolt.sourcePos] || Dungeon.level.heroFOV[bolt.collisionPos]){
Sample.INSTANCE.play( Assets.Sounds.ZAP );
}
}
{
immunities.add( Paralysis.class );

View File

@ -1,170 +0,0 @@
package com.shatteredpixel.shatteredpixeldungeon.custom;
import com.badlogic.gdx.Input;
import com.watabou.noosa.Game;
import com.watabou.utils.Callback;
import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.MouseInfo;
import java.awt.Point;
import java.awt.Rectangle;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.awt.event.WindowEvent;
import java.awt.event.WindowFocusListener;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.OverlayLayout;
import javax.swing.SwingUtilities;
import javax.swing.border.Border;
import javax.swing.border.EmptyBorder;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
public class TextInput implements Input.TextInputListener {
@Override
public void input (String text) {
}
@Override
public void canceled () {
}
public static void getTextInput (final Input.TextInputListener listener, final String title, final String text, final String hint) {
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run () {
final JPanel panel = new JPanel(new FlowLayout());
JPanel textPanel = new JPanel() {
public boolean isOptimizedDrawingEnabled () {
return false;
};
};
textPanel.setLayout(new OverlayLayout(textPanel));
panel.add(textPanel);
final JTextField textField = new JTextField(20);
textField.setText(text);
textField.setAlignmentX(0.0f);
textPanel.add(textField);
final JLabel placeholderLabel = new JLabel(hint);
placeholderLabel.setForeground(Color.GRAY);
placeholderLabel.setAlignmentX(0.0f);
textPanel.add(placeholderLabel, 0);
textField.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void removeUpdate (DocumentEvent arg0) {
this.updated();
}
@Override
public void insertUpdate (DocumentEvent arg0) {
this.updated();
}
@Override
public void changedUpdate (DocumentEvent arg0) {
this.updated();
}
private void updated () {
if (textField.getText().length() == 0)
placeholderLabel.setVisible(true);
else
placeholderLabel.setVisible(false);
}
});
final JOptionPane pane = new JOptionPane(panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.OK_CANCEL_OPTION, null, null,
null);
pane.setInitialValue(null);
pane.setComponentOrientation(JOptionPane.getRootFrame().getComponentOrientation());
Border border = textField.getBorder();
placeholderLabel.setBorder(new EmptyBorder(border.getBorderInsets(textField)));
final JDialog dialog = pane.createDialog(null, title);
panel.addMouseListener(new MouseListener() {
@Override
public void mouseClicked(MouseEvent e) {}
@Override
public void mousePressed(MouseEvent e) {
Point mousePos = MouseInfo.getPointerInfo().getLocation();
Rectangle bounds = panel.getBounds();
bounds.setLocation(panel.getLocationOnScreen());
if(bounds.contains(mousePos)) {
listener.canceled();
dialog.dispose();
}
}
@Override
public void mouseReleased(MouseEvent e) {}
@Override
public void mouseEntered(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) {}
});
pane.selectInitialValue();
dialog.addWindowFocusListener(new WindowFocusListener() {
@Override
public void windowLostFocus (WindowEvent arg0) {
listener.canceled();
dialog.dispose();
}
@Override
public void windowGainedFocus (WindowEvent arg0) {
textField.requestFocusInWindow();
}
});
dialog.setAlwaysOnTop(true);
dialog.toFront();
for(int i=0; i<10;i++) {
dialog.requestFocus();
}
dialog.setVisible(true);
dialog.dispose();
final Object selectedValue = pane.getValue();
//update the text needs time, so switch to another thread
Game.runOnRenderThread(new Callback() {
@Override
public void call() {
if (selectedValue != null && (selectedValue instanceof Integer)
&& ((Integer)selectedValue).intValue() == JOptionPane.OK_OPTION) {
listener.input(textField.getText());
} else {
listener.canceled();
}
}
});
}
});
}
}

View File

@ -1,188 +0,0 @@
package com.shatteredpixel.shatteredpixeldungeon.custom.visuals;
import com.badlogic.gdx.Gdx;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.custom.TextInput;
import com.shatteredpixel.shatteredpixeldungeon.custom.utils.Constants;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.watabou.noosa.NinePatch;
public abstract class ClassName extends RedButton {
private NinePatch inputWnd;
private RenderedTextBlock inputText;
private String hint = "";
private static final int MIN_HEIGHT_LARGE = 26;
private static final int MIN_HEIGHT_PACKED = 18;
private int max_str_length = Integer.MAX_VALUE;
//defines if title and input window are in separate lines.
private boolean large = true;
public ClassName( String label ) {
this(label,"");
}
public ClassName( String label, String txt ){
super(label, 8);
inputText = PixelScene.renderTextBlock( 6 );
inputText.text( txt );
add( inputText );
}
public void setTitle(String title){
text.text(title);
}
public void setHint(String hint){
this.hint = hint;
}
public void setMaxStringLength(int maxLength){
this.max_str_length = Math.max(0, maxLength);
}
public void setLarge(boolean isLarge){
this.large = isLarge;
}
@Override
protected void createChildren() {
super.createChildren();
inputWnd = Chrome.get(Chrome.Type.TOAST);
add(inputWnd);
}
@Override
protected void onClick() {
TextInput tinp = new TextInput(){
@Override
public void input(String text) {
if(parent != null) {
if (text.length() > max_str_length) {
text = text.substring(0, max_str_length);
}
text(text);
onTextChange();
}
}
@Override
public void canceled() {
if(parent != null) {
onTextCancel();
}
}
};
if(Constants.gameIsAndroid()) {
Gdx.input.getTextInput(tinp, text.text(), inputText.text(), hint);
}else{
TextInput.getTextInput(tinp, text.text(), inputText.text(), hint);
}
}
public abstract void onTextChange();
public abstract void onTextCancel();
@Override
public void text(String value) {
inputText.text(value);
if(value.equals("")){
inputText.clear();
}
layout();
}
public void label(String value){
text.text(value);
layout();
}
public String text(){
return inputText.text();
}
@Override
public void enable(boolean value) {
super.enable(value);
inputText.alpha( value ? 1.0f : 0.3f );
inputWnd.alpha( value ? 1.0f : 0.3f );
}
@Override
protected void layout() {
if(large) {
bg.x = x;
bg.y = y;
height = Math.max(height, MIN_HEIGHT_LARGE);
bg.size(width, height);
hotArea.x = x;
hotArea.y = y;
hotArea.width = width;
hotArea.height = height;
if (icon != null) {
text.setPos((width - text.width() - text.height() - 2) / 2, bg.y + 2);
PixelScene.align(text);
icon.scale.set((text.height() + 2) / icon.height);
icon.x = text.right() + 2;
icon.y = text.top() - 2;
} else {
text.setPos((width - text.width()) / 2, bg.y + 2);
PixelScene.align(text);
}
inputWnd.x = x + 2;
inputWnd.y = text.bottom() + 2;
inputWnd.size(width - 4, height - 7 - text.height());
inputText.maxWidth((int) inputWnd.width);
inputText.setPos((inputWnd.width() - inputText.width()) / 2 + inputWnd.x, inputWnd.y + (inputWnd.height - inputText.height()) / 2);
PixelScene.align(inputText);
}else{
bg.x = x;
bg.y = y;
height = Math.max(height, MIN_HEIGHT_PACKED);
bg.size(width, height);
hotArea.x = x;
hotArea.y = y;
hotArea.width = width;
hotArea.height = height;
if (icon != null) {
icon.x = 1;
icon.y = (bg.height - icon.height)/2 + bg.y;
text.setPos(icon.x + icon.width() + 1, (bg.height - text.height())/2 + bg.y);
PixelScene.align(text);
} else {
text.setPos( 2, (bg.height - text.height())/2 + bg.y);
PixelScene.align(text);
}
inputWnd.x = text.right() + 2;
inputWnd.y = bg.y + 2;
inputWnd.size(bg.x + bg.width - text.right() - 4, bg.height - 4);
inputText.maxWidth((int) inputWnd.width);
inputText.setPos((inputWnd.width() - inputText.width()) / 2 + inputWnd.x, inputWnd.y + (inputWnd.height - inputText.height()) / 2);
PixelScene.align(inputText);
}
}
}

View File

@ -1,194 +0,0 @@
package com.shatteredpixel.shatteredpixeldungeon.custom.visuals;
import com.badlogic.gdx.Gdx;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.custom.TextInput;
import com.shatteredpixel.shatteredpixeldungeon.custom.utils.Constants;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.watabou.noosa.NinePatch;
public abstract class TextField extends RedButton {
private NinePatch inputWnd;
private RenderedTextBlock inputText;
private String hint = "";
private static final int MIN_HEIGHT_LARGE = 26;
private static final int MIN_HEIGHT_PACKED = 18;
private int max_str_length = Integer.MAX_VALUE;
//defines if title and input window are in separate lines.
private boolean large = true;
public TextField( String label ) {
this(label,"");
}
public TextField( String label, String txt ){
super(label, 8);
inputText = PixelScene.renderTextBlock( 6 );
inputText.text( txt );
add( inputText );
}
public void setTitle(String title){
text.text(title);
}
public void setHint(String hint){
this.hint = hint;
}
public void setMaxStringLength(int maxLength){
this.max_str_length = Math.max(0, maxLength);
}
public void setLarge(boolean isLarge){
this.large = isLarge;
}
@Override
protected void createChildren() {
super.createChildren();
inputWnd = Chrome.get(Chrome.Type.TOAST);
add(inputWnd);
}
@Override
protected void onClick() {
TextInput tinp = new TextInput(){
@Override
public void input(String text) {
if(parent != null) {
if (text.length() > max_str_length) {
text = text.substring(0, max_str_length);
}
text(text);
onTextChange();
}
}
@Override
public void canceled() {
if(parent != null) {
onTextCancel();
}
}
};
if(Constants.gameIsAndroid()) {
Gdx.input.getTextInput(tinp, text.text(), inputText.text(), hint);
//TODO 待迁移为破碎1.3种子系统
// Game.platform.promptTextInput("title", "hint", 100, false, "pos", "neg", new PlatformSupport.TextCallback() {
// @Override
// public void onSelect(boolean positive, String text) {
// text(text);
// }
// });
}else{
TextInput.getTextInput(tinp, text.text(), inputText.text(), hint);
}
}
public abstract void onTextChange();
public abstract void onTextCancel();
@Override
public void text(String value) {
inputText.text(value);
if(value.equals("")){
inputText.clear();
}
layout();
}
public void label(String value){
text.text(value);
layout();
}
public String text(){
return inputText.text();
}
@Override
public void enable(boolean value) {
super.enable(value);
inputText.alpha( value ? 1.0f : 0.3f );
inputWnd.alpha( value ? 1.0f : 0.3f );
}
@Override
protected void layout() {
if(large) {
bg.x = x;
bg.y = y;
height = Math.max(height, MIN_HEIGHT_LARGE);
bg.size(width, height);
hotArea.x = x;
hotArea.y = y;
hotArea.width = width;
hotArea.height = height;
if (icon != null) {
text.setPos((width - text.width() - text.height() - 2) / 2, bg.y + 2);
PixelScene.align(text);
icon.scale.set((text.height() + 2) / icon.height);
icon.x = text.right() + 2;
icon.y = text.top() - 2;
} else {
text.setPos((width - text.width()) / 2, bg.y + 2);
PixelScene.align(text);
}
inputWnd.x = x + 2;
inputWnd.y = text.bottom() + 2;
inputWnd.size(width - 4, height - 7 - text.height());
inputText.maxWidth((int) inputWnd.width);
inputText.setPos((inputWnd.width() - inputText.width()) / 2 + inputWnd.x, inputWnd.y + (inputWnd.height - inputText.height()) / 2);
PixelScene.align(inputText);
}else{
bg.x = x;
bg.y = y;
height = Math.max(height, MIN_HEIGHT_PACKED);
bg.size(width, height);
hotArea.x = x;
hotArea.y = y;
hotArea.width = width;
hotArea.height = height;
if (icon != null) {
icon.x = 1;
icon.y = (bg.height - icon.height)/2 + bg.y;
text.setPos(icon.x + icon.width() + 1, (bg.height - text.height())/2 + bg.y);
PixelScene.align(text);
} else {
text.setPos( 2, (bg.height - text.height())/2 + bg.y);
PixelScene.align(text);
}
inputWnd.x = text.right() + 2;
inputWnd.y = bg.y + 2;
inputWnd.size(bg.x + bg.width - text.right() - 4, bg.height - 4);
inputText.maxWidth((int) inputWnd.width);
inputText.setPos((inputWnd.width() - inputText.width()) / 2 + inputWnd.x, inputWnd.y + (inputWnd.height - inputText.height()) / 2);
PixelScene.align(inputText);
}
}
}

View File

@ -194,7 +194,24 @@ import java.util.LinkedHashMap;
public class Generator {
public enum Category {
public static MeleeWeapon randomWeapon(int floorSet, boolean useDefaults) {
floorSet = (int)GameMath.gate(0, floorSet, floorSetTierProbs.length-1);
MeleeWeapon w;
if (useDefaults){
w = (MeleeWeapon) randomUsingDefaults(wepTiers[Random.chances(floorSetTierProbs[floorSet])]);
} else {
w = (MeleeWeapon) random(wepTiers[Random.chances(floorSetTierProbs[floorSet])]);
}
return w;
}
public static MeleeWeapon randomWeapon(boolean useDefaults) {
return randomWeapon(Dungeon.depth / 5, useDefaults);
}
public enum Category {
WEAPON ( 2, 2, MeleeWeapon.class),
WEP_T1 ( 0, 0, MeleeWeapon.class),
WEP_T2 ( 0, 0, MeleeWeapon.class),

View File

@ -65,7 +65,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.spells.SummonElemental;
import com.shatteredpixel.shatteredpixeldungeon.items.spells.TelekineticGrab;
import com.shatteredpixel.shatteredpixeldungeon.items.spells.WildEnergy;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfHightHunderStorm;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.IceFishSword;

View File

@ -41,9 +41,9 @@ public abstract class Key extends Item {
stackable = true;
unique = true;
}
public int depth;
@Override
public boolean isSimilar( Item item ) {
return super.isSimilar(item) && ((Key)item).depth == depth;
@ -58,11 +58,19 @@ public abstract class Key extends Item {
hero.spendAndNext( TIME_TO_PICK_UP );
GameScene.updateKeyDisplay();
if(hero.belongings.weapon instanceof LockSword){
LockSword weapon = (LockSword)hero.belongings.weapon;
weapon.lvl += 15*(Dungeon.depth/5);
hero.sprite.showStatus(0x123456ff, String.valueOf(15*(Dungeon.depth/5)));
GLog.p("归溯钥剑吸收了地牢钥匙中的残余魔力,你感觉它似乎变得更加强大了。");
if(hero.belongings.weapon != null){
if(hero.belongings.weapon instanceof LockSword){
LockSword weapon = (LockSword)hero.belongings.weapon;
weapon.lvl += 5*(Dungeon.depth/5)+20;
int lvl = weapon.lvl;
if (lvl >= 100 && lvl <= 1000 && lvl % 100 == 0) {
// 提醒气泡的显示逻辑
GLog.p("归溯钥剑吸收了地牢钥匙中的残余魔力,你感觉它似乎变得更加强大了。");
}
int bubbleText = 15 * (Dungeon.depth / 5) + 20;
hero.sprite.showStatus(0x123456ff, String.valueOf(bubbleText));
return true;
}
}
return true;
}

View File

@ -1,14 +1,32 @@
package com.shatteredpixel.shatteredpixeldungeon.items.quest;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.LockedFloor;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.custom.messages.M;
import com.shatteredpixel.shatteredpixeldungeon.custom.testmode.LevelTeleporter;
import com.shatteredpixel.shatteredpixeldungeon.custom.utils.Constants;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.ui.Icons;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
import com.shatteredpixel.shatteredpixeldungeon.ui.StyledButton;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.Game;
import com.watabou.noosa.ui.Component;
import java.util.ArrayList;
@ -38,8 +56,7 @@ public class SakaFishSketon extends Item {
GLog.w(Messages.get(this,"cannot_send"));
return;
}
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
Game.switchScene(InterlevelScene.class);
GameScene.show(new WndSelectLevel());
}
}
@ -57,5 +74,95 @@ public class SakaFishSketon extends Item {
public int value() {
return quantity * 1250;
}
public static class WndSelectLevel extends Window {
private static final int WIDTH = 120;
private static final int GAP = 2;
private static final int BTN_SIZE = 16;
private static final int PANE_MAX_HEIGHT = 96;
private int selectedLevel = 0;
private ArrayList<LevelTeleporter.DepthButton> btns = new ArrayList<>();
private StyledButton icb;
public WndSelectLevel(){
super();
resize(WIDTH, 0);
RenderedTextBlock ttl = PixelScene.renderTextBlock(8);
ttl.text(M.L(LevelTeleporter.class, "interlevel_teleport_title"));
add(ttl);
ttl.setPos(WIDTH/2f-ttl.width()/2f, GAP);
PixelScene.align(ttl);
ScrollPane sp = new ScrollPane(new Component()){
@Override
public void onClick(float x, float y) {
super.onClick(x, y);
for(LevelTeleporter.DepthButton db: btns){
if(db.click(x, y)){
break;
}
}
}
};
add(sp);
//sp.setRect(0, ttl.bottom() + GAP * 2, WIDTH, PANE_MAX_HEIGHT);
//GLog.i("%f", ttl.bottom() + GAP * 2);
Component content = sp.content();
float xpos = (WIDTH - 5*BTN_SIZE - GAP*8)/2f;
float ypos = 0;
float each = GAP*2 + BTN_SIZE;
for(int i = 0; i< Constants.MAX_DEPTH; ++i){
int column = i % 5;
int row = i / 5;
final int j = i+1;
LevelTeleporter.DepthButton db = new LevelTeleporter.DepthButton(j){
@Override
protected void onClick() {
super.onClick();
setSelectedLevel(j);
}
};
db.enable(!(j > Statistics.deepestFloor));
db.setRect(xpos + column * each, ypos + row * each, BTN_SIZE, BTN_SIZE);
PixelScene.align(db);
content.add(db);
btns.add(db);
}
content.setSize(WIDTH, btns.get(btns.size() - 1).bottom());
sp.setRect(0, ttl.bottom() + GAP * 2, WIDTH, Math.min(btns.get(btns.size()-1).bottom(), PANE_MAX_HEIGHT));
icb = new StyledButton(Chrome.Type.RED_BUTTON, M.L(LevelTeleporter.class, "interlevel_teleport_go", selectedLevel)){
@Override
protected void onClick() {
super.onClick();
Buff buff = hero.buff(TimekeepersHourglass.timeFreeze.class);
if (buff != null) buff.detach();
buff = hero.buff(Swiftthistle.TimeBubble.class);
if (buff != null) buff.detach();
InterlevelScene.mode = InterlevelScene.Mode.RETURN;
InterlevelScene.returnDepth = selectedLevel;
InterlevelScene.returnPos = -1;
Game.switchScene( InterlevelScene.class );
}
};
add(icb);
icb.icon(Icons.get(Icons.DEPTH));
icb.setRect(0, sp.bottom() + GAP * 2, WIDTH, BTN_SIZE);
setSelectedLevel(0);
sp.scrollTo(0, 0);
resize(WIDTH, (int) (icb.bottom()));
sp.setPos(0, ttl.bottom() + GAP * 2);
}
private void setSelectedLevel(int lvl){
this.selectedLevel = lvl;
icb.text(M.L(LevelTeleporter.class, "interlevel_teleport_go", selectedLevel));
icb.enable(selectedLevel > 0 && selectedLevel <= Constants.MAX_DEPTH);
}
}
}

View File

@ -46,7 +46,6 @@ import com.watabou.utils.Bundle;
import com.watabou.utils.Random;
import com.watabou.utils.Reflection;
import java.text.DecimalFormat;
import java.util.ArrayList;
import java.util.HashSet;
@ -58,12 +57,12 @@ public class RingOfWealth extends Ring {
private float triesToDrop = Float.MIN_VALUE;
private int dropsToRare = Integer.MIN_VALUE;
public String statsInfo() {
if (isIdentified()){
return Messages.get(this, "stats", new DecimalFormat("#.##").format(100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)));
return Messages.get(this, "stats", Messages.decimalFormat("#.##", 100f * (Math.pow(1.20f, soloBuffedBonus()) - 1f)));
} else {
return Messages.get(this, "typical_stats", new DecimalFormat("#.##").format(20f));
return Messages.get(this, "typical_stats", Messages.decimalFormat("#.##", 20f));
}
}
@ -88,20 +87,20 @@ public class RingOfWealth extends Ring {
protected RingBuff buff( ) {
return new Wealth();
}
public static float dropChanceMultiplier( Char target ){
return (float)Math.pow(1.20, getBuffedBonus(target, Wealth.class));
}
public static ArrayList<Item> tryForBonusDrop(Char target, int tries ){
int bonus = getBuffedBonus(target, Wealth.class);
if (bonus <= 0) return null;
HashSet<Wealth> buffs = target.buffs(Wealth.class);
float triesToDrop = Float.MIN_VALUE;
int dropsToEquip = Integer.MIN_VALUE;
//find the largest count (if they aren't synced yet)
for (Wealth w : buffs){
if (w.triesToDrop() > triesToDrop){
@ -112,8 +111,8 @@ public class RingOfWealth extends Ring {
//reset (if needed), decrement, and store counts
if (triesToDrop == Float.MIN_VALUE) {
triesToDrop = Random.NormalIntRange(0, 25);
dropsToEquip = Random.NormalIntRange(4, 8);
triesToDrop = Random.NormalIntRange(0, 20);
dropsToEquip = Random.NormalIntRange(5, 10);
}
//now handle reward logic
@ -122,12 +121,25 @@ public class RingOfWealth extends Ring {
triesToDrop -= tries;
while ( triesToDrop <= 0 ){
if (dropsToEquip <= 0){
int equipBonus = 0;
//A second ring of wealth can be at most +1 when calculating wealth bonus for equips
//This is to prevent using an upgraded wealth to farm another upgraded wealth and
//using the two to get substantially more upgrade value than intended
for (Wealth w : target.buffs(Wealth.class)){
if (w.buffedLvl() > equipBonus){
equipBonus = w.buffedLvl() + Math.min(equipBonus, 2);
} else {
equipBonus += Math.min(w.buffedLvl(), 2);
}
}
Item i;
do {
i = genEquipmentDrop(bonus - 1);
i = genEquipmentDrop(equipBonus - 1);
} while (Challenges.isItemBlocked(i));
drops.add(i);
dropsToEquip = Random.NormalIntRange(4, 8);
dropsToEquip = Random.NormalIntRange(5, 10);
} else {
Item i;
do {
@ -136,7 +148,7 @@ public class RingOfWealth extends Ring {
drops.add(i);
dropsToEquip--;
}
triesToDrop += Random.NormalIntRange(0, 25);
triesToDrop += Random.NormalIntRange(0, 20);
}
//store values back into rings
@ -144,7 +156,7 @@ public class RingOfWealth extends Ring {
w.triesToDrop(triesToDrop);
w.dropsToRare(dropsToEquip);
}
return drops;
}
@ -173,18 +185,18 @@ public class RingOfWealth extends Ring {
}
latestDropTier = 0;
}
public static Item genConsumableDrop(int level) {
float roll = Random.Float();
//60% chance - 4% per level. Starting from +15: 0%
if (roll < (0.6f - 0.04f * level)) {
latestDropTier = 1;
return genLowValueConsumable();
//30% chance + 2% per level. Starting from +15: 60%-2%*(lvl-15)
//30% chance + 2% per level. Starting from +15: 60%-2%*(lvl-15)
} else if (roll < (0.9f - 0.02f * level)) {
latestDropTier = 2;
return genMidValueConsumable();
//10% chance + 2% per level. Starting from +15: 40%+2%*(lvl-15)
//10% chance + 2% per level. Starting from +15: 40%+2%*(lvl-15)
} else {
latestDropTier = 3;
return genHighValueConsumable();
@ -197,11 +209,11 @@ public class RingOfWealth extends Ring {
Item i = new Gold().random();
return i.quantity(i.quantity()/2);
case 1:
return Generator.random(Generator.Category.STONE);
return Generator.randomUsingDefaults(Generator.Category.STONE);
case 2:
return Generator.random(Generator.Category.POTION);
return Generator.randomUsingDefaults(Generator.Category.POTION);
case 3:
return Generator.random(Generator.Category.SCROLL);
return Generator.randomUsingDefaults(Generator.Category.SCROLL);
}
}
@ -249,7 +261,7 @@ public class RingOfWealth extends Ring {
int floorset = (Dungeon.depth + level)/5;
switch (Random.Int(5)){
default: case 0: case 1:
Weapon w = Generator.randomWeapon(floorset);
Weapon w = Generator.randomWeapon(floorset, true);
if (!w.hasGoodEnchant() && Random.Int(10) < level) w.enchant();
else if (w.hasCurseEnchant()) w.enchant(null);
result = w;
@ -261,15 +273,15 @@ public class RingOfWealth extends Ring {
result = a;
break;
case 3:
result = Generator.random(Generator.Category.RING);
result = Generator.randomUsingDefaults(Generator.Category.RING);
break;
case 4:
result = Generator.random(Generator.Category.ARTIFACT);
break;
}
//minimum level is 1/2/3/4/5/6 when ring level is 1/3/6/10/15/21
//minimum level is 1/2/3/4/5/6 when ring level is 1/3/5/7/9/11
if (result.isUpgradable()){
int minLevel = (int)Math.floor((Math.sqrt(8*level + 1)-1)/2f);
int minLevel = (level+1)/2;
if (result.level() < minLevel){
result.level(minLevel);
}
@ -285,11 +297,11 @@ public class RingOfWealth extends Ring {
}
public class Wealth extends RingBuff {
private void triesToDrop( float val ){
triesToDrop = val;
}
private float triesToDrop(){
return triesToDrop;
}
@ -301,6 +313,6 @@ public class RingOfWealth extends Ring {
private int dropsToRare(){
return dropsToRare;
}
}
}
}

View File

@ -33,6 +33,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Cripple;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Paralysis;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.mage.WildMagic;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Blazing;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
@ -51,6 +52,27 @@ import java.util.ArrayList;
public class WandOfFireblast extends DamageWand {
public static class PlaceHolderX extends WandOfFireblast {
{
image = ItemSpriteSheet.WAND_BLAST_WAVE;
}
@Override
public boolean isSimilar(Item item) {
return item instanceof WandOfFireblast;
}
@Override
public void onZap(Ballistica attack) {}
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {}
@Override
public String info() {
return "";
}
}
{
image = ItemSpriteSheet.WAND_FIREBOLT;

View File

@ -28,6 +28,7 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Lightning;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.Shocking;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
@ -46,6 +47,29 @@ import java.util.ArrayList;
public class WandOfLightning extends DamageWand {
public static class PlaceHolderX extends WandOfLightning {
{
image = ItemSpriteSheet.WAND_LIGHTNING;
}
@Override
public boolean isSimilar(Item item) {
return item instanceof WandOfLightning;
}
@Override
public void onZap(Ballistica attack) {}
public void onHit(MagesStaff staff, Char attacker, Char defender, int damage) {}
@Override
public String info() {
return "";
}
}
{
image = ItemSpriteSheet.WAND_LIGHTNING;
}

View File

@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.wands;
package com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
@ -36,6 +36,8 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfLiquidFlameX;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CrivusFruitsFlake;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.DamageWand;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.enchantments.HaloBlazing;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.MagesStaff;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;

View File

@ -166,8 +166,8 @@ public class BloodthirstyThorn extends MeleeWeapon {
* @param bloodthirstyThorn 读取嗜血荆棘的对象
* @param chaliceOfBlood 读取自己背包中的圣杯
*/
BloodthirstyThorn bloodthirstyThorn = new BloodthirstyThorn();
ChaliceOfBlood chaliceOfBlood = Dungeon.hero.belongings.getItem(ChaliceOfBlood.class);
/**
* @param message 消息弹框控件
*/
@ -180,6 +180,8 @@ public class BloodthirstyThorn extends MeleeWeapon {
*/
@Override
public Item brew(ArrayList<Item> ingredients) {
ChaliceOfBlood chaliceOfBlood = Dungeon.hero.belongings.getItem(ChaliceOfBlood.class);
BloodthirstyThorn bloodthirstyThorn = new BloodthirstyThorn();
/**
* @param Method brew 输出最终的炼金结果物品
*/
@ -214,6 +216,8 @@ public class BloodthirstyThorn extends MeleeWeapon {
@Override
public Item sampleOutput(ArrayList<Item> ingredients) {
ChaliceOfBlood chaliceOfBlood = Dungeon.hero.belongings.getItem(ChaliceOfBlood.class);
BloodthirstyThorn bloodthirstyThorn = new BloodthirstyThorn();
/**
* @param sampleOutput 输出炼金结果物品前的预览方法
*/

View File

@ -125,17 +125,19 @@ public class LockSword extends MeleeWeapon {
int dmg;
LockedFloor lock = Dungeon.hero.buff(LockedFloor.class);
if (lvl >= 1000) {
lvl += 1;
} else if (defender.properties().contains(Char.Property.BOSS) && defender.HP <= damage && lvl <= 1000 && lock == null) {
//目标Boss血量小于实际伤害判定为死亡,+9
lvl += 9;
} else if (defender.properties().contains(Char.Property.MINIBOSS) && defender.HP <= damage && lvl <= 1000 && lock == null) {
//目标迷你Boss血量小于实际伤害判定为死亡,+7
lvl += 7;
} else if (defender.HP <= damage && lvl <= 1000 && lock == null) {
//目标血量小于实际伤害判定为死亡,+5
lvl += 5;
if(lock == null) {
if (lvl >= 1000) {
lvl += 1;
} else if (defender.properties().contains(Char.Property.BOSS) && defender.HP <= damage && lvl <= 1000) {
//目标Boss血量小于实际伤害判定为死亡,+9
lvl += 9;
} else if (defender.properties().contains(Char.Property.MINIBOSS) && defender.HP <= damage && lvl <= 1000) {
//目标迷你Boss血量小于实际伤害判定为死亡,+7
lvl += 7;
} else if (defender.HP <= damage && lvl <= 1000) {
//目标血量小于实际伤害判定为死亡,+5
lvl += 5;
}
}
if (lvl>= 900) {

View File

@ -95,7 +95,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTransmutat
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfUpgrade;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.exotic.ScrollOfRoseShiled;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlastWave;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorrosion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfCorruption;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfDisintegration;

View File

@ -161,9 +161,12 @@ public enum Document {
//given in prison
ALCHEMY_GUIDE.pagesStates.put("Bombs", debug ? READ : NOT_FOUND);
ALCHEMY_GUIDE.pagesStates.put("Weapons", debug ? READ : NOT_FOUND);
ALCHEMY_GUIDE.pagesStates.put("Catalysts", debug ? READ : NOT_FOUND);
ALCHEMY_GUIDE.pagesStates.put("Brews_Elixirs", debug ? READ : NOT_FOUND);
ALCHEMY_GUIDE.pagesStates.put("Spells", debug ? READ : NOT_FOUND);
ALCHEMY_GUIDE.pagesStates.put("Wands", debug ? READ : NOT_FOUND);
}
private static final String DOCUMENTS = "documents";

View File

@ -135,7 +135,7 @@ public class AncientMysteryCityBossLevel extends Level{
private static final short S = Terrain.BOOKSHELF;
private static final short A = Terrain.EXIT;
private static final short A = Terrain.WATER;
private static final int[] WorldRoomShort = {
L,L,L,L,L,L,L,L,L,L,L,L,W,W,W,L,L,L,L,L,L,L,L,L,L,L,L,
@ -242,7 +242,7 @@ public class AncientMysteryCityBossLevel extends Level{
}
}
GLog.w(String.valueOf(hero.pos));
//GLog.w(String.valueOf(hero.pos));
}

View File

@ -28,8 +28,11 @@ import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import java.text.DecimalFormat;
import java.text.DecimalFormatSymbols;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.IllegalFormatException;
import java.util.Locale;
@ -195,4 +198,13 @@ public class Messages {
//Otherwise, use sentence case
return capitalize(str);
}
private static HashMap<String, DecimalFormat> formatters = new HashMap<>();
public static String decimalFormat( String format, double number ){
if (!formatters.containsKey(format)){
formatters.put(format, new DecimalFormat(format, DecimalFormatSymbols.getInstance(Locale.ENGLISH)));
}
return formatters.get(format).format(number);
}
}

View File

@ -174,7 +174,7 @@ public class GameScene extends PixelScene {
);
}
static GameScene scene;
public static GameScene scene;
private SkinnedBlock water;
private DungeonTerrainTilemap tiles;
@ -495,25 +495,19 @@ public class GameScene extends PixelScene {
break;
}
} else {
Banner mapnameSlain = new Banner( BannerSprites.get( BannerSprites.Type.NULL ) );
switch (Dungeon.depth) {
case 0:
WndStory.showChapter( WndStory.ID_FOREST );
break;
case 1:
WndStory.showChapter( WndStory.ID_SEWERS );
mapnameSlain.texture( "interfaces/mapname/forest.png" );
mapnameSlain.show( 0x00FF00, 0.6f, 3f );
scene.showBanner( mapnameSlain );
break;
case 5:
WndStory.showChapter( WndStory.ID_SEWERSBOSS );
break;
case 6:
WndStory.showChapter( WndStory.ID_PRISON );
mapnameSlain.texture( "interfaces/mapname/prison.png" );
mapnameSlain.show( Window.MLPD_COLOR, 0.6f, 3f );
scene.showBanner( mapnameSlain );
break;
case 10:
if((Statistics.boss_enhance & 0x2) != 0 || Statistics.mimicking) {
@ -524,21 +518,12 @@ public class GameScene extends PixelScene {
break;
case 11:
WndStory.showChapter( WndStory.ID_CAVES );
mapnameSlain.texture( "interfaces/mapname/caves.png" );
mapnameSlain.show( Window.Pink_COLOR, 0.6f, 3f );
scene.showBanner( mapnameSlain );
break;
case 16:
WndStory.showChapter( WndStory.ID_CITY );
mapnameSlain.texture( "interfaces/mapname/dwarf.png" );
mapnameSlain.show( Window.CBLACK, 0.6f, 3f );
scene.showBanner( mapnameSlain );
break;
case 21:
WndStory.showChapter( WndStory.ID_HALLS );
mapnameSlain.texture( "interfaces/mapname/halls.png" );
mapnameSlain.show( Window.RED_COLOR, 0.6f, 3f );
scene.showBanner( mapnameSlain );
break;
case 26:
WndStory.showChapter( WndStory.ID_CHAPTONEEND );
@ -1073,6 +1058,24 @@ public class GameScene extends PixelScene {
addToFront( banner );
}
public void showLogo(Banner banner) {
banner.camera = uiCamera;
float offset = Camera.main.centerOffset.y;
banner.x = align(uiCamera, (uiCamera.width - banner.width) / 2);
banner.y = align(uiCamera, (uiCamera.height - banner.height) / 2 - banner.height / 2 - 16 - offset);
// 修改代码开始
if (banner.width > uiCamera.width) {
banner.scale.set(uiCamera.width / banner.width * (landscape()? 0.35f:0.65f));
banner.x = align(uiCamera.width / banner.width * 0.25f * banner.width / 2);
banner.y = uiCamera.width / banner.width * 0.25f * banner.width / 2;
}
// 修改代码结束
addToFront(banner);
}
// -------------------------------------------------------

View File

@ -83,9 +83,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.spells.WildEnergy;
import com.shatteredpixel.shatteredpixeldungeon.items.stones.Runestone;
import com.shatteredpixel.shatteredpixeldungeon.items.stones.StoneOfBlink;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfFireblast;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfLightning;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfBlueFuck;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.hightwand.WandOfHightHunderStorm;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.BloodthirstyThorn;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.IceFishSword;
@ -329,10 +329,6 @@ public class QuickRecipe extends Component {
result.add(new QuickRecipe( new PotionOfNoWater.Recipe(),
new ArrayList<Item>(Arrays.asList(new Blindweed.Seed(), new Firebloom.Seed())),
new PotionOfNoWater()));
result.add(new QuickRecipe( new IceFishSword.Recipe(),
new ArrayList<Item>(Arrays.asList(new FrozenCarpaccio(), new MagicalInfusion(),
new AlchemicalCatalyst())),
new IceFishSword()));
result.add(null);
result.add(new QuickRecipe( new Blandfruit.CookFruit(),
new ArrayList<>(Arrays.asList(new Blandfruit(), new Plant.Seed.PlaceHolder())),
@ -363,14 +359,6 @@ public class QuickRecipe extends Component {
ArrayList<Item> in = new ArrayList<>(Arrays.asList(scroll));
result.add(new QuickRecipe( r, in, r.sampleOutput(in)));
}
result.add(new QuickRecipe( new ScrollOfFlameCursed.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLiquidFlame(), new ScrollOfTerror(),
new PotionOfFrost())),
new ScrollOfFlameCursed().quantity(2)));
result.add(new QuickRecipe( new ScrollOfRoseShiled.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfPurity(), new AlchemicalCatalyst(),
new StoneOfBlink())),
new ScrollOfRoseShiled().quantity(3)));
return result;
case 5:
r = new Bomb.EnhanceBomb();
@ -401,20 +389,6 @@ public class QuickRecipe extends Component {
result.add(new QuickRecipe( new ArcaneResin.Recipe(),
new ArrayList<Item>(Arrays.asList(new Wand.PlaceHolder())),
new ArcaneResin()));
result.add(new QuickRecipe( new WandOfBlueFuck.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLiquidFlameX(), new WandOfFireblast(),
new CrivusFruitsFlake())),
new WandOfBlueFuck()));
result.add(new QuickRecipe( new WandOfHightHunderStorm.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLightningShiledX(),
new WandOfLightning(),
new CrivusFruitsFlake())),
new WandOfHightHunderStorm()));
result.add(new QuickRecipe( new BloodthirstyThorn.Recipe(),
new ArrayList<Item>(Arrays.asList(new MetalShard(),
new ChaliceOfBlood.PlaceHolder(),
new LifeTreeSword.PlaceHolder())),
new BloodthirstyThorn()));
return result;
case 7:
result.add(new QuickRecipe(new AlchemicalCatalyst.Recipe(), new ArrayList<>(Arrays.asList(new Potion.PlaceHolder(), new Plant.Seed.PlaceHolder())), new AlchemicalCatalyst()));
@ -455,6 +429,39 @@ public class QuickRecipe extends Component {
result.add(new QuickRecipe(new CurseInfusion.Recipe()));
result.add(new QuickRecipe(new Recycle.Recipe()));
return result;
case 10:
result.add(new QuickRecipe( new WandOfBlueFuck.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLiquidFlameX(),
new WandOfFireblast.PlaceHolderX(),
new CrivusFruitsFlake())),
new WandOfBlueFuck()));
result.add(new QuickRecipe( new WandOfHightHunderStorm.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLightningShiledX(),
new WandOfLightning.PlaceHolderX(),
new CrivusFruitsFlake())),
new WandOfHightHunderStorm()));
result.add(null);
result.add(null);
result.add(new QuickRecipe( new ScrollOfFlameCursed.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfLiquidFlame(), new ScrollOfTerror(),
new PotionOfFrost())),
new ScrollOfFlameCursed().quantity(2)));
result.add(new QuickRecipe( new ScrollOfRoseShiled.Recipe(),
new ArrayList<Item>(Arrays.asList(new PotionOfPurity(), new AlchemicalCatalyst(),
new StoneOfBlink())),
new ScrollOfRoseShiled().quantity(3)));
result.add(null);
result.add(null);
result.add(new QuickRecipe( new BloodthirstyThorn.Recipe(),
new ArrayList<Item>(Arrays.asList(new MetalShard(),
new ChaliceOfBlood.PlaceHolder(),
new LifeTreeSword.PlaceHolder())),
new BloodthirstyThorn()));
result.add(new QuickRecipe( new IceFishSword.Recipe(),
new ArrayList<Item>(Arrays.asList(new FrozenCarpaccio(), new MagicalInfusion(),
new AlchemicalCatalyst())),
new IceFishSword()));
return result;
}
}

View File

@ -13,6 +13,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.ClearElementalSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdGuardSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ColdRatSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CrivusFruitsSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300AttackSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300SpiderSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM300Sprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.DM720Sprite;
@ -22,6 +23,7 @@ import com.shatteredpixel.shatteredpixeldungeon.sprites.FireCrystalSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.FlameBoiSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.IceFireScorpioSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.IceSlowGirlSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.IceStalSprites;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
@ -34,6 +36,7 @@ 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.RedNecromancerSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.RedSwarmSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.SRPDHBLRTT;
import com.shatteredpixel.shatteredpixeldungeon.sprites.SakaFishBossSprites;
@ -56,6 +59,7 @@ import java.util.ArrayList;
public class vM0_6_7_X_Changes {
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
add_v0_6_56_Changes(changeInfos);
add_v0_6_55_Changes(changeInfos);
add_v0_6_54_Changes(changeInfos);
add_v0_6_53_Changes(changeInfos);
@ -114,8 +118,32 @@ public class vM0_6_7_X_Changes {
add_v0_6_0_Changes(changeInfos);
}
public static void add_v0_6_56_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("Coming Soon V0.6.5.0", true, "");
changes.hardlight(Window.CBLACK);
changeInfos.add(changes);
changes.addButton(new ChangeButton(new RedNecromancerSprite(), ("BossRush2.0"),
("地牢发生了翻天覆地的改变,一切的矛头指向了死灵军团……")));
Image s = new DM300AttackSprite();
s.scale.set(PixelScene.align(0.74f));
changes.addButton(new ChangeButton(s, ("DM-ZERO"),
("时间在这里停止流动与DMZERO正面对决的即将到来")));
Image c = new IceSlowGirlSprites();
c.scale.set(PixelScene.align(0.74f));
changes.addButton(new ChangeButton(c, ("冰雪魔女重做"),
("石碑上记录了有关于她的一切,她的过去,她的现在,她的未来。而当你与她对峙时,你是否能够看清她的真实面目?")));
Image i = new Image("sprites/boss/fireDragon.png", 0, 0, 24, 24);
i.scale.set(PixelScene.align(0.74f));
changes.addButton(new ChangeButton(i, ("熔岩火龙"),
("丛林暴乱的真相")));
}
public static void add_v0_6_55_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.4.0-Beta2-6", true, "");
ChangeInfo changes = new ChangeInfo("v0.6.4.0-Beta2-7", true, "");
changes.hardlight(Window.TITLE_COLOR);
changeInfos.add(changes);
@ -123,6 +151,23 @@ public class vM0_6_7_X_Changes {
changes.hardlight(Window.GREEN_COLOR);
changeInfos.add(changes);
changes.addButton(new ChangeButton((new Image("Ling.png", 0, 0, 16, 16)), ("开发者的话"),
("你好,我应该有很久没有写开发者的话了。近期,真的很忙。\n" +
"我只有晚上更新一会魔绫,但总会熬夜到很晚。\n" +
"再这样下去,不清楚还能如此坚持多久。\n" +
"我想,我需要休息一下。\n" +
"并且降低更新频率,我想现在魔绫的更新速度已经太快了\n"+
"所以后面的更新,可能会慢一点。\n"+
"还是希望各位能玩的愉快吧,毕竟,人总是不能在虚拟世界里生活的。\n" +
"现实仍然有很多东西,我是时候调节一下了。\n"+
"那么还是祝各位游戏中冒险愉快吧!")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.ALCH_PAGE), ("炼金界面优化"),
("炼金指南进行优化。")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.RING_DIAMOND), ("财富之戒"),
("财富戒指同步为破碎。")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.FIREFISHSWORD), ("尚方宝剑"),
("尚方宝剑属性重新优化,并且拥有两个形态的弱切换。具体怎么切换,看你们自己探索了")));
@ -133,7 +178,7 @@ public class vM0_6_7_X_Changes {
("现在追加一个使用全部升级卷轴的按钮")));
changes.addButton(new ChangeButton(Icons.get(Icons.DISPLAY), ("游戏内区域文本"),
("现在每个大区有区域文本,给各位更加身临其境的感觉")));
("现在每个大区有区域文本,给各位更加身临其境的感觉")));
Image a = new SakaFishBossSprites();
a.scale.set(PixelScene.align(0.72f));
@ -153,6 +198,9 @@ public class vM0_6_7_X_Changes {
changes.addButton(new ChangeButton(Icons.get(Icons.CHALLENGE_ON), ("支离破碎"),
("支离破碎进行了一些怪组优化")));
changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("杂项修改"),
("添加Boss专武保底机制连续三局未获得下次必定获得")));
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSHIELD), ("5阶武器"),
("现在5阶武器生成平均化")));

View File

@ -356,9 +356,9 @@ public class WndJournal extends WndTabbed {
public static class AlchemyTab extends Component {
private RedButton[] pageButtons;
private static final int NUM_BUTTONS = 10;
private static final int NUM_BUTTONS = 11;
private static final int[] spriteIndexes = {10, 12, 7, 9, 11, 8, 3, 13, 14, 15};
private static final int[] spriteIndexes = {10, 12, 7, 9, 11, 8, 3, 13, 14, 15, 4};
public static int currentPageIdx = -1;
@ -403,25 +403,25 @@ public class WndJournal extends WndTabbed {
protected void layout() {
super.layout();
if (PixelScene.landscape()){
float buttonWidth = width()/pageButtons.length;
if (PixelScene.landscape()) {
float buttonWidth = width() / pageButtons.length;
for (int i = 0; i < NUM_BUTTONS; i++) {
pageButtons[i].setRect(i*buttonWidth, 0, buttonWidth, ITEM_HEIGHT);
pageButtons[i].setRect(i * buttonWidth, 0, buttonWidth, ITEM_HEIGHT);
PixelScene.align(pageButtons[i]);
}
} else {
//for first row
float buttonWidth = width()/5;
// 计算每行按钮的数量和每个按钮的宽度
int buttonsPerRow = 5;
float buttonWidth = width() / buttonsPerRow;
float y = 0;
float x = 0;
for (int i = 0; i < NUM_BUTTONS; i++) {
pageButtons[i].setRect(x, y, buttonWidth, ITEM_HEIGHT);
PixelScene.align(pageButtons[i]);
x += buttonWidth;
if (i == 4){
if ((i + 1) % buttonsPerRow == 0) { // 当达到每行按钮的数量时换行
y += ITEM_HEIGHT;
x = 0;
buttonWidth = width()/5;
}
}
}

View File

@ -26,8 +26,10 @@ import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive;
import static com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero.badLanterFire;
import static com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero.goodLanterFire;
import static com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene.scene;
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
import com.shatteredpixel.shatteredpixeldungeon.Conducts;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessAnmy;
@ -36,10 +38,12 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessMixShiled;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessMobDied;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.ClearBleesdGoodBuff.BlessNoMoney;
import com.shatteredpixel.shatteredpixeldungeon.effects.BannerSprites;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.WandOfAnmy;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.ui.Banner;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@ -182,6 +186,44 @@ public class WndStory extends Window {
}
}
@Override
public void hide() {
super.hide();
Banner mapnameSlain = new Banner( BannerSprites.get( BannerSprites.Type.NULL ) );
if(!Dungeon.isDLC(Conducts.Conduct.BOSSRUSH)){
switch (Dungeon.depth) {
case 1:
mapnameSlain.texture( "interfaces/mapname/forest.png" );
mapnameSlain.show( Window.GREEN_COLOR, 0.6f, 3f );
scene.showLogo( mapnameSlain );
break;
case 6:
mapnameSlain.texture( "interfaces/mapname/prison.png" );
mapnameSlain.show( Window.BLUE_COLOR, 0.6f, 3f );
scene.showLogo( mapnameSlain );
break;
case 11:
mapnameSlain.texture( "interfaces/mapname/caves.png" );
mapnameSlain.show( Window.MLPD_COLOR, 0.6f, 3f );
scene.showLogo( mapnameSlain );
break;
case 16:
mapnameSlain.texture( "interfaces/mapname/dwarf.png" );
mapnameSlain.show( Window.CBLACK, 0.6f, 3f );
scene.showLogo( mapnameSlain );
break;
case 21:
mapnameSlain.texture( "interfaces/mapname/halls.png" );
mapnameSlain.show( Window.GDX_COLOR, 0.6f, 3f );
scene.showLogo( mapnameSlain );
break;
}
}
}
public static void showChapter( int id ) {
if (Dungeon.chapters.contains( id )) {
@ -190,18 +232,16 @@ public class WndStory extends Window {
String text = Messages.get(WndStory.class, CHAPTERS.get( id ));
if (text != null) {
WndStory wnd = new WndStory( text );
WndStory wnd = new WndStory(text);
if ((wnd.delay = 0.6f) > 0) {
wnd.shadow.visible = wnd.chrome.visible = wnd.tf.visible = false;
if (wnd.ttl != null) wnd.ttl.visible = false;
}
Game.scene().add( wnd );
Game.scene().add(wnd);
lanterfireRoll();
Dungeon.chapters.add( id );
Dungeon.chapters.add(id);
}
}
public static void lanterfireRoll(){