diff --git a/build.gradle b/build.gradle index 4d499b15d..36f77a2be 100644 --- a/build.gradle +++ b/build.gradle @@ -17,8 +17,8 @@ allprojects { appName = 'Magic Ling Pixel Dungeon' appPackageName = 'com.ansdomagiclingpixeldungeon.ling' - appVersionCode =900910 - appVersionName = '0.6.3.0-Beta4.0' + appVersionCode =900921 + appVersionName = '0.6.3.0-Beta4.6' appJavaCompatibility = JavaVersion.VERSION_11 diff --git a/core/src/main/assets/interfaces/buffs.png b/core/src/main/assets/interfaces/buffs.png index 3efa0ed50..6d3ca3eef 100644 Binary files a/core/src/main/assets/interfaces/buffs.png and b/core/src/main/assets/interfaces/buffs.png differ diff --git a/core/src/main/assets/messages/actors/actors.properties b/core/src/main/assets/messages/actors/actors.properties index be421ef04..0e523fda8 100644 --- a/core/src/main/assets/messages/actors/actors.properties +++ b/core/src/main/assets/messages/actors/actors.properties @@ -794,7 +794,7 @@ actors.buffs.superfire.desc=没什么比被火焰吞没更痛苦了。 \n\n更 actors.mobs.molotovhuntsman.name = 血月火焰赏金猎人 actors.mobs.molotovhuntsman.desc = 这是被地牢深处的魔绫的怒火感染的极其扭曲的赏金猎人,他们已经失去了理智,他们都有一把猩红血月剑来杀死每一个入侵者。 -actors.mobs.molohr.name = 血月火焰赏金猎人长老 +actors.mobs.molohr.name = 血月赏金猎人长老 actors.mobs.molohr.desc = DM720的操控者,快解决掉他。 actors.mobs.molohr.notice = 你是谁!? diff --git a/core/src/main/assets/messages/items/items.properties b/core/src/main/assets/messages/items/items.properties index d7728b07b..34b520047 100644 --- a/core/src/main/assets/messages/items/items.properties +++ b/core/src/main/assets/messages/items/items.properties @@ -305,7 +305,7 @@ items.books.playbookslist.pinkrandombooks.desc=九月九日菊映山,登高远 items.books.playbookslist.pinkrandombooks.author=--作者:_Goo东西_ 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.mainbooks.mustread=书本的厚重感让你不敢轻易翻开,但若是不翻开,你将无法获得它的力量。 @@ -814,18 +814,20 @@ items.artifacts.sandalsofnature.name_2=自然之靴 items.artifacts.sandalsofnature.name_3=自然护腿 items.artifacts.sandalsofnature.ac_feed=喂食 items.artifacts.sandalsofnature.ac_root=扎根 -items.artifacts.sandalsofnature.no_charge=它们现在还没有能量。 items.artifacts.sandalsofnature.prompt=选择一个种子 -items.artifacts.sandalsofnature.already_fed=你的鞋子已经从这种种子里中获取过营养了。 items.artifacts.sandalsofnature.levelup=你的鞋子尺寸变大了! 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_2=这双鞋子已经长大了,现在更像是一双合脚的鞋。它们已经没那么苍白了,也许还可以进一步成长? items.artifacts.sandalsofnature.desc_3=这两株植物又长大了。像是一双树皮制成的厚靴子。植物似乎已经恢复了它们的力量,但也许仍能进一步成长? items.artifacts.sandalsofnature.desc_4=植物们似乎已长到最大,就像是一对装甲护胫。这对深棕色护腿看上去仿如一棵非常坚毅的树。 items.artifacts.sandalsofnature.desc_hint=穿上这件神器时你感到更加亲近自然了。 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.talismanofforesight.name=先见护符 diff --git a/core/src/main/assets/messages/ui/ui.properties b/core/src/main/assets/messages/ui/ui.properties index 6d6a6c84e..b01d5dd6e 100644 --- a/core/src/main/assets/messages/ui/ui.properties +++ b/core/src/main/assets/messages/ui/ui.properties @@ -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_06x78=-V0.6.3-Beta4.5\n1.修复护身符的错误\n2.修复一些严重错误\n3.修复粽子无法生成的问题,且活动时间补偿到7月12号。 //ui.changelist.mlpd.vm0_5_x_changes.xxx// \ No newline at end of file diff --git a/core/src/main/assets/messages/windows/windows.properties b/core/src/main/assets/messages/windows/windows.properties index e7d25b7e3..9feb11e95 100644 --- a/core/src/main/assets/messages/windows/windows.properties +++ b/core/src/main/assets/messages/windows/windows.properties @@ -62,7 +62,8 @@ windows.wndhero$statstab.icehp=寒冷 windows.wndsettings$helptab.reset=重设你的用户ID windows.wndsettings$helptab.title=辅助功能 -windows.wndsettings$helptab.helpsettings=启用物品生成查询器 +windows.wndsettings$helptab.helpsettings=查询器(开发者生效) +windows.wndsettings$helptab.atbsettings=生物UI显示实际数值 windows.wndkingshop.buy=购买 windows.wndkingshop.cancel=取消 diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java index 68957c53e..3ef248416 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/Conducts.java @@ -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(){ return !conducts.isEmpty(); } - public boolean oneConduct(){ - return conducts.size() == 1; - } - public boolean isConducted(Conduct mask){ return isConductedAtAll() && conducts.contains(mask); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDSettings.java index 18b60e23e..557f65bbd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/SPDSettings.java @@ -134,6 +134,9 @@ public class SPDSettings extends GameSettings { private static final String HelpSettings = "helpsettings"; + + private static final String ATBSettings = "ATBsettings"; + public static void fullscreen( boolean value ) { put( KEY_FULLSCREEN, value ); @@ -522,6 +525,14 @@ public class SPDSettings extends GameSettings { 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() { return getBoolean(KEY_SKIN, false); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java index eb218e867..c125ecdaf 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/Char.java @@ -1053,7 +1053,8 @@ public abstract class Char extends Actor { ELECTRIC ( new HashSet( Arrays.asList(WandOfLightning.class, Shocking.class, Potential.class, Electricity.class, ShockingDart.class, Elemental.ShockElemental.class )), new HashSet()), LARGE, - IMMOVABLE; + IMMOVABLE, + NPC; private HashSet resistances; private HashSet immunities; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java index b004ffcac..cafa42b92 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/hero/HeroClass.java @@ -54,6 +54,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.LeatherArmor; import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.ChaliceOfBlood; 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.TimekeepersHourglass; 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.food.Food; 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.PotionOfHealing; 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.ThrowingStone; 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; public enum HeroClass { @@ -153,12 +156,7 @@ public enum HeroClass { if (Dungeon.isChallenged(Challenges.PRO)){ new LockSword().quantity(1).identify().collect(); new PotionOfInvisibility().quantity(45).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 SandalsOfNature().quantity(1).identify().collect(); new TimekeepersHourglass().quantity(1).identify().collect(); @@ -179,6 +177,10 @@ public enum HeroClass { new TalismanOfForesight().quantity(1).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 WandOfFrost().quantity(1).identify().collect(); new MagicalInfusion().quantity(1).identify().collect(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackHost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackHost.java index ce9cf8d28..977ea0142 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackHost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/BlackHost.java @@ -21,6 +21,8 @@ public class BlackHost extends Mob { this.EXP = 8; this.maxLvl = 15; this.flying = true; + + properties.add(Property.UNDEAD); } public int attackProc(Char var1, int var2) { diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MoloHR.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MoloHR.java index 4e7199cf7..fd68e21fe 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MoloHR.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/MoloHR.java @@ -48,7 +48,7 @@ public class MoloHR extends Mob { "这都是你的错!", "扬了你的骨灰!", "啊!", "烧死你"}; this.combo = 0; - properties.add(Property.MINIBOSS); + properties.add(Property.BOSS); properties.add(Property.FIERY); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java index f61eb48ca..c9c9b074a 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Rat.java @@ -37,7 +37,7 @@ public class Rat extends Mob { HP = HT = 8; defenseSkill = 2; - maxLvl = 5; + maxLvl = 30; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Salamander.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Salamander.java index 6d37825c0..5012537d0 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Salamander.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/Salamander.java @@ -21,7 +21,7 @@ public class Salamander extends Mob { spriteClass = SalamanderSprites.class; EXP = 5; HP = HT = 5; - defenseSkill = 24; + defenseSkill = 25; loot = Generator.Category.SEED; lootChance = 0.05f; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java index b3174268b..f25b6ad68 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/Ghost.java @@ -335,20 +335,17 @@ public class Ghost extends NPC { itemLevel = 2; } else if (itemLevelRoll < 0.90f) { itemLevel = 3; - hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" ); if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) { Statistics.dageCollected = 1; Badges.GhostDageCollected(); } } else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) { - hero.sprite.showStatus(CharSprite.POSITIVE, "+4!!!"); if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) { Statistics.dageCollected = 2; Badges.GhostDageCollected(); } itemLevel = 4; } else { - hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" ); if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) { Statistics.dageCollected = 1; Badges.GhostDageCollected(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java index 7ce13aaae..15bad14fb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/actors/mobs/npcs/NPC.java @@ -32,7 +32,7 @@ public abstract class NPC extends Mob { { HP = HT = 1; EXP = 0; - + properties.add(Property.NPC); alignment = Alignment.NEUTRAL; state = PASSIVE; } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java index 8b5fcde0f..9205abcd6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/custom/testmode/MobPlacer.java @@ -88,7 +88,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; -public class MobPlacer extends TestItem{ +public class MobPlacer extends TestItem { { image = ItemSpriteSheet.CANDY_CANE; defaultAction = AC_PLACE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java index 74909d4d0..3c0b00647 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/MainBooks.java @@ -14,4 +14,6 @@ public class MainBooks extends Item { return 20 * quantity; } public String author = Messages.get(MainBooks.class, "mustread"); + + public String authorx = Messages.get(this, "author"); } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java index 49ecc11ed..c655c0b2c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/SandalsOfNature.java @@ -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 - */ - package com.shatteredpixel.shatteredpixeldungeon.items.artifacts; import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Dungeon; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; -import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Roots; +import com.shatteredpixel.shatteredpixeldungeon.actors.Actor; +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.Talent; 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.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; import com.shatteredpixel.shatteredpixeldungeon.items.rings.RingOfEnergy; +import com.shatteredpixel.shatteredpixeldungeon.mechanics.Ballistica; 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.Fadeleaf; +import com.shatteredpixel.shatteredpixeldungeon.plants.Firebloom; +import com.shatteredpixel.shatteredpixeldungeon.plants.Icecap; 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.sprites.ItemSprite; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.tiles.DungeonTilemap; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; -import com.watabou.noosa.Camera; import com.watabou.noosa.audio.Sample; 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.Collections; +import java.util.HashMap; public class SandalsOfNature extends Artifact { @@ -55,20 +56,68 @@ public class SandalsOfNature extends Artifact { levelCap = 3; charge = 0; + chargeCap = 100; + + defaultAction = AC_ROOT; } public static final String AC_FEED = "FEED"; public static final String AC_ROOT = "ROOT"; public ArrayList seeds = new ArrayList<>(); + public Class curSeedEffect = null; + + private static final HashMap, 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, 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 public ArrayList actions( Hero hero ) { ArrayList 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); - if (isEquipped( hero ) && charge > 0) + } + if (isEquipped( hero ) + && !cursed + && curSeedEffect != null + && charge >= seedChargeReqs.get(curSeedEffect)) { actions.add(AC_ROOT); + } return actions; } @@ -76,22 +125,19 @@ public class SandalsOfNature extends Artifact { public void execute( Hero hero, String action ) { super.execute(hero, action); + if (hero.buff(MagicImmune.class) != null) return; + if (action.equals(AC_FEED)){ 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") ); - else if (charge == 0) GLog.i( Messages.get(this, "no_charge") ); + if (!isEquipped( hero )) GLog.i( Messages.get(Artifact.class, "need_to_equip") ); + 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 { - Buff.prolong(hero, Roots.class, Roots.DURATION); - 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(); + GameScene.selectCell(cellSelector); } } } @@ -100,12 +146,20 @@ public class SandalsOfNature extends Artifact { protected ArtifactBuff passiveBuff() { return new Naturalism(); } - + @Override public void charge(Hero target, float 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 public String name() { if (level() == 0) return super.name(); @@ -116,16 +170,21 @@ public class SandalsOfNature extends Artifact { public String desc() { String desc = Messages.get(this, "desc_" + (level()+1)); - if ( isEquipped ( Dungeon.hero ) ){ + if ( isEquipped ( Dungeon.hero ) ) { desc += "\n\n"; - if (!cursed) + if (!cursed) { desc += Messages.get(this, "desc_hint"); - else + } else { 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()){ @@ -145,23 +204,29 @@ public class SandalsOfNature extends Artifact { } 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 CUR_SEED_EFFECT = "cur_seed_effect"; @Override public void storeInBundle( Bundle bundle ) { super.storeInBundle(bundle); bundle.put(SEEDS, seeds.toArray(new Class[seeds.size()])); + bundle.put(CUR_SEED_EFFECT, curSeedEffect); } @Override public void restoreFromBundle( Bundle bundle ) { super.restoreFromBundle(bundle); - if (bundle.contains(SEEDS)) - Collections.addAll(seeds , bundle.getClassArray(SEEDS)); + if (bundle.contains(SEEDS)) { + Collections.addAll(seeds, bundle.getClassArray(SEEDS)); + } + curSeedEffect = bundle.getClass(CUR_SEED_EFFECT); + if (level() == 1) image = ItemSpriteSheet.ARTIFACT_SHOES; else if (level() == 2) image = ItemSpriteSheet.ARTIFACT_BOOTS; else if (level() >= 3) image = ItemSpriteSheet.ARTIFACT_GREAVES; @@ -169,16 +234,18 @@ public class SandalsOfNature extends Artifact { public class Naturalism extends ArtifactBuff{ public void charge(float amount) { - if (level() > 0 && charge < target.HT){ - //gain 1+(1*level)% of the difference between current charge and max HP. - float chargeGain = (target.HT-charge) * (.01f+ level()*0.01f); + if (cursed || target.buff(MagicImmune.class) != null) return; + if (charge < chargeCap){ + //0.5 charge per grass at +0, up to 1 at +10 + float chargeGain = (3f + level())/6f; chargeGain *= amount; chargeGain *= RingOfEnergy.artifactChargeMultiplier(target); partialCharge += Math.max(0, chargeGain); - while (partialCharge > 1){ + while (partialCharge >= 1){ charge++; partialCharge--; } + charge = Math.min(charge, chargeCap); updateQuickslot(); } } @@ -204,30 +271,65 @@ public class SandalsOfNature extends Artifact { @Override public void onSelect( Item item ) { if (item != null && item instanceof Plant.Seed) { - if (seeds.contains(item.getClass())){ - GLog.w( Messages.get(SandalsOfNature.class, "already_fed") ); - } else { - seeds.add(item.getClass()); + if (level() < 3) seeds.add(0, item.getClass()); + curSeedEffect = item.getClass(); - Hero hero = Dungeon.hero; - hero.sprite.operate( hero.pos ); - Sample.INSTANCE.play( Assets.Sounds.PLANT ); - hero.busy(); - hero.spend( 2f ); - if (seeds.size() >= 3+(level()*3)){ - seeds.clear(); - upgrade(); - if (level() >= 1 && level() <= 3) { - GLog.p( Messages.get(SandalsOfNature.class, "levelup") ); - } + Hero hero = Dungeon.hero; + hero.sprite.operate( hero.pos ); + Sample.INSTANCE.play( Assets.Sounds.PLANT ); + hero.busy(); + hero.spend( Actor.TICK ); + if (seeds.size() >= 3+(level()*3)){ + seeds.clear(); + upgrade(); - } else { - GLog.i( Messages.get(SandalsOfNature.class, "absorb_seed") ); + if (level() >= 1 && level() <= 3) { + 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"); + } + }; + +} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java index 57c856a1d..f5ef1108c 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/artifacts/WraithAmulet.java @@ -80,7 +80,7 @@ public class WraithAmulet extends Artifact { exp += 5; Buff.affect(Dungeon.hero, Invisibility.class, Invisibility.DURATION/2); GLog.p(Messages.get(this,"ghost")); - cooldown = 40 - (level / 2); + cooldown = 30 - (level / 2); charge--; } else { GLog.i(Messages.get(this,"nochareup")); @@ -159,7 +159,7 @@ public class WraithAmulet extends Artifact { //I must add Complete WraithAmulet //Ok,Ling will Complete WraithAmulet upgrade(); - exp += level * 25; + exp += level * 38; GLog.p(Messages.get(this,"ghoststong")); } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java index 121f35d2b..b27778e27 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/bookslist/DimandBook.java @@ -15,6 +15,11 @@ public class DimandBook extends Books { unique = true; } + @Override + public String info() { + return desc()+"\n\n"+authorx; + } + @Override public void execute(final Hero hero, String action) { super.execute(hero, action); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/DeYiZiBooks.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/DeYiZiBooks.java index 849dd4dd5..3b0499a8d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/DeYiZiBooks.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/DeYiZiBooks.java @@ -9,4 +9,9 @@ public class DeYiZiBooks extends Books { image = ItemSpriteSheet.DEBOOKS; unique = true; } + + @Override + public String info() { + return desc()+"\n\n"+authorx; + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/MoneyMoreBooks.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/MoneyMoreBooks.java index da207291e..0b5229fdd 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/MoneyMoreBooks.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/MoneyMoreBooks.java @@ -8,4 +8,9 @@ public class MoneyMoreBooks extends Books { image = ItemSpriteSheet.MONEYBOOKS; unique = true; } + + @Override + public String info() { + return desc()+"\n\n"+authorx; + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/PinkRandomBooks.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/PinkRandomBooks.java index 04e8a58c8..3998bfc54 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/PinkRandomBooks.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/books/playbookslist/PinkRandomBooks.java @@ -9,4 +9,9 @@ public class PinkRandomBooks extends Books { image = ItemSpriteSheet.PINKBOOKS; unique = true; } + + @Override + public String info() { + return desc()+"\n\n"+authorx; + } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java index 852d1039a..40b7e8588 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/items/weapon/melee/Sai.java @@ -61,7 +61,7 @@ public class Sai extends MeleeWeapon { //50x0.1+7x0.5+1=10+3.5+1=15 if(attacker.HP >= attacker.HT){ GLog.p("血量已满!无法回血"); - } else if (Random.Float()<0.15f) { + } else if (Random.Float()<0.35f) { R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5); attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5; attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP")); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java index 752896de5..fa669600e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/levels/RegularLevel.java @@ -111,16 +111,17 @@ public abstract class RegularLevel extends Level { if (calendar.get(Calendar.WEEK_OF_MONTH) == 1) holiday = XMAS; break; - //6.10-7.10 + //6.20-6.30 case Calendar.JUNE: - if (calendar.get(Calendar.DAY_OF_MONTH) >= 10 ){ + if (calendar.get(Calendar.DAY_OF_MONTH) >= 20 ){ holiday = Holiday.DWJ; } else { holiday = Holiday.NONE; } break; 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; } else { holiday = Holiday.NONE; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java index b1b7643c4..5f632cfe4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameNewsScene.java @@ -69,7 +69,7 @@ public class GameNewsScene extends PixelScene { //定义GameNewsScene类,继 Messages.get(this, "title"), Messages.get(this, "update"), Messages.get(this, "continue"), - 7){ + 3){ @Override public void hide() { super.hide(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SeedFindScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SeedFindScene.java new file mode 100644 index 000000000..bf2e7d79d --- /dev/null +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/SeedFindScene.java @@ -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 +// */ +// +//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()); +// } +// } +//} \ No newline at end of file diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java index 000360983..e9f9479a7 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/changelist/mlpd/vM0_6_7_X_Changes.java @@ -54,6 +54,7 @@ import java.util.ArrayList; public class vM0_6_7_X_Changes { public static void addAllChanges(ArrayList changeInfos) { + add_v0_6_50_Changes(changeInfos); add_v0_6_49_Changes(changeInfos); add_v0_6_48_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); } + public static void add_v0_6_50_Changes( ArrayList 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 changeInfos ) { ChangeInfo changes = new ChangeInfo("v0.6.3.0-Beta4.0", true, ""); changes.hardlight(Window.TITLE_COLOR); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java index 6b9b28c62..eab421dce 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java @@ -21,6 +21,7 @@ package com.shatteredpixel.shatteredpixeldungeon.windows; +import static com.shatteredpixel.shatteredpixeldungeon.Challenges.PRO; import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero; import static com.shatteredpixel.shatteredpixeldungeon.SPDSettings.HelpSettings; import static com.shatteredpixel.shatteredpixeldungeon.Statistics.lanterfireactive; @@ -239,7 +240,7 @@ public class WndHero extends WndTabbed { }; add(buttonItem); buttonItem.setRect(2, pos, WIDTH - 4, 16); - if(HelpSettings()){ + if(HelpSettings() && Dungeon.isChallenged(PRO)){ buttonItem.active = true; } else { buttonItem.active = false; diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java index ce4bd7b55..f4384353e 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java @@ -3,7 +3,7 @@ * Copyright (C) 2012-2015 Oleg Dolya * * 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 * it under the terms of the GNU General Public License as published by @@ -21,53 +21,168 @@ 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.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite; +import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIcon; import com.shatteredpixel.shatteredpixeldungeon.ui.BuffIndicator; import com.shatteredpixel.shatteredpixeldungeon.ui.HealthBar; import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextBlock; +import com.watabou.noosa.ColorBlock; +import com.watabou.noosa.Image; import com.watabou.noosa.ui.Component; public class WndInfoMob extends WndTitledMessage { - + public WndInfoMob( Mob mob ) { super( new MobTitle( mob ), mob.info() ); - + } private static class MobTitle extends Component { private static final int GAP = 2; - - private CharSprite image; - private RenderedTextBlock name; - private RenderedTextBlock info; - private RenderedTextBlock infoB; - private HealthBar health; - private BuffIndicator buffs; - - public MobTitle( Mob mob ) { - if(mob.HT == 114514) { - name = PixelScene.renderTextBlock(Messages.titleCase("??????"),6); + + private final CharSprite image; + private final RenderedTextBlock name; + private final HealthBar health; + private final BuffIndicator buffs; + + public MobSixInfo mobSixInfo; + + private String DKLevel(Mob mob) { + String level; + 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 { - 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 ); 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(); add( image ); @@ -75,13 +190,40 @@ public class WndInfoMob extends WndTitledMessage { health.level(mob); add( health ); - buffs = new BuffIndicator(mob,false); + buffs = new BuffIndicator( mob,false ); 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 protected void layout() { - + image.x = 0; 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()); - info.setRect(image.width() + GAP, health.bottom() + GAP, w, info.height()); - - infoB.setRect(image.width() + GAP, info.bottom() + GAP, w, infoB.height()); - buffs.setPos( name.right() + GAP-1, 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; } } + + } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java index 7a7fabb82..683cc8ddc 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndScoreBreakdown.java @@ -1,5 +1,9 @@ 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.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; @@ -27,6 +31,7 @@ public class WndScoreBreakdown extends Window { NumberFormat num = NumberFormat.getInstance(Locale.US); + pos = statSlot(this, Messages.get(this, "progress_title"), num.format(Statistics.progressScore), pos, Statistics.progressScore >= 50_000); pos = addInfo(this, Messages.get(this, "progress_desc"), pos); @@ -49,11 +54,26 @@ public class WndScoreBreakdown extends Window { if (Statistics.chalMultiplier > 1) { 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); + + int chCount = 0; + for (int ch : Challenges.MASKS){ + if ((Dungeon.challenges & ch) != 0 && ch <= STRONGER_BOSSES) chCount++; + } + //评分系统 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); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java index 1b176e272..7f5ec7df5 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndSettings.java @@ -698,6 +698,8 @@ public class WndSettings extends WndTabbed { ColorBlock sep1; CheckBox LockFing; + CheckBox ATBSwitch; + // RedButton ResetButton; @Override @@ -719,15 +721,15 @@ public class WndSettings extends WndTabbed { LockFing.checked(SPDSettings.HelpSettings()); add(LockFing); -// ResetButton = new RedButton(Messages.get(this, "reset")) { -// @Override -// protected void onClick() { -// WndStartGame.showKeyInput(); -// } -// }; -// if(isAndroid()) { -// add(ResetButton); -// } + ATBSwitch = new CheckBox( Messages.get(this, "atbsettings") ) { + @Override + protected void onClick() { + super.onClick(); + SPDSettings.ATBSettings(checked()); + } + }; + ATBSwitch.checked(SPDSettings.ATBSettings()); + add(ATBSwitch); } @@ -744,13 +746,13 @@ public class WndSettings extends WndTabbed { if (width > 200){ LockFing.setRect(0, bottom, width, SLIDER_HEIGHT); - + ATBSwitch.setRect(0, LockFing.bottom() + GAP, width, SLIDER_HEIGHT); } else { LockFing.setRect(0, bottom + GAP, width, SLIDER_HEIGHT); - + ATBSwitch.setRect(0, LockFing.bottom() + GAP, width, SLIDER_HEIGHT); } - height = LockFing.bottom(); + height = ATBSwitch.bottom(); } } diff --git a/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/GameUpdateNews.java b/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/GameUpdateNews.java index 220c2f174..4cec2ba31 100644 --- a/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/GameUpdateNews.java +++ b/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/GameUpdateNews.java @@ -23,11 +23,7 @@ public class GameUpdateNews extends GameUpdateNewsService { } Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET); - if (preferHTTPS) { - httpGet.setUrl("https://rust.coldmint.top/ftp/ling/json/gamenews.xml"); - } else { - httpGet.setUrl("https://rust.coldmint.top/ftp/ling/json/gamenews.xml"); - } + httpGet.setUrl("http://www.pd.qinyueqwq.top/ftp/pd/gamenews/gamenews.xml"); Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() { @Override @@ -51,7 +47,7 @@ public class GameUpdateNews extends GameUpdateNewsService { article.URL = xmlArticle.getChildByName("link").getAttribute("href"); if (!preferHTTPS) { - article.URL= article.URL.replace("https://", "http://"); + article.URL= article.URL.replace("http://", "http://"); } article.DesktopURL = xmlArticle.getChildByName("kinl").getAttribute("href"); diff --git a/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/ShatteredNews.java b/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/ShatteredNews.java index 7207b10a1..a78e9fd23 100644 --- a/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/ShatteredNews.java +++ b/services/news/shatteredNews/src/main/java/com/shatteredpixel/shatteredpixeldungeon/services/news/ShatteredNews.java @@ -45,11 +45,7 @@ public class ShatteredNews extends NewsService { } Net.HttpRequest httpGet = new Net.HttpRequest(Net.HttpMethods.GET); - if (preferHTTPS) { - httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml"); - } else { - httpGet.setUrl("https://jdsalingzx.top/assets/xml/news.xml"); - } + httpGet.setUrl("http://www.pd.qinyueqwq.top/ftp/pd/news/news.xml"); Gdx.net.sendHttpRequest(httpGet, new Net.HttpResponseListener() { @Override @@ -71,7 +67,7 @@ public class ShatteredNews extends NewsService { article.summary = xmlArticle.get("summary"); article.URL = xmlArticle.getChildByName("link").getAttribute("href"); if (!preferHTTPS) { - article.URL = article.URL.replace("https://", "http://"); + article.URL = article.URL.replace("http://", "http://"); } Pattern versionCodeMatcher = Pattern.compile("v[0-9]+");