update v0.6.1.0 p4

-Fixed RedDragon and Crivusfruits Bug
-Add some basic framework for the boss of the 10th depth
This commit is contained in:
LingASDJ 2023-03-10 15:23:29 +08:00
parent bd00b30c22
commit b15bb8e76d
11 changed files with 159 additions and 98 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

View File

@ -1,4 +1,10 @@
####MLPD-P3文本
items.quest.starwar.name=StarWAR
items.quest.starwar.desc=描述……
items.quest.starwar.ac_ac_rainbowegg=彩蛋
items.weapon.melee.lifetreesword.name=“倒悬的生命树”
items.weapon.melee.lifetreesword.desc=克里弗斯之果破碎时,四周的藤蔓缠结在暴露出的种子上,形成剑的形状。剑身触碰到生物时会汲取他们的生命力提供给种子,期待着它再一结出猩红的果实。\n\n这是一个比较精准的武器。\n\n特别说明克里弗斯之果Boss专武每击杀_75只怪物_可以使用特殊武器技能,并重置杀敌计数。\n\n杀敌点数:
items.weapon.melee.lifetreesword.ac_summon=召唤幽蓝藤蔓

View File

@ -72,6 +72,8 @@ public class Assets {
public static final String WEAK_FLOOR = "environment/custom_tiles/weak_floor.png";
public static final String SEWER_BOSS = "environment/custom_tiles/sewer_boss.png";
public static final String PRISON_QUEST = "environment/custom_tiles/prison_quests.png";
public static final String PRISON_MAGIC = "environment/custom_tiles/magic.png";
public static final String PRISON_EXIT = "environment/custom_tiles/prison_exit.png";
public static final String CAVES_BOSS = "environment/custom_tiles/caves_boss.png";
public static final String CITY_BOSS = "environment/custom_tiles/city_boss.png";

View File

@ -36,7 +36,6 @@ public class Statistics {
public static int ankhsUsed;
public static int spawnersIce;
public static int naiyaziCollected;
public static boolean iscustomName = false;
//used for hero unlock badges
public static int upgradesUsed;
public static int sneakAttacks;
@ -72,6 +71,9 @@ public class Statistics {
//警告
public static boolean tipsgodungeon = false;
//宝藏迷宫
public static int goldchestmazeCollected;
public static int dageCollected;
//Directly add float time will cause accuracy lose and stop timing if time is long enough
@ -89,6 +91,7 @@ public class Statistics {
deepestFloor = -1;
enemiesSlain = 0;
foodEaten = 0;
goldchestmazeCollected = 0;
itemsCrafted = 0;
piranhasKilled = 0;
ankhsUsed = 0;
@ -167,8 +170,11 @@ public class Statistics {
private static final String TIPSGO = "tipsgo";
private static final String GOLDCHEST = "goldchest";
public static void storeInBundle( Bundle bundle ) {
bundle.put( LANTERACTIVE, lanterfireactive );
bundle.put(GOLDCHEST, goldchestmazeCollected);
bundle.put( CrivusFruitsLevel2, crivusfruitslevel2 );
@ -211,6 +217,9 @@ public class Statistics {
}
public static void restoreFromBundle( Bundle bundle ) {
goldchestmazeCollected = bundle.getInt(GOLDCHEST);
goldCollected = bundle.getInt( GOLD );
deepestFloor = bundle.getInt( DEEPEST );
enemiesSlain = bundle.getInt( SLAIN );

View File

@ -36,7 +36,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Effects;
import com.shatteredpixel.shatteredpixeldungeon.effects.MagicMissile;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.effects.TargetedCell;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SnowParticle;
import com.shatteredpixel.shatteredpixeldungeon.effects.particles.SparkParticle;
import com.shatteredpixel.shatteredpixeldungeon.items.Gold;
@ -190,31 +189,22 @@ public class MagicGirlDead extends Boss {
}
}
float strength = maxDist;
for (int c : bolt.subPath(1, dist)) {
strength--; //as we start at dist 1, not 0.
affectedCells.add(c);
if (strength > 1) {
spreadFlames(c + PathFinder.CIRCLE8[left(direction)], strength - 1);
spreadFlames(c + PathFinder.CIRCLE8[direction], strength - 1);
spreadFlames(c + PathFinder.CIRCLE8[right(direction)], strength - 1);
} else {
visualCells.add(c);
}
}
// float strength = maxDist;
// for (int c : bolt.subPath(1, dist)) {
// strength--; //as we start at dist 1, not 0.
// affectedCells.add(c);
// if (strength > 1) {
// spreadFlames(c + PathFinder.CIRCLE8[left(direction)], strength - 1);
// spreadFlames(c + PathFinder.CIRCLE8[direction], strength - 1);
// spreadFlames(c + PathFinder.CIRCLE8[right(direction)], strength - 1);
// } else {
// visualCells.add(c);
// }
// }
//going to call this one manually
visualCells.remove(bolt.path.get(dist));
for (int cell : visualCells){
//this way we only get the cells at the tip, much better performance.
((MagicMissile)ch.sprite.parent.recycle( MagicMissile.class )).reset(
MagicMissile.FROST,
ch.sprite,
cell,
null
);
}
//this way we only get the cells at the tip, much better performance.
MagicMissile.boltFromChar( ch.sprite.parent,
MagicMissile.FROST,
ch.sprite,
@ -227,20 +217,20 @@ public class MagicGirlDead extends Boss {
//burn... BURNNNNN!.....
private void spreadFlames(int cell, float strength){
if (strength >= 0 && (Dungeon.level.passable[cell] || Dungeon.level.flamable[cell])){
affectedCells.add(cell);
if (strength >= 1.5f) {
visualCells.remove(cell);
spreadFlames(cell + PathFinder.CIRCLE8[left(direction)], strength - 1.5f);
spreadFlames(cell + PathFinder.NEIGHBOURS9[direction], strength - 1.5f);
spreadFlames(cell + PathFinder.CIRCLE8[right(direction)], strength - 1.5f);
} else {
visualCells.add(cell);
}
} else if (!Dungeon.level.passable[cell])
visualCells.add(cell);
}
// private void spreadFlames(int cell, float strength){
// if (strength >= 0 && (Dungeon.level.passable[cell] || Dungeon.level.flamable[cell])){
// affectedCells.add(cell);
// if (strength >= 1.5f) {
// visualCells.remove(cell);
// spreadFlames(cell + PathFinder.CIRCLE8[left(direction)], strength - 1.5f);
// spreadFlames(cell + PathFinder.NEIGHBOURS9[direction], strength - 1.5f);
// spreadFlames(cell + PathFinder.CIRCLE8[right(direction)], strength - 1.5f);
// } else {
// visualCells.add(cell);
// }
// } else if (!Dungeon.level.passable[cell])
// visualCells.add(cell);
// }
private int left(int direction){
return direction == 0 ? 3 : direction-1;
@ -268,25 +258,25 @@ public class MagicGirlDead extends Boss {
}
}
if(buff(RageAndFire.class)!=null){
//if target is locked, fire, target = -1
if(lastTargeting != -1){
//no spend, execute next act
//sprite.attack( enemy.pos );
spend( attackDelay()*5f );
if(pos == 0) {
shoot(this, 1);
} else {
shoot(this, enemy.pos);
}
return true;
//else try to lock target
}else if(findTargetLocation()) {
//if success, spend and ready to fire
return true;
}//else, just act
}
// if(buff(RageAndFire.class)!=null){
// //if target is locked, fire, target = -1
// if(lastTargeting != -1){
// //no spend, execute next act
// //sprite.attack( enemy.pos );
// spend( attackDelay()*5f );
// if(pos == 0) {
// shoot(this, 1);
// } else {
// shoot(this, enemy.pos);
// }
//
// return true;
// //else try to lock target
// }else if(findTargetLocation()) {
// //if success, spend and ready to fire
// return true;
// }//else, just act
// }
if(summonCD<0f){
summonCD += Math.max(60f - phase * 2f, 40f);
summonCaster(Random.Int(4), findRandomPlaceForCaster(), phase>5);
@ -413,7 +403,7 @@ public class MagicGirlDead extends Boss {
@Override
protected boolean canAttack(Char enemy){
if(enemy!=null && enemySeen){
if(Dungeon.level.distance(pos, enemy.pos)<3) return true;
return Dungeon.level.distance(pos, enemy.pos) < 3;
}
return false;
}
@ -446,7 +436,6 @@ public class MagicGirlDead extends Boss {
private static final int LIGHT = 2;
private static final int HALOFIRE = 3;
private static final int BOUNCE = 4;
private static final int FIRESE = 5;
protected void fallingRockVisual(int pos){
Camera.main.shake(0.4f, 2f);
@ -552,20 +541,6 @@ public class MagicGirlDead extends Boss {
}
}
//the first num is all nums, and the second is activated nums.
protected int[] aliveCasters(){
int[] count = new int[]{0, 0};
for(Mob m: Dungeon.level.mobs.toArray(new Mob[0])) {
if (m instanceof SpellCaster) {
++count[0];
if(m.alignment != Alignment.NEUTRAL){
++count[1];
}
}
}
return count;
}
public void onZapComplete(){
ventGas(enemy);
next();
@ -671,27 +646,6 @@ public class MagicGirlDead extends Boss {
}
}
protected boolean findTargetLocation(){
if(enemy!=null && enemySeen){
lastTargeting = enemy.pos;
}else{
lastTargeting = hero.pos;
}
if(canHit(lastTargeting)) {
sprite.parent.addToBack(new TargetedCell(lastTargeting, 0xFF0000));
spend(TICK);
return true;
}else{
lastTargeting = -1;
return false;
}
}
protected boolean canHit(int targetPos){
Ballistica ba = new Ballistica(pos, targetPos, Ballistica.PROJECTILE);
return Dungeon.level.distance(ba.collisionPos, targetPos) <= 1;
}
@Override
public boolean isAlive(){
return HP>0 || healthThreshold[phase]>0;

View File

@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.actors.mobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.actors.Actor;
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@ -237,6 +238,10 @@ public class Mimic extends Mob {
}
items = null;
}
//宝藏迷宫
Statistics.goldchestmazeCollected++;
super.rollToDropLoot();
}

View File

@ -239,7 +239,7 @@ public class RedDragon extends NPC {
public static Ring weapon;
public static Wand RingT;
public static Artifact armor;
public static Item armor;
public static Brew food;
public static ExoticScroll scrolls;
@ -413,7 +413,7 @@ public class RedDragon extends NPC {
itemLevel = 3;
}
weapon.upgrade(itemLevel);
armor.upgrade(0);
armor.upgrade(itemLevel);
RingT.upgrade(itemLevel);
//10% to be enchanted. We store it separately so enchant status isn't revealed early

View File

@ -0,0 +1,79 @@
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.standard;
import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.items.quest.CeremonialCandle;
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.levels.painters.Painter;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.tiles.CustomTilemap;
import com.watabou.noosa.Tilemap;
import com.watabou.utils.Point;
public class MagicDimandRoom extends StandardRoom{
@Override
public int minWidth() {
return 8;
}
@Override
public int minHeight() {
return 8;
}
public void paint( Level level ) {
for (Door door : connected.values()) {
door.set( Door.Type.REGULAR );
}
Painter.fill(level, this, Terrain.WALL);
Painter.fill(level, this, 1, Terrain.WATER);
ChestMarker vis = new ChestMarker();
Point c = center();
vis.pos(c.x - 1, c.y - 1);
level.customTiles.add(vis);
Painter.fill(level, c.x-1, c.y-1, 3, 3, Terrain.EMPTY_SP);
// level.addItemToSpawn(new CeremonialCandle());
// level.addItemToSpawn(new CeremonialCandle());
// level.addItemToSpawn(new CeremonialCandle());
// level.addItemToSpawn(new CeremonialCandle());
CeremonialCandle.ritualPos = c.x + (level.width() * c.y);
}
public static class ChestMarker extends CustomTilemap {
{
texture = Assets.Environment.PRISON_MAGIC;
tileW = tileH = 4;
}
final int TEX_WIDTH = 64;
@Override
public Tilemap create() {
Tilemap v = super.create();
v.map(mapSimpleImage(0, 0, TEX_WIDTH), 4);
return v;
}
@Override
public String name(int tileX, int tileY) {
return Messages.get(this, "name");
}
@Override
public String desc(int tileX, int tileY) {
return Messages.get(this, "desc");
}
}
}

View File

@ -182,7 +182,7 @@ public class InterlevelScene extends PixelScene {
fadeTime += 0.9f; //adds 1 second total
//speed up transition when debugging
} else if (DeviceCompat.isDebug()){
fadeTime = 0.8f;
fadeTime = 0.1f;
}
SkinnedBlock bg = new SkinnedBlock(Camera.main.width, Camera.main.height, loadingAsset ){

View File

@ -152,7 +152,7 @@ public class PixelScene extends Scene {
Messages.lang() == Languages.JAPANESE){
renderedTextPageSize *= 2;
}
Game.platform.setupFontGenerators(renderedTextPageSize, SPDSettings.systemFont());
Game.platform.setupFontGenerators(renderedTextPageSize, false);
Tooltip.resetLastUsedTime();

View File

@ -22,6 +22,7 @@
package com.shatteredpixel.shatteredpixeldungeon.windows;
import static com.shatteredpixel.shatteredpixeldungeon.Dungeon.hero;
import static com.shatteredpixel.shatteredpixeldungeon.Statistics.crivusfruitslevel2;
import com.shatteredpixel.shatteredpixeldungeon.Statistics;
import com.shatteredpixel.shatteredpixeldungeon.items.Ankh;
@ -140,6 +141,11 @@ public class WndResurrect extends Window {
btnItem4.item.keptThoughLostInvent = true;
}
//克里弗斯之果二阶段死亡的时候的给予重新评估
if(crivusfruitslevel2){
crivusfruitslevel2 = false;
}
InterlevelScene.mode = InterlevelScene.Mode.RESURRECT;
Game.switchScene( InterlevelScene.class );