修复徽章问题和一些其他错误

This commit is contained in:
LingASDJ 2023-09-22 00:10:31 +08:00
parent 28cd52cc0c
commit d101c86c5f
7 changed files with 46 additions and 27 deletions

View File

@ -749,8 +749,9 @@ public class Badges {
} }
public static void validateAMZ() { public static void validateAMZ() {
if (global.contains( Badge.KILL_APPLE ) &&global.contains( Badge.KILL_DM720 ) && List<PaswordBadges.Badge> passwordbadges = PaswordBadges.filtered( true );
global.contains( Badge.KILL_MG) && PaswordBadges.global.contains( PaswordBadges.Badge.FIREGIRL) && PaswordBadges.global.contains( PaswordBadges.Badge.DRAWF_HEAD) && PaswordBadges.global.contains( PaswordBadges.Badge.SAKA_DIED)) { if (global.contains( Badge.KILL_APPLE ) && global.contains( Badge.KILL_DM720 ) &&
global.contains( Badge.KILL_MG) && passwordbadges.contains(PaswordBadges.Badge.FIREGIRL) && passwordbadges.contains(PaswordBadges.Badge.DRAWF_HEAD) && passwordbadges.contains(PaswordBadges.Badge.SAKA_DIED)) {
PaswordBadges.Badge badge = PaswordBadges.Badge.SPICEALBOSS; PaswordBadges.Badge badge = PaswordBadges.Badge.SPICEALBOSS;
PaswordBadges.displayBadge( badge ); PaswordBadges.displayBadge( badge );

View File

@ -28,7 +28,6 @@ import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClothArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.custom.CustomArmor; import com.shatteredpixel.shatteredpixeldungeon.items.armor.custom.CustomArmor;
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation; import com.shatteredpixel.shatteredpixeldungeon.items.food.SmallRation;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene; import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
@ -86,8 +85,6 @@ public class Challenges {
if (Dungeon.isChallenged(NO_FOOD)) { if (Dungeon.isChallenged(NO_FOOD)) {
if (item instanceof SmallRation) { if (item instanceof SmallRation) {
return true; return true;
} else if (item instanceof HornOfPlenty) {
return true;
} }
} }

View File

@ -65,13 +65,8 @@ public class DiedCrossBow extends LegendWeapon {
public String status() { public String status() {
//display the current cooldown //display the current cooldown
if (cooldown != 0) if (cooldown != 0){
return Messages.format( "CD:%d", cooldown ); return Messages.format("CD:%d", cooldown);
Dart missile = Dungeon.hero.belongings.getItem(Dart.class);
if(missile != null){
return ""+missile.quantity()/5;
} else { } else {
return null; return null;
} }
@ -83,20 +78,12 @@ public class DiedCrossBow extends LegendWeapon {
public void execute(Hero hero, String action ) { public void execute(Hero hero, String action ) {
super.execute( hero, action ); super.execute( hero, action );
Dart missile = Dungeon.hero.belongings.getItem(Dart.class);
if (action.equals( AC_KING )) { if (action.equals( AC_KING )) {
if (!isEquipped(hero)){ if (!isEquipped(hero)){
GLog.i( Messages.get(this, "no_equip") ); GLog.i( Messages.get(this, "no_equip") );
} else if(cooldown == 0) { } else if(cooldown == 0) {
if (missile != null) GameScene.selectCell(bomb);
if (missile.quantity() > 5) {
curUser = hero;
curItem = this;
GameScene.selectCell(bomb);
} else {
GLog.w(Messages.get(this, "no_king"));
}
} else { } else {
GLog.w(Messages.get(this, "no_cooldown")); GLog.w(Messages.get(this, "no_cooldown"));
} }

View File

@ -30,6 +30,7 @@ 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.weapon.melee.Crossbow; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.Crossbow;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.melee.legend.DiedCrossBow;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon; import com.shatteredpixel.shatteredpixeldungeon.items.weapon.missiles.MissileWeapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant; import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
@ -96,6 +97,8 @@ public class Dart extends MissileWeapon {
} }
private static Crossbow bow; private static Crossbow bow;
private static DiedCrossBow diedCrossBow;
private void updateCrossbow(){ private void updateCrossbow(){
if (Dungeon.hero.belongings.weapon() instanceof Crossbow){ if (Dungeon.hero.belongings.weapon() instanceof Crossbow){

View File

@ -0,0 +1,27 @@
package com.shatteredpixel.shatteredpixeldungeon.levels;
public class LaveCavesBossLevel extends Level{
/**
* @return
*/
@Override
protected boolean build() {
return false;
}
/**
*
*/
@Override
protected void createMobs() {
}
/**
*
*/
@Override
protected void createItems() {
}
}

View File

@ -25,6 +25,8 @@ import static com.shatteredpixel.shatteredpixeldungeon.items.Generator.randomArt
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges; import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NxhyNpc; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NxhyNpc;
@ -35,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Slyl;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.obSir; import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.obSir;
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh; import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap; import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.Stylus; import com.shatteredpixel.shatteredpixeldungeon.items.Stylus;
@ -132,14 +133,15 @@ public class ZeroLevel extends Level {
drop( ( Generator.randomUsingDefaults( Generator.Category.RING ) ), this.width * 17 + 18 ); drop( ( Generator.randomUsingDefaults( Generator.Category.RING ) ), this.width * 17 + 18 );
} }
if(passwordbadges.contains(PaswordBadges.Badge.BIG_X)){ if(passwordbadges.contains(PaswordBadges.Badge.BIG_X)){
drop( ( Generator.randomUsingDefaults( Generator.Category.ARMOR ) ), this.width * 19 + 18 ); if(Dungeon.isChallenged(Challenges.NO_ARMOR)){
drop( ( Generator.randomUsingDefaults( Generator.Category.WAND ) ), this.width * 19 + 18 );
} else {
drop( ( Generator.randomUsingDefaults( Generator.Category.ARMOR ) ), this.width * 19 + 18 );
}
} }
if ( Badges.isUnlocked(Badges.Badge.KILL_DM720)||Badges.isUnlocked(Badges.Badge.KILL_MG) ){ if ( Badges.isUnlocked(Badges.Badge.KILL_DM720)||Badges.isUnlocked(Badges.Badge.KILL_MG) ){
drop(( Generator.randomUsingDefaults( Generator.Category.WEP_T2 )), this.width * 18 + 17 ); drop(( Generator.randomUsingDefaults( Generator.Category.WEP_T2 )), this.width * 18 + 17 );
} }
if(passwordbadges.contains(PaswordBadges.Badge.EXSG)){
drop(new Gold().quantity(720), this.width * 18 + 18 );
}
if ( Badges.isUnlocked(Badges.Badge.RLPT)){ if ( Badges.isUnlocked(Badges.Badge.RLPT)){
Item item = randomArtifact(); Item item = randomArtifact();
drop(item, this.width * 18 + 19 ); drop(item, this.width * 18 + 19 );

View File

@ -21,6 +21,7 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special; package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator; import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold; import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
@ -150,7 +151,8 @@ public class CrystalPathRoom extends SpecialRoom {
item = new LamellarArmor(); item = new LamellarArmor();
} else { } else {
item = Generator.random(Random.oneOf( item = Generator.random(Random.oneOf(
Generator.Category.ARMOR, Dungeon.isChallenged(Challenges.NO_ARMOR) ? Generator.Category.WAND :
Generator.Category.ARMOR,
Generator.Category.STONE, Generator.Category.STONE,
Generator.Category.WAND, Generator.Category.WAND,
Generator.Category.ARTIFACT) Generator.Category.ARTIFACT)