Less Bug Fixed

This commit is contained in:
LingASDJ 2023-03-17 17:33:12 +08:00
parent 0f7ccfa862
commit ac39650036
4 changed files with 39 additions and 78 deletions

View File

@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Light;
import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.PurpleParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.ShadowParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Dewdrop;
import com.shatteredpixel.shatteredpixeldungeon.items.Generator;
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
@ -38,7 +37,6 @@ import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
import com.shatteredpixel.shatteredpixeldungeon.sprites.EyeSprite;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.noosa.tweeners.AlphaTweener;
import com.watabou.utils.Bundle;
import com.watabou.utils.PathFinder;
import com.watabou.utils.Random;
@ -65,40 +63,6 @@ public class Eye extends Mob {
properties.add(Property.DEMONIC);
}
public static void spawnAround(int pos) {
for (int n : PathFinder.NEIGHBOURS4) {
int cell = pos + n;
spawnAt( Random.Int(Dungeon.level.length()) + cell );
}
}
public void adjustStats( int level ) {
this.level = level;
defenseSkill = attackSkill( null ) * 5;
enemySeen = true;
}
private int level;
private static final float SPAWN_DELAY = 2f;
public static Eye spawnAt( int pos ) {
if (!Dungeon.level.solid[pos] && Actor.findChar( pos ) == null) {
Eye w = new Eye();
w.adjustStats( Dungeon.depth );
w.pos = pos;
w.state = w.HUNTING;
GameScene.add( w, SPAWN_DELAY );
w.sprite.alpha( 0 );
w.sprite.parent.add( new AlphaTweener( w.sprite, 1, 0.5f ) );
w.sprite.emitter().burst( ShadowParticle.CURSE, 5 );
return w;
} else {
return null;
}
}
@Override
public int damageRoll() {
return Random.NormalIntRange(20, 30);

View File

@ -587,8 +587,11 @@ public abstract class Mob extends Char {
if (isHero && this instanceof Shaman && one && hero.lanterfire < 70) ((Hero) enemy).damageLantern(2);
//50%的幽灵任务怪 (-5) <95 NZND
if (isHero && GhostQuestMob && four && hero.lanterfire < 95) ((Hero) enemy).damageLantern(5);
//怨灵 75%的概率-6灯火 FINAL
if (isHero && this instanceof Wraith && three ) ((Hero) enemy).damageLantern(6); die(true);
//怨灵 75%的概率-6灯火 且必定死亡
if (isHero && this instanceof Wraith && three ){
((Hero) enemy).damageLantern(6);
this.die(true);
}
//新生火元素 25%的概率-6灯火 <80
if (isHero && this instanceof Elemental.NewbornFireElemental && two && hero.lanterfire < 80 ) ((Hero) enemy).damageLantern(2);
//矿洞蜘蛛 15%的概率-3灯火 <70

View File

@ -121,10 +121,6 @@ public class Swarm extends Mob {
Swarm clone = new Swarm();
clone.generation = generation + 1;
clone.EXP = 0;
//TODO 修复火焰遗留问题
// if (buff( Burning.class ) != null) {
// Buff.affect( clone, Burning.class ).reignite( clone );
// }
if (buff( Poison.class ) != null) {
Buff.affect( clone, Poison.class ).set(2);
}

View File

@ -101,7 +101,7 @@ public class WndChallenges extends Window {
if (i > index && i % 3 == 0) {
pos += GAP;
}
ChallengeInfo info = new ChallengeInfo(foundChallangeIcon(i), challenge,false,
ChallengeInfo info = new ChallengeInfo(foundChallangeIcon(i), challenge, false,
null);
ChallengeButton cb = info.check;
@ -240,7 +240,7 @@ public class WndChallenges extends Window {
}
}
private class ChallengeInfo extends Component {
private static class ChallengeInfo extends Component {
Image icon;
IconButton info;
ChallengeButton check;
@ -297,41 +297,39 @@ public class WndChallenges extends Window {
}
private Image foundChallangeIcon(int i) {
if (Challenges.NAME_IDS[i].equals("no_food")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_1,new ItemSprite.Glowing( 0xFF0000 ));
} else if (Challenges.NAME_IDS[i].equals("no_armor")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_2,new ItemSprite.Glowing( 0x8f8f8f ));
} else if (Challenges.NAME_IDS[i].equals("no_healing")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_3,new ItemSprite.Glowing( 0xff0000 ));
} else if (Challenges.NAME_IDS[i].equals("no_herbalism")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_4);
} else if (Challenges.NAME_IDS[i].equals("swarm_intelligence")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_5,new ItemSprite.Glowing( 0xffff00 ));
} else if (Challenges.NAME_IDS[i].equals("darkness")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_6,new ItemSprite.Glowing( 0x8f8f8f ));
} else if (Challenges.NAME_IDS[i].equals("no_scrolls")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_7,new ItemSprite.Glowing( 0x00dd00 ));
} else if (Challenges.NAME_IDS[i].equals("aquaphobia")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_8,new ItemSprite.Glowing( 0xac89cc ));
} else if (Challenges.NAME_IDS[i].equals("champion_enemies")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_9,new ItemSprite.Glowing( 0x333333 ));
} else if (Challenges.NAME_IDS[i].equals("rlpt")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_10,new ItemSprite.Glowing( 0xc6cc6c ));
} else if (Challenges.NAME_IDS[i].equals("sbsg")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_11,new ItemSprite.Glowing( 0x3b1051 ));
} else if (Challenges.NAME_IDS[i].equals("exsg")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_12,new ItemSprite.Glowing( 0xd1ce9f ));
} else if (Challenges.NAME_IDS[i].equals("stronger_bosses")) {
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_13,new ItemSprite.Glowing( 0xff0000 ));
} else if (Challenges.NAME_IDS[i].equals("dhxd")) {
return new ItemSprite(ItemSpriteSheet.LANTERNB,new ItemSprite.Glowing( 0x384976 ));
} else {
return Icons.get(Icons.PREFS);
private Image foundChallangeIcon(int i) {
switch (Challenges.NAME_IDS[i]) {
case "no_food":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_1, new ItemSprite.Glowing(0xFF0000));
case "no_armor":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_2, new ItemSprite.Glowing(0x8f8f8f));
case "no_healing":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_3, new ItemSprite.Glowing(0xff0000));
case "no_herbalism":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_4);
case "swarm_intelligence":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_5, new ItemSprite.Glowing(0xffff00));
case "darkness":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_6, new ItemSprite.Glowing(0x8f8f8f));
case "no_scrolls":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_7, new ItemSprite.Glowing(0x00dd00));
case "aquaphobia":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_8, new ItemSprite.Glowing(0xac89cc));
case "champion_enemies":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_9, new ItemSprite.Glowing(0x333333));
case "rlpt":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_10, new ItemSprite.Glowing(0xc6cc6c));
case "sbsg":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_11, new ItemSprite.Glowing(0x3b1051));
case "exsg":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_12, new ItemSprite.Glowing(0xd1ce9f));
case "stronger_bosses":
return new ItemSprite(ItemSpriteSheet.CHALLANEESICON_13, new ItemSprite.Glowing(0xff0000));
case "dhxd":
return new ItemSprite(ItemSpriteSheet.LANTERNB, new ItemSprite.Glowing(0x384976));
default:
return Icons.get(Icons.PREFS);
}
}
}