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

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() {
List<PaswordBadges.Badge> passwordbadges = PaswordBadges.filtered( true );
if (global.contains( Badge.KILL_APPLE ) && global.contains( Badge.KILL_DM720 ) &&
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)) {
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.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.ClothArmor;
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.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.scenes.InterlevelScene;
@ -86,8 +85,6 @@ public class Challenges {
if (Dungeon.isChallenged(NO_FOOD)) {
if (item instanceof SmallRation) {
return true;
} else if (item instanceof HornOfPlenty) {
return true;
}
}

View File

@ -65,13 +65,8 @@ public class DiedCrossBow extends LegendWeapon {
public String status() {
//display the current cooldown
if (cooldown != 0)
if (cooldown != 0){
return Messages.format("CD:%d", cooldown);
Dart missile = Dungeon.hero.belongings.getItem(Dart.class);
if(missile != null){
return ""+missile.quantity()/5;
} else {
return null;
}
@ -83,20 +78,12 @@ public class DiedCrossBow extends LegendWeapon {
public void execute(Hero hero, String action ) {
super.execute( hero, action );
Dart missile = Dungeon.hero.belongings.getItem(Dart.class);
if (action.equals( AC_KING )) {
if (!isEquipped(hero)){
GLog.i( Messages.get(this, "no_equip") );
} else if(cooldown == 0) {
if (missile != null)
if (missile.quantity() > 5) {
curUser = hero;
curItem = this;
GameScene.selectCell(bomb);
} else {
GLog.w(Messages.get(this, "no_king"));
}
} else {
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.VelvetPouch;
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.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.plants.Plant;
@ -97,6 +98,8 @@ public class Dart extends MissileWeapon {
private static Crossbow bow;
private static DiedCrossBow diedCrossBow;
private void updateCrossbow(){
if (Dungeon.hero.belongings.weapon() instanceof Crossbow){
bow = (Crossbow) Dungeon.hero.belongings.weapon();

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.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.PaswordBadges;
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.Mob;
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.items.Ankh;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
import com.shatteredpixel.shatteredpixeldungeon.items.Heap;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
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 );
}
if(passwordbadges.contains(PaswordBadges.Badge.BIG_X)){
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) ){
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)){
Item item = randomArtifact();
drop(item, this.width * 18 + 19 );

View File

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