update Test 0.6.5.0-Alpha
This commit is contained in:
parent
670dbaf732
commit
e6dcc371cc
|
@ -294,7 +294,6 @@ public class AndroidPlatformSupport extends PlatformSupport {
|
||||||
fallbackFontGenerator = JPFontGenerator;
|
fallbackFontGenerator = JPFontGenerator;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
KRFontGenerator = SCFontGenerator = TCFontGenerator = JPFontGenerator = new FreeTypeFontGenerator(Gdx.files.absolute("/system/fonts/NotoSansCJK-Regular.ttc"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (basicFontGenerator != null) fonts.put(basicFontGenerator, new HashMap<>());
|
if (basicFontGenerator != null) fonts.put(basicFontGenerator, new HashMap<>());
|
||||||
|
|
|
@ -18,8 +18,8 @@ allprojects {
|
||||||
appName = 'Magic Ling Pixel Dungeon'
|
appName = 'Magic Ling Pixel Dungeon'
|
||||||
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
|
appPackageName = 'com.ansdomagiclingpixeldungeon.ling'
|
||||||
|
|
||||||
appVersionCode =906000
|
appVersionCode =907000
|
||||||
appVersionName = '0.6.4.0-Beta-XII'
|
appVersionName = '0.6.5.0-Alpha1'
|
||||||
|
|
||||||
appJavaCompatibility = JavaVersion.VERSION_11
|
appJavaCompatibility = JavaVersion.VERSION_11
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,11 @@
|
||||||
#####MLPD-P3文本
|
#####MLPD-P3文本
|
||||||
|
|
||||||
|
actors.mobs.spical.gnollhero.name=豺狼部族长老
|
||||||
|
actors.mobs.spical.gnollhero.desc=与其他豺狼不同的是,它清楚最大的威胁不是冒险者。同时,它会使用古老的占卜魔法狩猎预知告知玩家即将要狩猎的稀有生物在何处。\n\n但它们并不是完全帮助冒险者,如果冒险者有出格的举动,部族长老会让冒险者知道”叛徒“的下场……
|
||||||
|
actors.mobs.spical.gnollhero.chat_1=哦,看看这是谁,这不是为了寻找水晶之心的冒险者吗?
|
||||||
|
actors.mobs.spical.gnollhero.chat_2=你和祂正式签下了狩猎契约?好吧,这个荒无人烟的地方确实有很多需要狩猎的生物。
|
||||||
|
actors.mobs.spical.gnollhero.chat_3=集中精神,寻找交错的房间,你需要的猎物就在那里……
|
||||||
|
|
||||||
actors.mobs.bosses.sakafishboss.name=萨卡班甲鱼
|
actors.mobs.bosses.sakafishboss.name=萨卡班甲鱼
|
||||||
actors.mobs.bosses.sakafishboss.desc=曾经远古时代的海洋王者,因为不可避免的末日来临时,潜入了地底的阴暗水潭进入了沉睡。想着有朝一日回到大海,然而地牢的魔力和陆上的变化,它再也不可能回到那片理想的海洋。
|
actors.mobs.bosses.sakafishboss.desc=曾经远古时代的海洋王者,因为不可避免的末日来临时,潜入了地底的阴暗水潭进入了沉睡。想着有朝一日回到大海,然而地牢的魔力和陆上的变化,它再也不可能回到那片理想的海洋。
|
||||||
actors.mobs.bosses.sakafishboss.notice=sakasaka……saka?腻……系……甚磨?!
|
actors.mobs.bosses.sakafishboss.notice=sakasaka……saka?腻……系……甚磨?!
|
||||||
|
|
BIN
core/src/main/assets/sprites/npc/whitepinkgirl.png
Normal file
BIN
core/src/main/assets/sprites/npc/whitepinkgirl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.2 KiB |
BIN
core/src/main/assets/sprites/tribesman.png
Normal file
BIN
core/src/main/assets/sprites/tribesman.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.6 KiB |
|
@ -421,6 +421,9 @@ public class Assets {
|
||||||
public static final String ROT_LASH = "sprites/rot_lasher.png";
|
public static final String ROT_LASH = "sprites/rot_lasher.png";
|
||||||
public static final String ROT_HEART= "sprites/rot_heart.png";
|
public static final String ROT_HEART= "sprites/rot_heart.png";
|
||||||
public static final String GUARD = "sprites/guard.png";
|
public static final String GUARD = "sprites/guard.png";
|
||||||
|
|
||||||
|
public static final String HEROGNOLL = "sprites/tribesman.png";
|
||||||
|
|
||||||
public static final String WARDS = "sprites/wards.png";
|
public static final String WARDS = "sprites/wards.png";
|
||||||
public static final String GUARDIAN = "sprites/guardian.png";
|
public static final String GUARDIAN = "sprites/guardian.png";
|
||||||
public static final String SLIME = "sprites/slime.png";
|
public static final String SLIME = "sprites/slime.png";
|
||||||
|
|
|
@ -25,6 +25,7 @@ import static com.shatteredpixel.shatteredpixeldungeon.Challenges.RLPT;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Conducts;
|
import com.shatteredpixel.shatteredpixeldungeon.Conducts;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical.GnollHero;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -47,7 +48,7 @@ public class Bestiary {
|
||||||
case 1:
|
case 1:
|
||||||
//3x rat, 1x snake
|
//3x rat, 1x snake
|
||||||
return new ArrayList<>(Arrays.asList(
|
return new ArrayList<>(Arrays.asList(
|
||||||
Rat.class, Rat.class,
|
GnollHero.class, Rat.class,
|
||||||
Rat.class));
|
Rat.class));
|
||||||
case 2:
|
case 2:
|
||||||
return new ArrayList<>(Arrays.asList(Rat.class,
|
return new ArrayList<>(Arrays.asList(Rat.class,
|
||||||
|
|
|
@ -169,7 +169,7 @@ public class SakaFishBoss extends Boss {
|
||||||
@Override
|
@Override
|
||||||
public int drRoll() {
|
public int drRoll() {
|
||||||
AncientMysteryCityBossLevel.State level = ((AncientMysteryCityBossLevel)Dungeon.level).pro();
|
AncientMysteryCityBossLevel.State level = ((AncientMysteryCityBossLevel)Dungeon.level).pro();
|
||||||
return level == AncientMysteryCityBossLevel.State.FALL_BOSS ? 10 : 45;
|
return level == AncientMysteryCityBossLevel.State.FALL_BOSS ? 10 : 40;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -445,6 +445,7 @@ public class SakaFishBoss extends Boss {
|
||||||
} else {
|
} else {
|
||||||
endPos = leapPos;
|
endPos = leapPos;
|
||||||
}
|
}
|
||||||
|
|
||||||
//do leap
|
//do leap
|
||||||
sprite.visible = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[leapPos] || Dungeon.level.heroFOV[endPos];
|
sprite.visible = Dungeon.level.heroFOV[pos] || Dungeon.level.heroFOV[leapPos] || Dungeon.level.heroFOV[endPos];
|
||||||
sprite.dirtcar(pos, leapPos, new Callback() {
|
sprite.dirtcar(pos, leapPos, new Callback() {
|
||||||
|
@ -462,10 +463,13 @@ public class SakaFishBoss extends Boss {
|
||||||
Sample.INSTANCE.play(Assets.Sounds.HIT);
|
Sample.INSTANCE.play(Assets.Sounds.HIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!enemy.isAlive() && enemy == hero) {
|
Char ch = hero;
|
||||||
|
if(hero != null){
|
||||||
|
if (!ch.isAlive()) {
|
||||||
Dungeon.fail( getClass() );
|
Dungeon.fail( getClass() );
|
||||||
GLog.n( Messages.get(SakaFishBoss.class, "dictcar_kill"),Dungeon.hero.name() );
|
GLog.n( Messages.get(SakaFishBoss.class, "dictcar_kill"),Dungeon.hero.name() );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (endPos != leapPos){
|
if (endPos != leapPos){
|
||||||
Actor.addDelayed(new Pushing(SakaFishBoss.this, leapPos, endPos), -1);
|
Actor.addDelayed(new Pushing(SakaFishBoss.this, leapPos, endPos), -1);
|
||||||
|
|
|
@ -50,7 +50,6 @@ import com.shatteredpixel.shatteredpixeldungeon.levels.ItemLevel;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.SewerLevel;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.CharSprite;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.GhostSprite;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndQuest;
|
||||||
|
@ -292,6 +291,35 @@ public class Ghost extends NPC {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static void ghostQuest(){
|
||||||
|
float itemLevelRoll = Random.Float();
|
||||||
|
int itemLevel;
|
||||||
|
if (itemLevelRoll < 0.74f){
|
||||||
|
itemLevel = 0;
|
||||||
|
} else if (itemLevelRoll < 0.75f){
|
||||||
|
itemLevel = 1;
|
||||||
|
} else if (itemLevelRoll < 0.85f){
|
||||||
|
itemLevel = 2;
|
||||||
|
} else if (itemLevelRoll < 0.90f) {
|
||||||
|
itemLevel = 3;
|
||||||
|
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
||||||
|
Statistics.dageCollected = 1;
|
||||||
|
}
|
||||||
|
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) {
|
||||||
|
if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) {
|
||||||
|
Statistics.dageCollected = 2;
|
||||||
|
}
|
||||||
|
itemLevel = 4;
|
||||||
|
} else {
|
||||||
|
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
||||||
|
Statistics.dageCollected = 1;
|
||||||
|
}
|
||||||
|
itemLevel = 3;
|
||||||
|
}
|
||||||
|
weapon.upgrade(itemLevel);
|
||||||
|
armor.upgrade(itemLevel);
|
||||||
|
}
|
||||||
|
|
||||||
public static void spawn( SewerLevel level ) {
|
public static void spawn( SewerLevel level ) {
|
||||||
if (!spawned && Dungeon.depth > 1 && Random.Int( 5 - Dungeon.depth ) == 0) {
|
if (!spawned && Dungeon.depth > 1 && Random.Int( 5 - Dungeon.depth ) == 0) {
|
||||||
|
|
||||||
|
@ -325,35 +353,7 @@ public class Ghost extends NPC {
|
||||||
weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
||||||
|
|
||||||
//26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4
|
//26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4
|
||||||
float itemLevelRoll = Random.Float();
|
ghostQuest();
|
||||||
int itemLevel;
|
|
||||||
if (itemLevelRoll < 0.74f){
|
|
||||||
itemLevel = 0;
|
|
||||||
} else if (itemLevelRoll < 0.75f){
|
|
||||||
itemLevel = 1;
|
|
||||||
} else if (itemLevelRoll < 0.85f){
|
|
||||||
itemLevel = 2;
|
|
||||||
} else if (itemLevelRoll < 0.90f) {
|
|
||||||
itemLevel = 3;
|
|
||||||
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
|
||||||
Statistics.dageCollected = 1;
|
|
||||||
Badges.GhostDageCollected();
|
|
||||||
}
|
|
||||||
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)) {
|
|
||||||
if ((!Badges.isUnlocked(Badges.Badge.DAGETO))) {
|
|
||||||
Statistics.dageCollected = 2;
|
|
||||||
Badges.GhostDageCollected();
|
|
||||||
}
|
|
||||||
itemLevel = 4;
|
|
||||||
} else {
|
|
||||||
if ((!Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
|
||||||
Statistics.dageCollected = 1;
|
|
||||||
Badges.GhostDageCollected();
|
|
||||||
}
|
|
||||||
itemLevel = 3;
|
|
||||||
}
|
|
||||||
weapon.upgrade(itemLevel);
|
|
||||||
armor.upgrade(itemLevel);
|
|
||||||
|
|
||||||
//10% to be enchanted. We store it separately so enchant status isn't revealed early
|
//10% to be enchanted. We store it separately so enchant status isn't revealed early
|
||||||
if (Random.Int(10) == 0){
|
if (Random.Int(10) == 0){
|
||||||
|
@ -396,35 +396,7 @@ public class Ghost extends NPC {
|
||||||
Generator.Category c = Generator.wepTiers[wepTier - 1];
|
Generator.Category c = Generator.wepTiers[wepTier - 1];
|
||||||
weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
weapon = (MeleeWeapon) Reflection.newInstance(c.classes[Random.chances(c.probs)]);
|
||||||
|
|
||||||
//26%:+0, 25%:+1, 15%:+2, 10%:+3, 5%:+4, 5%+5
|
ghostQuest();
|
||||||
float itemLevelRoll = Random.Float();
|
|
||||||
int itemLevel;
|
|
||||||
if (itemLevelRoll < 0.74f){
|
|
||||||
itemLevel = 0;
|
|
||||||
} else if (itemLevelRoll < 0.75f){
|
|
||||||
itemLevel = 1;
|
|
||||||
} else if (itemLevelRoll < 0.85f){
|
|
||||||
itemLevel = 2;
|
|
||||||
} else if (itemLevelRoll < 0.90f) {
|
|
||||||
itemLevel = 3;
|
|
||||||
hero.sprite.showStatus( CharSprite.NEGATIVE, "+3!!!" );
|
|
||||||
} else if (itemLevelRoll < 0.95f && Badges.isUnlocked(Badges.Badge.GHOSTDAGE)){
|
|
||||||
hero.sprite.showStatus( CharSprite.POSITIVE, "+5!!!" );
|
|
||||||
if(( !Badges.isUnlocked(Badges.Badge.DAGETO))) {
|
|
||||||
Statistics.dageCollected = 2;
|
|
||||||
Badges.GhostDageCollected();
|
|
||||||
}
|
|
||||||
itemLevel = 5;
|
|
||||||
} else {
|
|
||||||
itemLevel = 4;
|
|
||||||
hero.sprite.showStatus( CharSprite.WARNING, "+4!!!" );
|
|
||||||
if(( !Badges.isUnlocked(Badges.Badge.GHOSTDAGE))) {
|
|
||||||
Statistics.dageCollected = 1;
|
|
||||||
Badges.GhostDageCollected();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
weapon.upgrade(itemLevel);
|
|
||||||
armor.upgrade(itemLevel);
|
|
||||||
|
|
||||||
//10% to be enchanted. We store it separately so enchant status isn't revealed early
|
//10% to be enchanted. We store it separately so enchant status isn't revealed early
|
||||||
if (Random.Int(10) == 0){
|
if (Random.Int(10) == 0){
|
||||||
|
|
|
@ -0,0 +1,49 @@
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.actors.mobs.spical;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.NTNPC;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.sprites.TribesmanSprite;
|
||||||
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
|
||||||
|
public class GnollHero extends NTNPC {
|
||||||
|
|
||||||
|
{
|
||||||
|
spriteClass = TribesmanSprite.class;
|
||||||
|
HP = HT = 120;
|
||||||
|
properties.add(Property.NPC);
|
||||||
|
baseSpeed = 2f;
|
||||||
|
chat = new ArrayList<String>() {
|
||||||
|
{
|
||||||
|
add(Messages.get(GnollHero.class, "chat_1"));
|
||||||
|
add(Messages.get(GnollHero.class, "chat_2"));
|
||||||
|
add(Messages.get(GnollHero.class, "chat_3"));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public float attackDelay() {
|
||||||
|
return 0.5f;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int damageRoll() {
|
||||||
|
return Random.NormalIntRange( 20, 40 );
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int attackSkill( Char target ) {
|
||||||
|
return 30;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int drRoll() {
|
||||||
|
return Random.NormalIntRange(10, 16);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -206,11 +206,6 @@ public class Speck extends Image {
|
||||||
|
|
||||||
case RED_LIGHT:
|
case RED_LIGHT:
|
||||||
tint(0xFFCC0000);
|
tint(0xFFCC0000);
|
||||||
case LIGHT:
|
|
||||||
angle = Random.Float( 360 );
|
|
||||||
angularSpeed = 90;
|
|
||||||
lifespan = 1f;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case DISCOVER:
|
case DISCOVER:
|
||||||
angle = Random.Float(360);
|
angle = Random.Float(360);
|
||||||
|
@ -535,6 +530,7 @@ public class Speck extends Image {
|
||||||
Speck p = (Speck) emitter.recycle(Speck.class);
|
Speck p = (Speck) emitter.recycle(Speck.class);
|
||||||
p.reset(index, x, y, type);
|
p.reset(index, x, y, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean lightMode() {
|
public boolean lightMode() {
|
||||||
return lightMode;
|
return lightMode;
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class Sai extends MeleeWeapon {
|
||||||
//50x0.1+7x0.5+1=10+3.5+1=15
|
//50x0.1+7x0.5+1=10+3.5+1=15
|
||||||
if(attacker.HP >= attacker.HT){
|
if(attacker.HP >= attacker.HT){
|
||||||
GLog.p("血量已满!无法回血");
|
GLog.p("血量已满!无法回血");
|
||||||
} else if (Random.Int(10)==2) {
|
} else if (Random.Int(10)<=4) {
|
||||||
R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5);
|
R = (int) (attacker.HT * 0.1 + (buffedLvl() * 0.5) + 1.5);
|
||||||
attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5;
|
attacker.HP +=attacker.HT * 0.1 + (buffedLvl()) + 1.5;
|
||||||
attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP"));
|
attacker.sprite.showStatus(CharSprite.POSITIVE, ("+" + R + "HP"));
|
||||||
|
|
|
@ -0,0 +1,156 @@
|
||||||
|
/*
|
||||||
|
* 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 <http://www.gnu.org/licenses/>
|
||||||
|
*/
|
||||||
|
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.levels.features;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.levels.Level;
|
||||||
|
import com.watabou.utils.Bundlable;
|
||||||
|
import com.watabou.utils.Bundle;
|
||||||
|
import com.watabou.utils.Point;
|
||||||
|
import com.watabou.utils.Random;
|
||||||
|
import com.watabou.utils.Rect;
|
||||||
|
|
||||||
|
public class LevelTransition extends Rect implements Bundlable {
|
||||||
|
|
||||||
|
public enum Type {
|
||||||
|
SURFACE,
|
||||||
|
REGULAR_ENTRANCE,
|
||||||
|
REGULAR_EXIT,
|
||||||
|
BRANCH_ENTRANCE,
|
||||||
|
BRANCH_EXIT;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Type type;
|
||||||
|
public int destDepth;
|
||||||
|
public int destBranch;
|
||||||
|
public Type destType;
|
||||||
|
|
||||||
|
public int centerCell;
|
||||||
|
|
||||||
|
//for bundling
|
||||||
|
public LevelTransition(){
|
||||||
|
super();
|
||||||
|
}
|
||||||
|
|
||||||
|
public LevelTransition(Level level, int cell, Type type, int destDepth, int destBranch, Type destType){
|
||||||
|
centerCell = cell;
|
||||||
|
Point p = level.cellToPoint(cell);
|
||||||
|
set(p.x, p.y, p.x, p.y);
|
||||||
|
this.type = type;
|
||||||
|
this.destDepth = destDepth;
|
||||||
|
this.destBranch = destBranch;
|
||||||
|
this.destType = destType;
|
||||||
|
}
|
||||||
|
|
||||||
|
//gives default values for common transition types
|
||||||
|
public LevelTransition(Level level, int cell, Type type){
|
||||||
|
centerCell = cell;
|
||||||
|
Point p = level.cellToPoint(cell);
|
||||||
|
set(p.x, p.y, p.x, p.y);
|
||||||
|
this.type = type;
|
||||||
|
switch (type){
|
||||||
|
case REGULAR_ENTRANCE: default:
|
||||||
|
destDepth = Dungeon.depth-1;
|
||||||
|
destBranch = Dungeon.branch;
|
||||||
|
destType = Type.REGULAR_EXIT;
|
||||||
|
break;
|
||||||
|
case REGULAR_EXIT:
|
||||||
|
destDepth = Dungeon.depth+1;
|
||||||
|
destBranch = Dungeon.branch;
|
||||||
|
destType = Type.REGULAR_ENTRANCE;
|
||||||
|
break;
|
||||||
|
case SURFACE:
|
||||||
|
destDepth = 0;
|
||||||
|
destBranch = 0;
|
||||||
|
destType = null;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//note that the center cell isn't always the actual center.
|
||||||
|
// It is important when game logic needs to pick a specific cell for some action
|
||||||
|
// e.g. where to place the hero
|
||||||
|
public int cell(){
|
||||||
|
return centerCell;
|
||||||
|
}
|
||||||
|
|
||||||
|
//Transitions are inclusive to their right and bottom sides
|
||||||
|
@Override
|
||||||
|
public int width() {
|
||||||
|
return super.width()+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int height() {
|
||||||
|
return super.height()+1;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean inside(Point p) {
|
||||||
|
return p.x >= left && p.x <= right && p.y >= top && p.y <= bottom;
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean inside(int cell){
|
||||||
|
return inside(new Point(Dungeon.level.cellToPoint(cell)));
|
||||||
|
}
|
||||||
|
|
||||||
|
public Point center() {
|
||||||
|
return new Point(
|
||||||
|
(left + right) / 2 + (((right - left) % 2) == 1 ? Random.Int( 2 ) : 0),
|
||||||
|
(top + bottom) / 2 + (((bottom - top) % 2) == 1 ? Random.Int( 2 ) : 0) );
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final String TYPE = "type";
|
||||||
|
public static final String DEST_DEPTH = "dest_depth";
|
||||||
|
public static final String DEST_BRANCH = "dest_branch";
|
||||||
|
public static final String DEST_TYPE = "dest_type";
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void storeInBundle(Bundle bundle) {
|
||||||
|
bundle.put( "left", left );
|
||||||
|
bundle.put( "top", top );
|
||||||
|
bundle.put( "right", right );
|
||||||
|
bundle.put( "bottom", bottom );
|
||||||
|
|
||||||
|
bundle.put( "center", centerCell );
|
||||||
|
|
||||||
|
bundle.put(TYPE, type);
|
||||||
|
bundle.put(DEST_DEPTH, destDepth);
|
||||||
|
bundle.put(DEST_BRANCH, destBranch);
|
||||||
|
bundle.put(DEST_TYPE, destType);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void restoreFromBundle(Bundle bundle) {
|
||||||
|
left = bundle.getInt( "left" );
|
||||||
|
top = bundle.getInt( "top" );
|
||||||
|
right = bundle.getInt( "right" );
|
||||||
|
bottom = bundle.getInt( "bottom" );
|
||||||
|
|
||||||
|
centerCell = bundle.getInt( "center" );
|
||||||
|
|
||||||
|
type = bundle.getEnum(TYPE, Type.class);
|
||||||
|
destDepth = bundle.getInt(DEST_DEPTH);
|
||||||
|
destBranch = bundle.getInt(DEST_BRANCH);
|
||||||
|
if (bundle.contains(DEST_TYPE)) destType = bundle.getEnum(DEST_TYPE, Type.class);
|
||||||
|
}
|
||||||
|
}
|
|
@ -121,11 +121,12 @@ public class YinYangRoom extends SpecialRoom {
|
||||||
if(Dungeon.depth == 1){
|
if(Dungeon.depth == 1){
|
||||||
door.set(Door.Type.REGULAR);
|
door.set(Door.Type.REGULAR);
|
||||||
} else {
|
} else {
|
||||||
|
level.addItemToSpawn( new IronKey( Dungeon.depth ) );
|
||||||
door.set(Door.Type.LOCKED);
|
door.set(Door.Type.LOCKED);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
level.addItemToSpawn( new IronKey( Dungeon.depth ) );
|
|
||||||
level.addItemToSpawn( new CrystalKey( Dungeon.depth ) );
|
level.addItemToSpawn( new CrystalKey( Dungeon.depth ) );
|
||||||
level.addItemToSpawn( new PotionOfLevitation());
|
level.addItemToSpawn( new PotionOfLevitation());
|
||||||
|
|
||||||
|
|
|
@ -53,8 +53,6 @@ public class Messages {
|
||||||
return lang;
|
return lang;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Setup Methods
|
* Setup Methods
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -96,8 +96,8 @@ public class CellSelector extends ScrollArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//then mobs
|
Mob[] mobs = Dungeon.level.mobs.toArray(new Mob[0]);
|
||||||
for (Char mob : Dungeon.level.mobs.toArray(new Mob[0])){
|
for (Char mob : mobs) {
|
||||||
if (mob.sprite != null && mob.sprite.overlapsPoint( p.x, p.y )){
|
if (mob.sprite != null && mob.sprite.overlapsPoint( p.x, p.y )){
|
||||||
PointF c = DungeonTilemap.tileCenterToWorld(mob.pos);
|
PointF c = DungeonTilemap.tileCenterToWorld(mob.pos);
|
||||||
if (Math.abs(p.x - c.x) <= 12 && Math.abs(p.y - c.y) <= 12) {
|
if (Math.abs(p.x - c.x) <= 12 && Math.abs(p.y - c.y) <= 12) {
|
||||||
|
@ -106,6 +106,16 @@ public class CellSelector extends ScrollArea {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//then mobs
|
||||||
|
// for (Char mob : Dungeon.level.mobs.toArray(new Mob[0])){
|
||||||
|
// if (mob.sprite != null && mob.sprite.overlapsPoint( p.x, p.y )){
|
||||||
|
// PointF c = DungeonTilemap.tileCenterToWorld(mob.pos);
|
||||||
|
// if (Math.abs(p.x - c.x) <= 12 && Math.abs(p.y - c.y) <= 12) {
|
||||||
|
// select(mob.pos, event.button);
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
//then heaps
|
//then heaps
|
||||||
for (Heap heap : Dungeon.level.heaps.valueList()){
|
for (Heap heap : Dungeon.level.heaps.valueList()){
|
||||||
|
|
|
@ -0,0 +1,29 @@
|
||||||
|
package com.shatteredpixel.shatteredpixeldungeon.sprites;
|
||||||
|
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.watabou.noosa.TextureFilm;
|
||||||
|
|
||||||
|
public class TribesmanSprite extends MobSprite {
|
||||||
|
|
||||||
|
public TribesmanSprite() {
|
||||||
|
super();
|
||||||
|
|
||||||
|
texture( Assets.Sprites.HEROGNOLL );
|
||||||
|
|
||||||
|
TextureFilm frames = new TextureFilm( texture, 13, 16 );
|
||||||
|
|
||||||
|
idle = new Animation( 2, true );
|
||||||
|
idle.frames( frames, 0, 0, 0, 1, 0, 0, 1, 1 );
|
||||||
|
|
||||||
|
run = new Animation( 12, true );
|
||||||
|
run.frames( frames, 5, 6, 7, 8 );
|
||||||
|
|
||||||
|
attack = new Animation( 12, false );
|
||||||
|
attack.frames( frames, 2, 3, 4, 0 );
|
||||||
|
|
||||||
|
die = new Animation( 12, false );
|
||||||
|
die.frames( frames, 9, 10, 11 );
|
||||||
|
|
||||||
|
play( idle );
|
||||||
|
}
|
||||||
|
}
|
|
@ -143,7 +143,7 @@ public class vM0_6_7_X_Changes {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void add_v0_6_55_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
public static void add_v0_6_55_Changes( ArrayList<ChangeInfo> changeInfos ) {
|
||||||
ChangeInfo changes = new ChangeInfo("v0.6.4.0-BetaI-XI", true, "");
|
ChangeInfo changes = new ChangeInfo("v0.6.4.0-BetaI-XIII", true, "");
|
||||||
changes.hardlight(Window.TITLE_COLOR);
|
changes.hardlight(Window.TITLE_COLOR);
|
||||||
changeInfos.add(changes);
|
changeInfos.add(changes);
|
||||||
|
|
||||||
|
@ -198,6 +198,9 @@ public class vM0_6_7_X_Changes {
|
||||||
changes.hardlight(Window.CYELLOW);
|
changes.hardlight(Window.CYELLOW);
|
||||||
changeInfos.add(changes);
|
changeInfos.add(changes);
|
||||||
|
|
||||||
|
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta13"),
|
||||||
|
("修复了一些吸血权重问题。")));
|
||||||
|
|
||||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WRALIPS), ("暗金宝石护符"),
|
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.WRALIPS), ("暗金宝石护符"),
|
||||||
("现在最高上限+10,并调整优化了一些问题")));
|
("现在最高上限+10,并调整优化了一些问题")));
|
||||||
|
|
||||||
|
@ -219,7 +222,7 @@ public class vM0_6_7_X_Changes {
|
||||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSHIELD), ("5阶武器"),
|
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.GREATSHIELD), ("5阶武器"),
|
||||||
("现在5阶武器生成平均化")));
|
("现在5阶武器生成平均化")));
|
||||||
|
|
||||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀"),
|
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.SAI), ("吸血鬼刀-Beta12"),
|
||||||
("优化数值,调整吸血权重。")));
|
("优化数值,调整吸血权重。")));
|
||||||
|
|
||||||
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG3), ("归溯钥剑"),
|
changes.addButton(new ChangeButton(new ItemSprite(ItemSpriteSheet.DG3), ("归溯钥剑"),
|
||||||
|
|
|
@ -22,9 +22,9 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
package com.shatteredpixel.shatteredpixeldungeon.windows;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
import com.shatteredpixel.shatteredpixeldungeon.Chrome;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.mobs.npcs.Ghost;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
|
||||||
|
@ -113,6 +113,9 @@ public class WndSadGhost extends Window {
|
||||||
reward.identify(false);
|
reward.identify(false);
|
||||||
if (reward.doPickUp( Dungeon.hero )) {
|
if (reward.doPickUp( Dungeon.hero )) {
|
||||||
GLog.i( Messages.get(Dungeon.hero, "you_now_have", reward.name()) );
|
GLog.i( Messages.get(Dungeon.hero, "you_now_have", reward.name()) );
|
||||||
|
if(reward.level() == 4 || reward.level() == 3){
|
||||||
|
Badges.GhostDageCollected();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Dungeon.level.drop( reward, ghost.pos ).sprite.drop();
|
Dungeon.level.drop( reward, ghost.pos ).sprite.drop();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user