Update Beta4.6-V0.6.3.0

This commit is contained in:
LingASDJ 2023-07-08 02:36:45 +08:00
parent 0e591b9505
commit fcaf22419c
35 changed files with 749 additions and 176 deletions

View File

@ -17,8 +17,8 @@ allprojects {
appName = 'Magic Ling Pixel Dungeon' appName = 'Magic Ling Pixel Dungeon'
appPackageName = 'com.ansdomagiclingpixeldungeon.ling' appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
appVersionCode =900910 appVersionCode =900921
appVersionName = '0.6.3.0-Beta4.0' appVersionName = '0.6.3.0-Beta4.6'
appJavaCompatibility = JavaVersion.VERSION_11 appJavaCompatibility = JavaVersion.VERSION_11

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -794,7 +794,7 @@ actors.buffs.superfire.desc=没什么比被火焰吞没更痛苦了。 \n\n更
actors.mobs.molotovhuntsman.name = 血月火焰赏金猎人 actors.mobs.molotovhuntsman.name = 血月火焰赏金猎人
actors.mobs.molotovhuntsman.desc = 这是被地牢深处的魔绫的怒火感染的极其扭曲的赏金猎人,他们已经失去了理智,他们都有一把猩红血月剑来杀死每一个入侵者。 actors.mobs.molotovhuntsman.desc = 这是被地牢深处的魔绫的怒火感染的极其扭曲的赏金猎人,他们已经失去了理智,他们都有一把猩红血月剑来杀死每一个入侵者。
actors.mobs.molohr.name = 血月火焰赏金猎人长老 actors.mobs.molohr.name = 血月赏金猎人长老
actors.mobs.molohr.desc = DM720的操控者快解决掉他。 actors.mobs.molohr.desc = DM720的操控者快解决掉他。
actors.mobs.molohr.notice = 你是谁!? actors.mobs.molohr.notice = 你是谁!?

View File

@ -305,7 +305,7 @@ items.books.playbookslist.pinkrandombooks.desc=九月九日菊映山,登高远
items.books.playbookslist.pinkrandombooks.author=--作者:_Goo东西_ items.books.playbookslist.pinkrandombooks.author=--作者:_Goo东西_
items.books.playbookslist.deyizibooks.name=《我们是柏林联合》 items.books.playbookslist.deyizibooks.name=《我们是柏林联合》
items.books.playbookslist.deyizibooks.desc=在山的那边,海的那边,有一座小球场。\n球场里有一群纯粹到不敢相信的踢球的人他们就是柏林联合即使我们刚刚进去甲级联赛但是我们有一往无前的气势。\n旅行者愿柏林联合的钢铁意志保佑你。 items.books.playbookslist.deyizibooks.desc=在山的那边,海的那边,有一座小球场。\n球场里有一群纯粹到不敢相信的踢球的人他们就是柏林联合即使我们刚刚进去甲级联赛但是我们有一往无前的气势。\n旅行者愿柏林联合的钢铁意志保佑你。
items.books.playbookslist.deyizibooks.author=--作者:_Pedro_ items.books.playbookslist.deyizibooks.author=--作者:_Pedro_
items.mainbooks.mustread=书本的厚重感让你不敢轻易翻开,但若是不翻开,你将无法获得它的力量。 items.mainbooks.mustread=书本的厚重感让你不敢轻易翻开,但若是不翻开,你将无法获得它的力量。
@ -814,18 +814,20 @@ items.artifacts.sandalsofnature.name_2=自然之靴
items.artifacts.sandalsofnature.name_3=自然护腿 items.artifacts.sandalsofnature.name_3=自然护腿
items.artifacts.sandalsofnature.ac_feed=喂食 items.artifacts.sandalsofnature.ac_feed=喂食
items.artifacts.sandalsofnature.ac_root=扎根 items.artifacts.sandalsofnature.ac_root=扎根
items.artifacts.sandalsofnature.no_charge=它们现在还没有能量。
items.artifacts.sandalsofnature.prompt=选择一个种子 items.artifacts.sandalsofnature.prompt=选择一个种子
items.artifacts.sandalsofnature.already_fed=你的鞋子已经从这种种子里中获取过营养了。
items.artifacts.sandalsofnature.levelup=你的鞋子尺寸变大了! items.artifacts.sandalsofnature.levelup=你的鞋子尺寸变大了!
items.artifacts.sandalsofnature.absorb_seed=鞋子吸收了种子,看起来更健康了。 items.artifacts.sandalsofnature.absorb_seed=鞋子吸收了种子,看起来更健康了。
items.artifacts.sandalsofnature.no_effect=你必须先给你的鞋子喂食一个种子。
items.artifacts.sandalsofnature.low_charge=你的鞋子还没有足够的能量。
items.artifacts.sandalsofnature.prompt_target=选择一个位置
items.artifacts.sandalsofnature.out_of_range=那个位置超出了范围。
items.artifacts.sandalsofnature.desc_1=初看像是用麻绳编成的凉鞋实际上是两株植物!它们看上去既虚弱又苍白,也许它们需要一点营养? items.artifacts.sandalsofnature.desc_1=初看像是用麻绳编成的凉鞋实际上是两株植物!它们看上去既虚弱又苍白,也许它们需要一点营养?
items.artifacts.sandalsofnature.desc_2=这双鞋子已经长大了,现在更像是一双合脚的鞋。它们已经没那么苍白了,也许还可以进一步成长? items.artifacts.sandalsofnature.desc_2=这双鞋子已经长大了,现在更像是一双合脚的鞋。它们已经没那么苍白了,也许还可以进一步成长?
items.artifacts.sandalsofnature.desc_3=这两株植物又长大了。像是一双树皮制成的厚靴子。植物似乎已经恢复了它们的力量,但也许仍能进一步成长? items.artifacts.sandalsofnature.desc_3=这两株植物又长大了。像是一双树皮制成的厚靴子。植物似乎已经恢复了它们的力量,但也许仍能进一步成长?
items.artifacts.sandalsofnature.desc_4=植物们似乎已长到最大,就像是一对装甲护胫。这对深棕色护腿看上去仿如一棵非常坚毅的树。 items.artifacts.sandalsofnature.desc_4=植物们似乎已长到最大,就像是一对装甲护胫。这对深棕色护腿看上去仿如一棵非常坚毅的树。
items.artifacts.sandalsofnature.desc_hint=穿上这件神器时你感到更加亲近自然了。 items.artifacts.sandalsofnature.desc_hint=穿上这件神器时你感到更加亲近自然了。
items.artifacts.sandalsofnature.desc_cursed=被诅咒的鞋子切断了一切你与自然的联系。 items.artifacts.sandalsofnature.desc_cursed=被诅咒的鞋子切断了一切你与自然的联系。
items.artifacts.sandalsofnature.desc_ability=这双鞋已经获得了形成一种固定的天然装甲的能力,但它们需要充能。 items.artifacts.sandalsofnature.desc_ability=鞋子泛起你喂给它们的最后一粒种子颜色的涟漪。 它可以在地面上暂时扎根并在3格距离内的任意位置产生那种植物的效果。\n当前种子_%s_\n需要充能 _%d%%_
items.artifacts.sandalsofnature.desc_seeds=你已经给鞋子喂过了%d之种。 items.artifacts.sandalsofnature.desc_seeds=你已经给鞋子喂过了%d之种。
items.artifacts.talismanofforesight.name=先见护符 items.artifacts.talismanofforesight.name=先见护符

View File

@ -541,4 +541,6 @@ ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x76=-V0.6.3-Beta3.6\n1.修复PC端音
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x77=-V0.6.3-Beta4.0\n1.修复上个版本的一些遗漏错误\n2.修复水袋和提灯可以升级的错误 ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x77=-V0.6.3-Beta4.0\n1.修复上个版本的一些遗漏错误\n2.修复水袋和提灯可以升级的错误
ui.changelist.mlpd.vm0_6_7_x_changes.bug_06x78=-V0.6.3-Beta4.5\n1.修复护身符的错误\n2.修复一些严重错误\n3.修复粽子无法生成的问题且活动时间补偿到7月12号。
//ui.changelist.mlpd.vm0_5_x_changes.xxx// //ui.changelist.mlpd.vm0_5_x_changes.xxx//

View File

@ -62,7 +62,8 @@ windows.wndhero$statstab.icehp=寒冷
windows.wndsettings$helptab.reset=重设你的用户ID windows.wndsettings$helptab.reset=重设你的用户ID
windows.wndsettings$helptab.title=辅助功能 windows.wndsettings$helptab.title=辅助功能
windows.wndsettings$helptab.helpsettings=启用物品生成查询器 windows.wndsettings$helptab.helpsettings=查询器(开发者生效)
windows.wndsettings$helptab.atbsettings=生物UI显示实际数值
windows.wndkingshop.buy=购买 windows.wndkingshop.buy=购买
windows.wndkingshop.cancel=取消 windows.wndkingshop.cancel=取消

View File

@ -64,26 +64,10 @@ public class Conducts {
} }
} }
public String getDebugString(){
if (conducts.isEmpty()){
return "NULL";
}
StringBuilder str = new StringBuilder();
for (Conduct conduct : conducts){
str.append(conduct.name()).append(",");
}
str.delete(str.length() - 1, str.length());
return str.toString();
}
public boolean isConductedAtAll(){ public boolean isConductedAtAll(){
return !conducts.isEmpty(); return !conducts.isEmpty();
} }
public boolean oneConduct(){
return conducts.size() == 1;
}
public boolean isConducted(Conduct mask){ public boolean isConducted(Conduct mask){
return isConductedAtAll() && conducts.contains(mask); return isConductedAtAll() && conducts.contains(mask);
} }

View File

@ -134,6 +134,9 @@ public class SPDSettings extends GameSettings {
private static final String HelpSettings = "helpsettings"; private static final String HelpSettings = "helpsettings";
private static final String ATBSettings = "ATBsettings";
public static void fullscreen( boolean value ) { public static void fullscreen( boolean value ) {
put( KEY_FULLSCREEN, value ); put( KEY_FULLSCREEN, value );
@ -522,6 +525,14 @@ public class SPDSettings extends GameSettings {
return getBoolean(HelpSettings, false); return getBoolean(HelpSettings, false);
} }
public static void ATBSettings(boolean value) {
put( ATBSettings, value );
}
public static boolean ATBSettings() {
return getBoolean(ATBSettings, false);
}
public static boolean ClassSkin() { public static boolean ClassSkin() {
return getBoolean(KEY_SKIN, false); return getBoolean(KEY_SKIN, false);
} }

View File

@ -1053,7 +1053,8 @@ public abstract class Char extends Actor {
ELECTRIC ( new HashSet<Class>( Arrays.asList(WandOfLightning.class, Shocking.class, Potential.class, Electricity.class, ShockingDart.class, Elemental.ShockElemental.class )), ELECTRIC ( new HashSet<Class>( Arrays.asList(WandOfLightning.class, Shocking.class, Potential.class, Electricity.class, ShockingDart.class, Elemental.ShockElemental.class )),
new HashSet<Class>()), new HashSet<Class>()),
LARGE, LARGE,
IMMOVABLE; IMMOVABLE,
NPC;
private HashSet<Class> resistances; private HashSet<Class> resistances;
private HashSet<Class> immunities; private HashSet<Class> immunities;

View File

@ -54,6 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.CloakOfShadows;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.SandalsOfNature;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TalismanOfForesight;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.TimekeepersHourglass;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.WraithAmulet; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.WraithAmulet;
@ -66,7 +67,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.TestBooks;
import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.YellowSunBooks; import com.shatteredpixel.shatteredpixeldungeon.items.books.bookslist.YellowSunBooks;
import com.shatteredpixel.shatteredpixeldungeon.items.food.Food; import com.shatteredpixel.shatteredpixeldungeon.items.food.Food;
import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie; import com.shatteredpixel.shatteredpixeldungeon.items.food.MeatPie;
import com.shatteredpixel.shatteredpixeldungeon.items.food.RiceDumplings;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfExperience;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfHealing;
import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility; import com.shatteredpixel.shatteredpixeldungeon.items.potions.PotionOfInvisibility;
@ -108,6 +108,9 @@ import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.WornShortswor
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingKnife; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingKnife;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingStone; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.ThrowingStone;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.AikeLaier;
import com.shatteredpixel.shatteredpixeldungeon.plants.Firebloom;
import com.shatteredpixel.shatteredpixeldungeon.plants.SkyBlueFireBloom;
import com.watabou.utils.Random; import com.watabou.utils.Random;
public enum HeroClass { public enum HeroClass {
@ -153,12 +156,7 @@ public enum HeroClass {
if (Dungeon.isChallenged(Challenges.PRO)){ if (Dungeon.isChallenged(Challenges.PRO)){
new LockSword().quantity(1).identify().collect(); new LockSword().quantity(1).identify().collect();
new PotionOfInvisibility().quantity(45).identify().collect(); new PotionOfInvisibility().quantity(45).identify().collect();
new SandalsOfNature().quantity(1).identify().collect();
new RiceDumplings.RiceDumplingsRed().quantity(100).identify().collect();
new RiceDumplings.RiceDumplingsPink().quantity(100).identify().collect();
new RiceDumplings.RiceDumplingsOrange().quantity(100).identify().collect();
new RiceDumplings.RiceDumplingsLink().quantity(100).identify().collect();
new RiceDumplings.RiceDumplingsBottle().quantity(100).identify().collect();
new TimekeepersHourglass().quantity(1).identify().collect(); new TimekeepersHourglass().quantity(1).identify().collect();
@ -179,6 +177,10 @@ public enum HeroClass {
new TalismanOfForesight().quantity(1).identify().collect(); new TalismanOfForesight().quantity(1).identify().collect();
new MeatPie().quantity(100).identify().collect(); new MeatPie().quantity(100).identify().collect();
new SkyBlueFireBloom.Seed().quantity(51).identify().collect();
new AikeLaier.Seed().quantity(51).identify().collect();
new Firebloom.Seed().quantity(15).identify().collect();
new WandOfRegrowth().quantity(1).identify().collect(); new WandOfRegrowth().quantity(1).identify().collect();
new WandOfFrost().quantity(1).identify().collect(); new WandOfFrost().quantity(1).identify().collect();
new MagicalInfusion().quantity(1).identify().collect(); new MagicalInfusion().quantity(1).identify().collect();

View File

@ -21,6 +21,8 @@ public class BlackHost extends Mob {
this.EXP = 8; this.EXP = 8;
this.maxLvl = 15; this.maxLvl = 15;
this.flying = true; this.flying = true;
properties.add(Property.UNDEAD);
} }
public int attackProc(Char var1, int var2) { public int attackProc(Char var1, int var2) {

View File

@ -48,7 +48,7 @@ public class MoloHR extends Mob {
"这都是你的错!", "这都是你的错!",
"扬了你的骨灰!", "啊!", "烧死你"}; "扬了你的骨灰!", "啊!", "烧死你"};
this.combo = 0; this.combo = 0;
properties.add(Property.MINIBOSS); properties.add(Property.BOSS);
properties.add(Property.FIERY); properties.add(Property.FIERY);
} }

View File

@ -37,7 +37,7 @@ public class Rat extends Mob {
HP = HT = 8; HP = HT = 8;
defenseSkill = 2; defenseSkill = 2;
maxLvl = 5; maxLvl = 30;
} }
@Override @Override

View File

@ -21,7 +21,7 @@ public class Salamander extends Mob {
spriteClass = SalamanderSprites.class; spriteClass = SalamanderSprites.class;
EXP = 5; EXP = 5;
HP = HT = 5; HP = HT = 5;
defenseSkill = 24; defenseSkill = 25;
loot = Generator.Category.SEED; loot = Generator.Category.SEED;
lootChance = 0.05f; lootChance = 0.05f;

View File

@ -335,20 +335,17 @@ public class Ghost extends NPC {
itemLevel = 2; itemLevel = 2;
} else if (itemLevelRoll < 0.90f) { } else if (itemLevelRoll < 0.90f) {
itemLevel = 3; itemLevel = 3;
hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" );
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) { if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
Statistics.dageCollected = 1; Statistics.dageCollected = 1;
Badges.GhostDageCollected(); Badges.GhostDageCollected();
} }
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) { } else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) {
hero.sprite.showStatus(CharSprite.POSITIVE, "+4!!!");
if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) { if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) {
Statistics.dageCollected = 2; Statistics.dageCollected = 2;
Badges.GhostDageCollected(); Badges.GhostDageCollected();
} }
itemLevel = 4; itemLevel = 4;
} else { } else {
hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" );
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) { if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
Statistics.dageCollected = 1; Statistics.dageCollected = 1;
Badges.GhostDageCollected(); Badges.GhostDageCollected();

View File

@ -32,7 +32,7 @@ public abstract class NPC extends Mob {
{ {
HP = HT = 1; HP = HT = 1;
EXP = 0; EXP = 0;
properties.add(Property.NPC);
alignment = Alignment.NEUTRAL; alignment = Alignment.NEUTRAL;
state = PASSIVE; state = PASSIVE;
} }

View File

@ -88,7 +88,7 @@ import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
public class MobPlacer extends TestItem{ public class MobPlacer extends TestItem {
{ {
image = ItemSpriteSheet.CANDY_CANE; image = ItemSpriteSheet.CANDY_CANE;
defaultAction = AC_PLACE; defaultAction = AC_PLACE;

View File

@ -14,4 +14,6 @@ public class MainBooks extends Item {
return 20 * quantity; return 20 * quantity;
} }
public String author = Messages.get(MainBooks.class, "mustread"); public String author = Messages.get(MainBooks.class, "mustread");
public String authorx = Messages.get(this, "author");
} }

View File

@ -1,51 +1,52 @@
/*
* Pixel Dungeon
* Copyright (C) 2012-2015 Oleg Dolya
*
* Shattered Pixel Dungeon
* Copyright (C) 2014-2022 Evan Debenham
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*/
package com.shatteredpixel.shatteredpixeldungeon.items.artifacts; package com.shatteredpixel.shatteredpixeldungeon.items.artifacts;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Invisibility;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.MagicImmune;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent; import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Talent;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter; import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.EarthParticle; import com.shatteredpixel.shatteredpixeldungeon.effects.Splash;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.LeafParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy;
import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.AikeLaier;
import com.shatteredpixel.shatteredpixeldungeon.plants.Blindweed;
import com.shatteredpixel.shatteredpixeldungeon.plants.Dreamfoil;
import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot; import com.shatteredpixel.shatteredpixeldungeon.plants.Earthroot;
import com.shatteredpixel.shatteredpixeldungeon.plants.Fadeleaf;
import com.shatteredpixel.shatteredpixeldungeon.plants.Firebloom;
import com.shatteredpixel.shatteredpixeldungeon.plants.Icecap;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
import com.shatteredpixel.shatteredpixeldungeon.plants.Rotberry;
import com.shatteredpixel.shatteredpixeldungeon.plants.SkyBlueFireBloom;
import com.shatteredpixel.shatteredpixeldungeon.plants.Sorrowmoss;
import com.shatteredpixel.shatteredpixeldungeon.plants.Starflower;
import com.shatteredpixel.shatteredpixeldungeon.plants.Stormvine;
import com.shatteredpixel.shatteredpixeldungeon.plants.Sungrass;
import com.shatteredpixel.shatteredpixeldungeon.plants.Swiftthistle;
import com.shatteredpixel.shatteredpixeldungeon.scenes.CellSelector;
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag;
import com.watabou.noosa.Camera;
import com.watabou.noosa.audio.Sample; import com.watabou.noosa.audio.Sample;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.PointF;
import com.watabou.utils.Random;
import com.watabou.utils.Reflection;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.HashMap;
public class SandalsOfNature extends Artifact { public class SandalsOfNature extends Artifact {
@ -55,20 +56,68 @@ public class SandalsOfNature extends Artifact {
levelCap = 3; levelCap = 3;
charge = 0; charge = 0;
chargeCap = 100;
defaultAction = AC_ROOT;
} }
public static final String AC_FEED = "FEED"; public static final String AC_FEED = "FEED";
public static final String AC_ROOT = "ROOT"; public static final String AC_ROOT = "ROOT";
public ArrayList<Class> seeds = new ArrayList<>(); public ArrayList<Class> seeds = new ArrayList<>();
public Class curSeedEffect = null;
private static final HashMap<Class<? extends Plant.Seed>, Integer> seedColors = new HashMap<>();
static {
seedColors.put(Rotberry.Seed.class, 0xCC0022);
seedColors.put(Firebloom.Seed.class, 0xFF7F00);
seedColors.put(Swiftthistle.Seed.class, 0xCCBB00);
seedColors.put(Sungrass.Seed.class, 0x2EE62E);
seedColors.put(Icecap.Seed.class, 0x66B3FF);
seedColors.put(Stormvine.Seed.class, 0x195D80);
seedColors.put(Sorrowmoss.Seed.class, 0xA15CE5);
seedColors.put(AikeLaier.Seed.class, 0x4cd200);
seedColors.put(Earthroot.Seed.class, 0x67583D);
seedColors.put(Starflower.Seed.class, 0x404040);
seedColors.put(Fadeleaf.Seed.class, 0x919999);
seedColors.put(Blindweed.Seed.class, 0XD9D9D9);
seedColors.put(SkyBlueFireBloom.Seed.class, 0X00D9D9);
seedColors.put(Dreamfoil.Seed.class, 0Xff00ff);
}
private static final HashMap<Class<? extends Plant.Seed>, Integer> seedChargeReqs = new HashMap<>();
static {
seedChargeReqs.put(Rotberry.Seed.class, 8);
seedChargeReqs.put(Firebloom.Seed.class, 20);
seedChargeReqs.put(Swiftthistle.Seed.class, 20);
seedChargeReqs.put(Sungrass.Seed.class, 80);
seedChargeReqs.put(Icecap.Seed.class, 20);
seedChargeReqs.put(Stormvine.Seed.class, 20);
seedChargeReqs.put(Sorrowmoss.Seed.class, 20);
seedChargeReqs.put(AikeLaier.Seed.class, 24);
seedChargeReqs.put(Earthroot.Seed.class, 40);
seedChargeReqs.put(Starflower.Seed.class, 40);
seedChargeReqs.put(Fadeleaf.Seed.class, 12);
seedChargeReqs.put(Blindweed.Seed.class, 12);
seedChargeReqs.put(SkyBlueFireBloom.Seed.class, 20);
seedChargeReqs.put(Dreamfoil.Seed.class, 10);
}
@Override @Override
public ArrayList<String> actions( Hero hero ) { public ArrayList<String> actions( Hero hero ) {
ArrayList<String> actions = super.actions( hero ); ArrayList<String> actions = super.actions( hero );
if (isEquipped( hero ) && level() < 3 && !cursed) if (hero.buff(MagicImmune.class) != null){
return actions;
}
if (isEquipped( hero ) && !cursed) {
actions.add(AC_FEED); actions.add(AC_FEED);
if (isEquipped( hero ) && charge > 0) }
if (isEquipped( hero )
&& !cursed
&& curSeedEffect != null
&& charge >= seedChargeReqs.get(curSeedEffect)) {
actions.add(AC_ROOT); actions.add(AC_ROOT);
}
return actions; return actions;
} }
@ -76,22 +125,19 @@ public class SandalsOfNature extends Artifact {
public void execute( Hero hero, String action ) { public void execute( Hero hero, String action ) {
super.execute(hero, action); super.execute(hero, action);
if (hero.buff(MagicImmune.class) != null) return;
if (action.equals(AC_FEED)){ if (action.equals(AC_FEED)){
GameScene.selectItem(itemSelector); GameScene.selectItem(itemSelector);
} else if (action.equals(AC_ROOT) && level() > 0){ } else if (action.equals(AC_ROOT) && !cursed){
if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
else if (charge == 0) GLog.i( Messages.get(this, "no_charge") ); else if (curSeedEffect == null) GLog.i( Messages.get(this, "no_effect") );
else if (charge < seedChargeReqs.get(curSeedEffect)) GLog.i( Messages.get(this, "low_charge") );
else { else {
Buff.prolong(hero, Roots.class, Roots.DURATION); GameScene.selectCell(cellSelector);
Buff.affect(hero, Earthroot.Armor.class).level(charge,hero);
CellEmitter.bottom(hero.pos).start(EarthParticle.FACTORY, 0.05f, 8);
Camera.main.shake(1, 0.4f);
charge = 0;
Talent.onArtifactUsed(Dungeon.hero);
updateQuickslot();
} }
} }
} }
@ -100,12 +146,20 @@ public class SandalsOfNature extends Artifact {
protected ArtifactBuff passiveBuff() { protected ArtifactBuff passiveBuff() {
return new Naturalism(); return new Naturalism();
} }
@Override @Override
public void charge(Hero target, float amount) { public void charge(Hero target, float amount) {
target.buff(Naturalism.class).charge(amount); target.buff(Naturalism.class).charge(amount);
} }
@Override
public ItemSprite.Glowing glowing() {
if (curSeedEffect != null){
return new ItemSprite.Glowing(seedColors.get(curSeedEffect));
}
return null;
}
@Override @Override
public String name() { public String name() {
if (level() == 0) return super.name(); if (level() == 0) return super.name();
@ -116,16 +170,21 @@ public class SandalsOfNature extends Artifact {
public String desc() { public String desc() {
String desc = Messages.get(this, "desc_" + (level()+1)); String desc = Messages.get(this, "desc_" + (level()+1));
if ( isEquipped ( Dungeon.hero ) ){ if ( isEquipped ( Dungeon.hero ) ) {
desc += "\n\n"; desc += "\n\n";
if (!cursed) if (!cursed) {
desc += Messages.get(this, "desc_hint"); desc += Messages.get(this, "desc_hint");
else } else {
desc += Messages.get(this, "desc_cursed"); desc += Messages.get(this, "desc_cursed");
}
if (level() > 0) }
desc += "\n\n" + Messages.get(this, "desc_ability");
if (curSeedEffect != null){
desc += "\n\n" + Messages.get(this, "desc_ability",
Messages.titleCase(Messages.get(curSeedEffect, "name")),
seedChargeReqs.get(curSeedEffect));
} }
if (!seeds.isEmpty()){ if (!seeds.isEmpty()){
@ -145,23 +204,29 @@ public class SandalsOfNature extends Artifact {
} }
public boolean canUseSeed(Item item){ public boolean canUseSeed(Item item){
return item instanceof Plant.Seed && !seeds.contains(item.getClass()); return item instanceof Plant.Seed
&& !seeds.contains(item.getClass())
&& (level() < 3 || curSeedEffect != item.getClass());
} }
private static final String SEEDS = "seeds"; private static final String SEEDS = "seeds";
private static final String CUR_SEED_EFFECT = "cur_seed_effect";
@Override @Override
public void storeInBundle( Bundle bundle ) { public void storeInBundle( Bundle bundle ) {
super.storeInBundle(bundle); super.storeInBundle(bundle);
bundle.put(SEEDS, seeds.toArray(new Class[seeds.size()])); bundle.put(SEEDS, seeds.toArray(new Class[seeds.size()]));
bundle.put(CUR_SEED_EFFECT, curSeedEffect);
} }
@Override @Override
public void restoreFromBundle( Bundle bundle ) { public void restoreFromBundle( Bundle bundle ) {
super.restoreFromBundle(bundle); super.restoreFromBundle(bundle);
if (bundle.contains(SEEDS)) if (bundle.contains(SEEDS)) {
Collections.addAll(seeds , bundle.getClassArray(SEEDS)); Collections.addAll(seeds, bundle.getClassArray(SEEDS));
}
curSeedEffect = bundle.getClass(CUR_SEED_EFFECT);
if (level() == 1) image = ItemSpriteSheet.ARTIFACT_SHOES; if (level() == 1) image = ItemSpriteSheet.ARTIFACT_SHOES;
else if (level() == 2) image = ItemSpriteSheet.ARTIFACT_BOOTS; else if (level() == 2) image = ItemSpriteSheet.ARTIFACT_BOOTS;
else if (level() >= 3) image = ItemSpriteSheet.ARTIFACT_GREAVES; else if (level() >= 3) image = ItemSpriteSheet.ARTIFACT_GREAVES;
@ -169,16 +234,18 @@ public class SandalsOfNature extends Artifact {
public class Naturalism extends ArtifactBuff{ public class Naturalism extends ArtifactBuff{
public void charge(float amount) { public void charge(float amount) {
if (level() > 0 && charge < target.HT){ if (cursed || target.buff(MagicImmune.class) != null) return;
//gain 1+(1*level)% of the difference between current charge and max HP. if (charge < chargeCap){
float chargeGain = (target.HT-charge) * (.01f+ level()*0.01f); //0.5 charge per grass at +0, up to 1 at +10
float chargeGain = (3f + level())/6f;
chargeGain *= amount; chargeGain *= amount;
chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); chargeGain *= RingOfEnergy.artifactChargeMultiplier(target);
partialCharge += Math.max(0, chargeGain); partialCharge += Math.max(0, chargeGain);
while (partialCharge > 1){ while (partialCharge >= 1){
charge++; charge++;
partialCharge--; partialCharge--;
} }
charge = Math.min(charge, chargeCap);
updateQuickslot(); updateQuickslot();
} }
} }
@ -204,30 +271,65 @@ public class SandalsOfNature extends Artifact {
@Override @Override
public void onSelect( Item item ) { public void onSelect( Item item ) {
if (item != null && item instanceof Plant.Seed) { if (item != null && item instanceof Plant.Seed) {
if (seeds.contains(item.getClass())){ if (level() < 3) seeds.add(0, item.getClass());
GLog.w( Messages.get(SandalsOfNature.class, "already_fed") ); curSeedEffect = item.getClass();
} else {
seeds.add(item.getClass());
Hero hero = Dungeon.hero; Hero hero = Dungeon.hero;
hero.sprite.operate( hero.pos ); hero.sprite.operate( hero.pos );
Sample.INSTANCE.play( Assets.Sounds.PLANT ); Sample.INSTANCE.play( Assets.Sounds.PLANT );
hero.busy(); hero.busy();
hero.spend( 2f ); hero.spend( Actor.TICK );
if (seeds.size() >= 3+(level()*3)){ if (seeds.size() >= 3+(level()*3)){
seeds.clear(); seeds.clear();
upgrade(); upgrade();
if (level() >= 1 && level() <= 3) {
GLog.p( Messages.get(SandalsOfNature.class, "levelup") );
}
} else { if (level() >= 1 && level() <= 3) {
GLog.i( Messages.get(SandalsOfNature.class, "absorb_seed") ); GLog.p( Messages.get(SandalsOfNature.class, "levelup") );
} }
item.detach(hero.belongings.backpack);
} else {
GLog.i( Messages.get(SandalsOfNature.class, "absorb_seed") );
} }
item.detach(hero.belongings.backpack);
} }
} }
}; };
} protected CellSelector.Listener cellSelector = new CellSelector.Listener(){
@Override
public void onSelect(Integer cell) {
if (cell != null){
if (!Dungeon.level.heroFOV[cell] || Dungeon.level.distance(curUser.pos, cell) > 3){
GLog.w(Messages.get(SandalsOfNature.class, "out_of_range"));
} else {
Ballistica aim = new Ballistica(curUser.pos, cell, Ballistica.STOP_TARGET);
for (int c : aim.subPath(0, aim.dist)){
CellEmitter.get( c ).burst( LeafParticle.GENERAL, 6 );
}
Splash.at(DungeonTilemap.tileCenterToWorld( cell ), -PointF.PI/2, PointF.PI/2, seedColors.get(curSeedEffect), 6);
Invisibility.dispel(curUser);
Plant plant = ((Plant.Seed) Reflection.newInstance(curSeedEffect)).couch(cell, null);
plant.activate(Actor.findChar(cell));
Sample.INSTANCE.play(Assets.Sounds.PLANT);
Sample.INSTANCE.playDelayed(Assets.Sounds.TRAMPLE, 0.25f, 1, Random.Float( 0.96f, 1.05f ) );
charge -= seedChargeReqs.get(curSeedEffect);
Talent.onArtifactUsed(Dungeon.hero);
updateQuickslot();
curUser.spendAndNext(1f);
}
}
}
@Override
public String prompt() {
return Messages.get(SandalsOfNature.class, "prompt_target");
}
};
}

View File

@ -80,7 +80,7 @@ public class WraithAmulet extends Artifact {
exp += 5; exp += 5;
Buff.affect(Dungeon.hero, Invisibility.class, Invisibility.DURATION/2); Buff.affect(Dungeon.hero, Invisibility.class, Invisibility.DURATION/2);
GLog.p(Messages.get(this,"ghost")); GLog.p(Messages.get(this,"ghost"));
cooldown = 40 - (level / 2); cooldown = 30 - (level / 2);
charge--; charge--;
} else { } else {
GLog.i(Messages.get(this,"nochareup")); GLog.i(Messages.get(this,"nochareup"));
@ -159,7 +159,7 @@ public class WraithAmulet extends Artifact {
//I must add Complete WraithAmulet //I must add Complete WraithAmulet
//Ok,Ling will Complete WraithAmulet //Ok,Ling will Complete WraithAmulet
upgrade(); upgrade();
exp += level * 25; exp += level * 38;
GLog.p(Messages.get(this,"ghoststong")); GLog.p(Messages.get(this,"ghoststong"));
} }
} }

View File

@ -15,6 +15,11 @@ public class DimandBook extends Books {
unique = true; unique = true;
} }
@Override
public String info() {
return desc()+"\n\n"+authorx;
}
@Override @Override
public void execute(final Hero hero, String action) { public void execute(final Hero hero, String action) {
super.execute(hero, action); super.execute(hero, action);

View File

@ -9,4 +9,9 @@ public class DeYiZiBooks extends Books {
image = ItemSpriteSheet.DEBOOKS; image = ItemSpriteSheet.DEBOOKS;
unique = true; unique = true;
} }
@Override
public String info() {
return desc()+"\n\n"+authorx;
}
} }

View File

@ -8,4 +8,9 @@ public class MoneyMoreBooks extends Books {
image = ItemSpriteSheet.MONEYBOOKS; image = ItemSpriteSheet.MONEYBOOKS;
unique = true; unique = true;
} }
@Override
public String info() {
return desc()+"\n\n"+authorx;
}
} }

View File

@ -9,4 +9,9 @@ public class PinkRandomBooks extends Books {
image = ItemSpriteSheet.PINKBOOKS; image = ItemSpriteSheet.PINKBOOKS;
unique = true; unique = true;
} }
@Override
public String info() {
return desc()+"\n\n"+authorx;
}
} }

View File

@ -61,7 +61,7 @@ public class Sai extends MeleeWeapon {
//50x0.1+7x0.5+1=10+3.5+1=15 //50x0.1+7x0.5+1=10+3.5+1=15
if(attacker.HP >= attacker.HT){ if(attacker.HP >= attacker.HT){
GLog.p("血量已满!无法回血"); GLog.p("血量已满!无法回血");
} else if (Random.Float()<0.15f) { } else if (Random.Float()<0.35f) {
R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5); R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5);
attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5; attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5;
attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP")); attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP"));

View File

@ -111,16 +111,17 @@ public abstract class RegularLevel extends Level {
if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) if (calendar.get(Calendar.WEEK_OF_MONTH) == 1)
holiday = XMAS; holiday = XMAS;
break; break;
//6.10-7.10 //6.20-6.30
case Calendar.JUNE: case Calendar.JUNE:
if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ if (calendar.get(Calendar.DAY_OF_MONTH) >= 20 ){
holiday = Holiday.DWJ; holiday = Holiday.DWJ;
} else { } else {
holiday = Holiday.NONE; holiday = Holiday.NONE;
} }
break; break;
case Calendar.JULY: case Calendar.JULY:
if (calendar.get(Calendar.DAY_OF_MONTH) == 10 ){ int dayOfMonth = calendar.get(Calendar.DAY_OF_MONTH);
if(dayOfMonth <= 12){
holiday = Holiday.DWJ; holiday = Holiday.DWJ;
} else { } else {
holiday = Holiday.NONE; holiday = Holiday.NONE;

View File

@ -69,7 +69,7 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类
Messages.get(this, "title"), Messages.get(this, "title"),
Messages.get(this, "update"), Messages.get(this, "update"),
Messages.get(this, "continue"), Messages.get(this, "continue"),
7){ 3){
@Override @Override
public void hide() { public void hide() {
super.hide(); super.hide();

View File

@ -0,0 +1,167 @@
///*
// * Pixel Dungeon
// * Copyright (C) 2012-2015 Oleg Dolya
// *
// * Shattered Pixel Dungeon
// * Copyright (C) 2014-2023 Evan Debenham
// *
// * This program is free software: you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
// * the Free Software Foundation, either version 3 of the License, or
// * (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License
// * along with this program. If not, see <http://www.gnu.org/licenses/>
// */
//
//package com.shatteredpixel.shatteredpixeldungeon.scenes;
//
//import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
//import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
//import com.shatteredpixel.shatteredpixeldungeon.custom.SeedFinder;
//import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
//import com.shatteredpixel.shatteredpixeldungeon.ui.Archs;
//import com.shatteredpixel.shatteredpixeldungeon.ui.ExitButton;
//import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
//import com.shatteredpixel.shatteredpixeldungeon.ui.ScrollPane;
//import com.shatteredpixel.shatteredpixeldungeon.ui.Window;
//import com.shatteredpixel.shatteredpixeldungeon.windows.WndTextInput;
//import com.watabou.noosa.Camera;
//import com.watabou.noosa.ColorBlock;
//import com.watabou.noosa.Group;
//import com.watabou.noosa.ui.Component;
//
//import java.util.Arrays;
//
//public class SeedFindScene extends PixelScene {
// @Override
// public void create() {
// super.create();
//
// final float colWidth = 120;
// final float fullWidth = colWidth * (landscape() ? 2 : 1);
//
// int w = Camera.main.width;
// int h = Camera.main.height;
//
// Archs archs = new Archs();
// archs.setSize(w, h);
// add(archs);
//
// //darkens the arches
// add(new ColorBlock(w, h, 0x88000000));
//
// ScrollPane list = new ScrollPane(new Component());
// add(list);
//
// Component content = list.content();
// content.clear();
//
// ShatteredPixelDungeon.scene().addToFront(new WndTextInput(Messages.get(this, "title"), Messages.get(this, "body"), Messages.get(this, "initial_value"), 1000, true, Messages.get(this, "find"), Messages.get(HeroSelectScene.class, "custom_seed_clear")) {
// @Override
// public void onSelect(boolean positive, String text) {
// int floor = 31;
// boolean floorOption = false;
// String up_to_floor;
//
// up_to_floor = "floor end";
//
// String strFloor;
//
// strFloor = "floor";
//
// if (text.contains(up_to_floor)) {
// floorOption = true;
// String fl = text.split(strFloor)[0].trim();
// try {
// floor = Integer.parseInt(fl);
// } catch (
// NumberFormatException e) {
// }
// }
// if (positive && text != "") {
// String[] itemList = floorOption ? Arrays.copyOfRange(text.split("\n"), 1, text.split("\n").length) : text.split("\n");
//
// Component content = list.content();
// content.clear();
//
// CreditsBlock txt = new CreditsBlock(true, Window.TITLE_COLOR, new SeedFinder().findSeed(itemList, floor));
// txt.setRect((Camera.main.width - colWidth)/2f, 12, colWidth, 0);
// content.add(txt);
//
// content.setSize( fullWidth, txt.bottom()+10 );
//
// list.setRect( 0, 0, w, h );
// list.scrollTo(0, 0);
//
// } else {
// SPDSettings.customSeed("");
// ShatteredPixelDungeon.switchNoFade(TitleScene.class);
// }
// }
// });
//
// ExitButton btnExit = new ExitButton();
// btnExit.setPos(Camera.main.width - btnExit.width(), 0);
// add(btnExit);
//
// //fadeIn();
// }
//
// @Override
// protected void onBackPressed() {
// ShatteredPixelDungeon.switchScene(TitleScene.class);
// }
//
// private void addLine(float y, Group content) {
// ColorBlock line = new ColorBlock(Camera.main.width, 1, 0xFF333333);
// line.y = y;
// content.add(line);
// }
//
//
// public static class CreditsBlock extends Component {
//
// boolean large;
//
// RenderedTextBlock body;
//
// public CreditsBlock(boolean large, int highlight, String body) {
// super();
//
// this.large = large;
//
// this.body = PixelScene.renderTextBlock(body, 6);
// if (highlight != -1)
// this.body.setHightlighting(true, highlight);
// if (large)
// this.body.align(RenderedTextBlock.CENTER_ALIGN);
// add(this.body);
// }
//
// @Override
// protected void layout() {
// super.layout();
//
// float topY = top();
//
// if (large){
// body.maxWidth((int)width());
// body.setPos( x + (width() - body.width())/2f, topY);
// } else {
// topY += 1;
// body.maxWidth((int)width());
// body.setPos( x, topY);
// }
//
// topY += body.height();
//
// height = Math.max(height, topY - top());
// }
// }
//}

View File

@ -54,6 +54,7 @@ import java.util.ArrayList;
public class vM0_6_7_X_Changes { public class vM0_6_7_X_Changes {
public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) { public static void addAllChanges(ArrayList<ChangeInfo> changeInfos) {
add_v0_6_50_Changes(changeInfos);
add_v0_6_49_Changes(changeInfos); add_v0_6_49_Changes(changeInfos);
add_v0_6_48_Changes(changeInfos); add_v0_6_48_Changes(changeInfos);
add_v0_6_47_Changes(changeInfos); add_v0_6_47_Changes(changeInfos);
@ -106,6 +107,37 @@ public class vM0_6_7_X_Changes {
add_v0_6_0_Changes(changeInfos); add_v0_6_0_Changes(changeInfos);
} }
public static void add_v0_6_50_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta4.5-6", 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.ARTIFACT_SANDALS), ("自然之鞋同步"),
("同步为破碎的那种了。")));
changes.addButton(new ChangeButton(Icons.get(Icons.PREFS), ("生物UI迭代"),
("UI进行迭代感谢_大莲蓬头子_的建议与帮助。\n\n新UI参考说明\n第一排当前血量攻击速度掉落限制防御力\n第二排闪避概率移动速度生物属性攻击力。")));
changes.addButton(new ChangeButton(Icons.get(Icons.CHANGES), ("字母&数值评定"),
("现在血量不会立刻显示,但会进行字母评定。但如果你需要,你可以前往辅助设置中开启数值显示。")));
changes = new ChangeInfo("改动", false, null);
changes.hardlight(Window.CYELLOW);
changeInfos.add(changes);
changes.addButton(new ChangeButton(Icons.get(Icons.RANKINGS), ("排行榜进行了一些改进"),
("现在排行榜会显示你每局所在的挑战数量。")));
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_06X78")));
}
public static void add_v0_6_49_Changes( ArrayList<ChangeInfo> changeInfos ) { public static void add_v0_6_49_Changes( ArrayList<ChangeInfo> changeInfos ) {
ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta4.0", true, ""); ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta4.0", true, "");
changes.hardlight(Window.TITLE_COLOR); changes.hardlight(Window.TITLE_COLOR);

View File

@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.windows; package com.shatteredpixel.shatteredpixeldungeon.windows;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.HelpSettings; import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.HelpSettings;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive;
@ -239,7 +240,7 @@ public class WndHero extends WndTabbed {
}; };
add(buttonItem); add(buttonItem);
buttonItem.setRect(2, pos, WIDTH - 4, 16); buttonItem.setRect(2, pos, WIDTH - 4, 16);
if(HelpSettings()){ if(HelpSettings() && Dungeon.isChallenged(PRO)){
buttonItem.active = true; buttonItem.active = true;
} else { } else {
buttonItem.active = false; buttonItem.active = false;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2012-2015 Oleg Dolya * Copyright (C) 2012-2015 Oleg Dolya
* *
* Shattered Pixel Dungeon * Shattered Pixel Dungeon
* Copyright (C) 2014-2022 Evan Debenham * Copyright (C) 2014-2021 Evan Debenham
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -21,53 +21,168 @@
package com.shatteredpixel.shatteredpixeldungeon.windows; package com.shatteredpixel.shatteredpixeldungeon.windows;
import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.ATBSettings;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.SPDSettings;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIcon;
import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator;
import com.shatteredpixel.shatteredpixeldungeon.ui.HealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.HealthBar;
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock;
import com.watabou.noosa.ColorBlock;
import com.watabou.noosa.Image;
import com.watabou.noosa.ui.Component; import com.watabou.noosa.ui.Component;
public class WndInfoMob extends WndTitledMessage { public class WndInfoMob extends WndTitledMessage {
public WndInfoMob( Mob mob ) { public WndInfoMob( Mob mob ) {
super( new MobTitle( mob ), mob.info() ); super( new MobTitle( mob ), mob.info() );
} }
private static class MobTitle extends Component { private static class MobTitle extends Component {
private static final int GAP = 2; private static final int GAP = 2;
private CharSprite image; private final CharSprite image;
private RenderedTextBlock name; private final RenderedTextBlock name;
private RenderedTextBlock info; private final HealthBar health;
private RenderedTextBlock infoB; private final BuffIndicator buffs;
private HealthBar health;
private BuffIndicator buffs; public MobSixInfo mobSixInfo;
public MobTitle( Mob mob ) { private String DKLevel(Mob mob) {
if(mob.HT == 114514) { String level;
name = PixelScene.renderTextBlock(Messages.titleCase("??????"),6); if(mob.defenseSkill > 23){
level = "S";
} else if (mob.defenseSkill > 20) {
level = "A+";
} else if (mob.defenseSkill > 15) {
level = "A";
} else if (mob.defenseSkill > 10) {
level = "B+";
} else if (mob.defenseSkill > 5) {
level = "B";
} else if (mob.defenseSkill > 2) {
level = "C";
} else { } else {
name = PixelScene.renderTextBlock(Messages.titleCase(mob.name()) + "(" + mob.HP + "/" + mob.HT + ")", 6); level = "D";
} }
return level;
}
private String SPLevel(Mob mob) {
String level;
if(mob.speed() == 1){
level = "C";
} else if (mob.speed() >= 2) {
level = "S";
} else if (mob.speed() >= 1.5) {
level = "A+";
} else if (mob.speed() > 1.0) {
level = "A";
} else if (mob.speed() < 0.8) {
level = "D+";
} else if (mob.speed() < 0.5) {
level = "D";
} else {
level = "D-";
}
return level;
}
private String AttackDelayLevel(Mob mob) {
String level;
if(mob.attackDelay() == 1){
level = "C";
} else if (mob.attackDelay() <= 0.8) {
level = "B+";
} else if (mob.attackDelay() <= 0.6) {
level = "B";
} else if (mob.attackDelay() <= 0.5) {
level = "A";
} else if (mob.attackDelay() <= 0.4) {
level = "A+";
} else if (mob.attackDelay() <= 0.3) {
level = "S";
} else {
level = "D";
}
return level;
}
private String HPLevel(Mob mob) {
String level;
if(mob.HP>600){
level = "S+";
} else if (mob.HP>500){
level = "S";
} else if (mob.HP>400){
level = "S-";
} else if (mob.HP>100) {
level = "A+";
} else if (mob.HP>50) {
level = "A-";
} else if (mob.HP>40){
level = "B";
} else if (mob.HP>30){
level = "C";
} else if (mob.HP>20) {
level = "D";
} else if (mob.HP>10) {
level = "E";
} else if (mob.HP==1) {
level = "G";
} else {
level = "F";
}
return level;
}
private String ProName(Mob mob) {
String level;
if (mob.properties.contains(Char.Property.BOSS)){
level = "领袖";
} else if (mob.properties.contains(Char.Property.MINIBOSS)){
level = "精英";
} else if (mob.properties.contains(Char.Property.UNDEAD)){
level = "亡灵";
} else if (mob.properties.contains(Char.Property.DEMONIC)){
level = "恶魔";
} else if (mob.properties.contains(Char.Property.NPC)){
level = "中立";
} else if (mob.properties.contains(Char.Property.FIERY) || mob.properties.contains(Char.Property.ICY) || mob.properties.contains(Char.Property.ELECTRIC)){
level = "元素";
} else {
level = "普通";
}
return level;
}
private String MaxLevelName(Mob mob) {
String level;
if(Dungeon.hero.lvl <= mob.maxLvl || mob.properties.contains(Char.Property.BOSS) || mob.properties.contains(Char.Property.MINIBOSS)){
level = "可掉落";
} else {
level = "不掉落";
}
return level;
}
public MobTitle( Mob mob ) {
name = PixelScene.renderTextBlock( Messages.titleCase( mob.name() ), 9 );
name.hardlight( TITLE_COLOR ); name.hardlight( TITLE_COLOR );
add( name ); add( name );
info =
PixelScene.renderTextBlock( Messages.get( WndInfoMob.class,"dsinfo" )+mob.defenseSkill+"|"+Messages.get( WndInfoMob.class,"maxinfo" )+mob.maxLvl+"|"+Messages.get( WndInfoMob.class,"getexp" )+mob.damageRoll(), 5 );
info.hardlight( 0xffff00);
add( info );
infoB =
PixelScene.renderTextBlock( Messages.get( WndInfoMob.class,"itm" )+ ((double)Math.round(mob.lootChance()*10)/10)+"|"+Messages.get( WndInfoMob.class,"getspeed" )+((double)Math.round(mob.speed()*10)/10)+"|"+Messages.get( WndInfoMob.class,"shield" )+mob.drRoll(), 5 );
infoB.hardlight( 0xffff00);
add( infoB );
image = mob.sprite(); image = mob.sprite();
add( image ); add( image );
@ -75,13 +190,40 @@ public class WndInfoMob extends WndTitledMessage {
health.level(mob); health.level(mob);
add( health ); add( health );
buffs = new BuffIndicator(mob,false); buffs = new BuffIndicator( mob,false );
add( buffs ); add( buffs );
mobSixInfo = new MobSixInfo(mob);
add(mobSixInfo);
mobSixInfo.info1 = PixelScene.renderTextBlock((ATBSettings() ? String.valueOf(mob.HP) : HPLevel(mob)),6);
//String.valueOf((double)Math.round(mob.attackDelay() * 10) /10)
mobSixInfo.info2 = PixelScene.renderTextBlock(ATBSettings() ?
String.valueOf((double)Math.round(mob.attackDelay() * 10) /10) : AttackDelayLevel(mob),6);
mobSixInfo.info3 = PixelScene.renderTextBlock( ATBSettings() ? String.valueOf(mob.maxLvl) : MaxLevelName(mob),5);
mobSixInfo.info4 = PixelScene.renderTextBlock(String.valueOf(mob.drRoll()),6);
mobSixInfo.info5 = PixelScene.renderTextBlock(ATBSettings() ? String.valueOf(mob.defenseSkill) : DKLevel(mob),6);
mobSixInfo.info6 = PixelScene.renderTextBlock(ATBSettings() ?
String.valueOf((double)Math.round(mob.speed()*10)/10): SPLevel(mob),6);
mobSixInfo.info7 = PixelScene.renderTextBlock(ProName(mob),6);
mobSixInfo.info8 = PixelScene.renderTextBlock(String.valueOf(mob.damageRoll()),6);
add(mobSixInfo.info1);
add(mobSixInfo.info2);
add(mobSixInfo.info3);
add(mobSixInfo.info4);
add(mobSixInfo.info5);
add(mobSixInfo.info6);
add(mobSixInfo.info7);
add(mobSixInfo.info8);
} }
@Override @Override
protected void layout() { protected void layout() {
image.x = 0; image.x = 0;
image.y = Math.max( 0, name.height() + health.height() - image.height() ); image.y = Math.max( 0, name.height() + health.height() - image.height() );
@ -93,17 +235,107 @@ public class WndInfoMob extends WndTitledMessage {
health.setRect(image.width() + GAP, name.bottom() + GAP, w, health.height()); health.setRect(image.width() + GAP, name.bottom() + GAP, w, health.height());
info.setRect(image.width() + GAP, health.bottom() + GAP, w, info.height());
infoB.setRect(image.width() + GAP, info.bottom() + GAP, w, infoB.height());
buffs.setPos( buffs.setPos(
name.right() + GAP-1, name.right() + GAP-1,
name.bottom() - BuffIndicator.SIZE_SMALL-2 name.bottom() - BuffIndicator.SIZE_SMALL-2
); );
height = infoB.bottom(); height = health.bottom();
mobSixInfo.setPos(-5,Math.max(health.bottom(),image.height()+5));
mobSixInfo.layout();
height = mobSixInfo.bottom();
}
}
public static class MobSixInfo extends Component {
public Mob mob;
public ColorBlock colorBlock;
public Image image1;
public Image image2;
public Image image3;
public Image image4;
public Image image5;
public Image image6;
public Image image7;
public Image image8;
public RenderedTextBlock info1;
public RenderedTextBlock info2;
public RenderedTextBlock info3;
public RenderedTextBlock info4;
public RenderedTextBlock info5;
public RenderedTextBlock info6;
public RenderedTextBlock info7;
public RenderedTextBlock info8;
public float WIDTH = 120f;
public float GAP = 1f;
public MobSixInfo(Mob mob) {
this.mob = mob;
}
@Override
public void createChildren() {
super.createChildren();
colorBlock = new ColorBlock(1,1, SPDSettings.ClassUI() ? 0xFF555555 : 0xFF462d00);
add(colorBlock);
image1 = new BuffIcon(68, false);
image2 = new BuffIcon(69, false);
image3 = new BuffIcon(70, false);
image4 = new BuffIcon(71, false);
image5 = new BuffIcon(72, false);
image6 = new BuffIcon(73, false);
image7 = new BuffIcon(74, false);
image8 = new BuffIcon(75, false);
add(image1);
add(image2);
add(image3);
add(image4);
add(image5);
add(image6);
add(image7);
add(image8);
}
@Override
public void layout() {
colorBlock.x = 0;
colorBlock.y = y;
image1.x = image5.x = WIDTH * 0 / 4 + GAP;
image2.x = image6.x = WIDTH * 1 / 4 + GAP;
image3.x = image7.x = WIDTH * 2 / 4 + GAP;
image4.x = image8.x = WIDTH * 3 / 4 + GAP;
image1.y = image2.y = image3.y = image4.y = y + GAP;
image5.y = image6.y = image7.y = image8.y = (image1.y + image1.height() + GAP * 2);
info1.setPos((image2.x + image1.x + image1.width() - info1.width()) / 2,
image1.y + image1.height() / 2-info1.height()/2);
info2.setPos((image3.x + image2.x + image2.width() - info2.width()) / 2,image1.y + image1.height() / 2-info1.height()/2);
info3.setPos((image4.x + image3.x + image3.width() - info3.width()) / 2,image1.y + image1.height() / 2-info1.height()/2);
info4.setPos((WIDTH + image4.x + image4.width() - info4.width()) / 2,
image1.y + image1.height() / 2-info1.height()/2);
info5.setPos((image6.x + image5.x + image5.width() - info5.width()) / 2,image5.y + image5.height() / 2-info1.height()/2);
info6.setPos((image7.x + image6.x + image6.width() - info6.width()) / 2,image5.y + image5.height() / 2-info1.height()/2);
info7.setPos((image8.x + image7.x + image7.width() - info7.width()) / 2,image5.y + image5.height() / 2-info1.height()/2);
info8.setPos((WIDTH + image8.x + image8.width() - info8.width()) / 2,image5.y + image5.height() / 2-info1.height()/2);
colorBlock.size(WIDTH,2 * image8.height() + 4 * GAP);
height = 2 * image8.height() + 4 * GAP;
} }
} }
} }

View File

@ -1,5 +1,9 @@
package com.shatteredpixel.shatteredpixeldungeon.windows; package com.shatteredpixel.shatteredpixeldungeon.windows;
import static com.shatteredpixel.shatteredpixeldungeon.Challenges.STRONGER_BOSSES;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics; import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
@ -27,6 +31,7 @@ public class WndScoreBreakdown extends Window {
NumberFormat num = NumberFormat.getInstance(Locale.US); NumberFormat num = NumberFormat.getInstance(Locale.US);
pos = statSlot(this, Messages.get(this, "progress_title"), pos = statSlot(this, Messages.get(this, "progress_title"),
num.format(Statistics.progressScore), pos, Statistics.progressScore >= 50_000); num.format(Statistics.progressScore), pos, Statistics.progressScore >= 50_000);
pos = addInfo(this, Messages.get(this, "progress_desc"), pos); pos = addInfo(this, Messages.get(this, "progress_desc"), pos);
@ -49,11 +54,26 @@ public class WndScoreBreakdown extends Window {
if (Statistics.chalMultiplier > 1) { if (Statistics.chalMultiplier > 1) {
pos = statSlot(this, Messages.get(this, "challenge_multiplier"), Statistics.chalMultiplier + "x", pos, false); pos = statSlot(this, Messages.get(this, "challenge_multiplier"), Statistics.chalMultiplier + "x", pos, false);
} }
pos = statSlot(this, Messages.get(this, "total"), num.format(Statistics.totalScore), pos, false); pos = statSlot(this, Messages.get(this, "total"), num.format(Statistics.totalScore), pos, false);
int chCount = 0;
for (int ch : Challenges.MASKS){
if ((Dungeon.challenges & ch) != 0 && ch <= STRONGER_BOSSES) chCount++;
}
//评分系统 //评分系统
LevelChecker result = new LevelChecker(); LevelChecker result = new LevelChecker();
pos = statSlot(this, Messages.get(this, "total_level"), result.checkLevel(), pos, false);
if(chCount > 0){
pos = statSlot(this, Messages.get(this, "total_level"), ""+chCount+"x-"+result.checkLevel(), pos,
false);
} else {
pos = statSlot(this, Messages.get(this, "total_level"), result.checkLevel(), pos,
false);
}
resize(WIDTH, (int)pos); resize(WIDTH, (int)pos);

View File

@ -698,6 +698,8 @@ public class WndSettings extends WndTabbed {
ColorBlock sep1; ColorBlock sep1;
CheckBox LockFing; CheckBox LockFing;
CheckBox ATBSwitch;
// RedButton ResetButton; // RedButton ResetButton;
@Override @Override
@ -719,15 +721,15 @@ public class WndSettings extends WndTabbed {
LockFing.checked(SPDSettings.HelpSettings()); LockFing.checked(SPDSettings.HelpSettings());
add(LockFing); add(LockFing);
// ResetButton = new RedButton(Messages.get(this, "reset")) { ATBSwitch = new CheckBox( Messages.get(this, "atbsettings") ) {
// @Override @Override
// protected void onClick() { protected void onClick() {
// WndStartGame.showKeyInput(); super.onClick();
// } SPDSettings.ATBSettings(checked());
// }; }
// if(isAndroid()) { };
// add(ResetButton); ATBSwitch.checked(SPDSettings.ATBSettings());
// } add(ATBSwitch);
} }
@ -744,13 +746,13 @@ public class WndSettings extends WndTabbed {
if (width > 200){ if (width > 200){
LockFing.setRect(0, bottom, width, SLIDER_HEIGHT); LockFing.setRect(0, bottom, width, SLIDER_HEIGHT);
ATBSwitch.setRect(0, LockFing.bottom() + GAP, width, SLIDER_HEIGHT);
} else { } else {
LockFing.setRect(0, bottom + GAP, width, SLIDER_HEIGHT); LockFing.setRect(0, bottom + GAP, width, SLIDER_HEIGHT);
ATBSwitch.setRect(0, LockFing.bottom() + GAP, width, SLIDER_HEIGHT);
} }
height = LockFing.bottom(); height = ATBSwitch.bottom();
} }
} }

View File

@ -23,11 +23,7 @@ public class GameUpdateNews extends GameUpdateNewsService {
} }
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET); Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
if (preferHTTPS) { httpGet.setUrl("http://www.pd.qinyueqwq.top/ftp/pd/gamenews/gamenews.xml");
httpGet.setUrl("https://rust.coldmint.top/ftp/ling/json/gamenews.xml");
} else {
httpGet.setUrl("https://rust.coldmint.top/ftp/ling/json/gamenews.xml");
}
Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() { Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() {
@Override @Override
@ -51,7 +47,7 @@ public class GameUpdateNews extends GameUpdateNewsService {
article.URL = xmlArticle.getChildByName("link").getAttribute("href"); article.URL = xmlArticle.getChildByName("link").getAttribute("href");
if (!preferHTTPS) { if (!preferHTTPS) {
article.URL= article.URL.replace("https://", "http://"); article.URL= article.URL.replace("http://", "http://");
} }
article.DesktopURL = xmlArticle.getChildByName("kinl").getAttribute("href"); article.DesktopURL = xmlArticle.getChildByName("kinl").getAttribute("href");

View File

@ -45,11 +45,7 @@ public class ShatteredNews extends NewsService {
} }
Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET); Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET);
if (preferHTTPS) { httpGet.setUrl("http://www.pd.qinyueqwq.top/ftp/pd/news/news.xml");
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
} else {
httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml");
}
Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() { Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() {
@Override @Override
@ -71,7 +67,7 @@ public class ShatteredNews extends NewsService {
article.summary = xmlArticle.get("summary"); article.summary = xmlArticle.get("summary");
article.URL = xmlArticle.getChildByName("link").getAttribute("href"); article.URL = xmlArticle.getChildByName("link").getAttribute("href");
if (!preferHTTPS) { if (!preferHTTPS) {
article.URL = article.URL.replace("https://", "http://"); article.URL = article.URL.replace("http://", "http://");
} }
Pattern versionCodeMatcher = Pattern.compile("v[0-9]+"); Pattern versionCodeMatcher = Pattern.compile("v[0-9]+");