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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -85,47 +85,47 @@ public class Speck extends Image {
|
||||||
public Speck() {
|
public Speck() {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
texture( Assets.Effects.SPECKS );
|
texture(Assets.Effects.SPECKS);
|
||||||
if (film == null) {
|
if (film == null) {
|
||||||
film = new TextureFilm( texture, SIZE, SIZE );
|
film = new TextureFilm(texture, SIZE, SIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
origin.set( SIZE / 2f );
|
origin.set(SIZE / 2f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public Speck image( int type ){
|
public Speck image(int type) {
|
||||||
reset(0, 0, 0, type);
|
reset(0, 0, 0, type);
|
||||||
|
|
||||||
left = lifespan = Float.POSITIVE_INFINITY;
|
left = lifespan = Float.POSITIVE_INFINITY;
|
||||||
this.type = -1;
|
this.type = -1;
|
||||||
|
|
||||||
resetColor();
|
resetColor();
|
||||||
scale.set( 1 );
|
scale.set(1);
|
||||||
speed.set( 0 );
|
speed.set(0);
|
||||||
acc.set( 0 );
|
acc.set(0);
|
||||||
angle = 0;
|
angle = 0;
|
||||||
angularSpeed = 0;
|
angularSpeed = 0;
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void reset( int index, float x, float y, int type ) {
|
public void reset(int index, float x, float y, int type) {
|
||||||
revive();
|
revive();
|
||||||
|
|
||||||
this.type = type;
|
this.type = type;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DISCOVER:
|
case DISCOVER:
|
||||||
case RED_LIGHT:
|
case RED_LIGHT:
|
||||||
frame( film.get( LIGHT ) );
|
frame(film.get(LIGHT));
|
||||||
break;
|
break;
|
||||||
case EVOKE:
|
case EVOKE:
|
||||||
case MASK:
|
case MASK:
|
||||||
case KIT:
|
case KIT:
|
||||||
case FORGE:
|
case FORGE:
|
||||||
frame( film.get( STAR ) );
|
frame(film.get(STAR));
|
||||||
break;
|
break;
|
||||||
case RATTLE:
|
case RATTLE:
|
||||||
frame( film.get( BONE ) );
|
frame(film.get(BONE));
|
||||||
break;
|
break;
|
||||||
case JET:
|
case JET:
|
||||||
case TOXIC:
|
case TOXIC:
|
||||||
|
@ -139,81 +139,76 @@ public class Speck extends Image {
|
||||||
case SMOKE:
|
case SMOKE:
|
||||||
case BLIZZARD:
|
case BLIZZARD:
|
||||||
case INFERNO:
|
case INFERNO:
|
||||||
frame( film.get( STEAM ) );
|
frame(film.get(STEAM));
|
||||||
break;
|
break;
|
||||||
case CALM:
|
case CALM:
|
||||||
frame( film.get( SCREAM ) );
|
frame(film.get(SCREAM));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
frame( film.get( type ) );
|
frame(film.get(type));
|
||||||
}
|
}
|
||||||
|
|
||||||
this.x = x - origin.x;
|
this.x = x - origin.x;
|
||||||
this.y = y - origin.y;
|
this.y = y - origin.y;
|
||||||
|
|
||||||
resetColor();
|
resetColor();
|
||||||
scale.set( 1 );
|
scale.set(1);
|
||||||
speed.set( 0 );
|
speed.set(0);
|
||||||
acc.set( 0 );
|
acc.set(0);
|
||||||
angle = 0;
|
angle = 0;
|
||||||
angularSpeed = 0;
|
angularSpeed = 0;
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|
||||||
case HEALING:
|
case HEALING:
|
||||||
speed.set( 0, -20 );
|
speed.set(0, -20);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STAR:
|
case STAR:
|
||||||
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 128 ) );
|
speed.polar(Random.Float(2 * 3.1415926f), Random.Float(128));
|
||||||
acc.set( 0, 128 );
|
acc.set(0, 128);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = Random.Float( -360, +360 );
|
angularSpeed = Random.Float(-360, +360);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case FORGE:
|
case FORGE:
|
||||||
speed.polar( Random.Float( -3.1415926f ), Random.Float( 64 ) );
|
speed.polar(Random.Float(-3.1415926f), Random.Float(64));
|
||||||
acc.set( 0, 128 );
|
acc.set(0, 128);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = Random.Float( -360, +360 );
|
angularSpeed = Random.Float(-360, +360);
|
||||||
lifespan = 0.51f;
|
lifespan = 0.51f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVOKE:
|
case EVOKE:
|
||||||
speed.polar( Random.Float( -3.1415926f ), 50 );
|
speed.polar(Random.Float(-3.1415926f), 50);
|
||||||
acc.set( 0, 50 );
|
acc.set(0, 50);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = Random.Float( -180, +180 );
|
angularSpeed = Random.Float(-180, +180);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case KIT:
|
case KIT:
|
||||||
speed.polar( index * 3.1415926f / 5, 50 );
|
speed.polar(index * 3.1415926f / 5, 50);
|
||||||
acc.set( -speed.x, -speed.y );
|
acc.set(-speed.x, -speed.y);
|
||||||
angle = index * 36;
|
angle = index * 36;
|
||||||
angularSpeed = 360;
|
angularSpeed = 360;
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MASK:
|
case MASK:
|
||||||
speed.set( Random.Int( 2 ) == 0 ? Random.Float( -128, -64 ) : Random.Float( +64, +128 ), 0 );
|
speed.set(Random.Int(2) == 0 ? Random.Float(-128, -64) : Random.Float(+64, +128), 0);
|
||||||
angularSpeed = speed.x < 0 ? -180 : +180;
|
angularSpeed = speed.x < 0 ? -180 : +180;
|
||||||
acc.set( -speed.x, 0 );
|
acc.set(-speed.x, 0);
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
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);
|
||||||
angularSpeed = 90;
|
angularSpeed = 90;
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
am = 0;
|
am = 0;
|
||||||
|
@ -224,7 +219,7 @@ public class Speck extends Image {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UP:
|
case UP:
|
||||||
speed.set( 0, -20 );
|
speed.set(0, -20);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -236,159 +231,159 @@ public class Speck extends Image {
|
||||||
|
|
||||||
case BONE:
|
case BONE:
|
||||||
lifespan = 0.2f;
|
lifespan = 0.2f;
|
||||||
speed.polar( Random.Float( 2 * 3.1415926f ), 24 / lifespan );
|
speed.polar(Random.Float(2 * 3.1415926f), 24 / lifespan);
|
||||||
acc.set( 0, 128 );
|
acc.set(0, 128);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = 360;
|
angularSpeed = 360;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case RATTLE:
|
case RATTLE:
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
speed.set( 0, -100 );
|
speed.set(0, -100);
|
||||||
acc.set( 0, -2 * speed.y / lifespan );
|
acc.set(0, -2 * speed.y / lifespan);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = 360;
|
angularSpeed = 360;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WOOL:
|
case WOOL:
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
speed.set( 0, -50 );
|
speed.set(0, -50);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = Random.Float( -360, +360 );
|
angularSpeed = Random.Float(-360, +360);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ROCK:
|
case ROCK:
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
angularSpeed = Random.Float( -360, +360 );
|
angularSpeed = Random.Float(-360, +360);
|
||||||
scale.set( Random.Float( 1, 2 ) );
|
scale.set(Random.Float(1, 2));
|
||||||
speed.set( 0, 64 );
|
speed.set(0, 64);
|
||||||
lifespan = 0.2f;
|
lifespan = 0.2f;
|
||||||
this.y -= speed.y * lifespan;
|
this.y -= speed.y * lifespan;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NOTE:
|
case NOTE:
|
||||||
angularSpeed = Random.Float( -30, +30 );
|
angularSpeed = Random.Float(-30, +30);
|
||||||
speed.polar( (angularSpeed - 90) * PointF.G2R, 30 );
|
speed.polar((angularSpeed - 90) * PointF.G2R, 30);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHANGE:
|
case CHANGE:
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
speed.polar( (angle - 90) * PointF.G2R, Random.Float( 4, 12 ) );
|
speed.polar((angle - 90) * PointF.G2R, Random.Float(4, 12));
|
||||||
lifespan = 1.5f;
|
lifespan = 1.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HEART:
|
case HEART:
|
||||||
speed.set( Random.Int( -10, +10 ), -40 );
|
speed.set(Random.Int(-10, +10), -40);
|
||||||
angularSpeed = Random.Float( -45, +45 );
|
angularSpeed = Random.Float(-45, +45);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BUBBLE:
|
case BUBBLE:
|
||||||
speed.set( 0, -15 );
|
speed.set(0, -15);
|
||||||
scale.set( Random.Float( 0.8f, 1 ) );
|
scale.set(Random.Float(0.8f, 1));
|
||||||
lifespan = Random.Float( 0.8f, 1.5f );
|
lifespan = Random.Float(0.8f, 1.5f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STEAM:
|
case STEAM:
|
||||||
speed.y = -Random.Float( 10, 15 );
|
speed.y = -Random.Float(10, 15);
|
||||||
angularSpeed = Random.Float( +180 );
|
angularSpeed = Random.Float(+180);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = 1f;
|
lifespan = 1f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JET:
|
case JET:
|
||||||
speed.y = +32;
|
speed.y = +32;
|
||||||
acc.y = -64;
|
acc.y = -64;
|
||||||
angularSpeed = Random.Float( 180, 360 );
|
angularSpeed = Random.Float(180, 360);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TOXIC:
|
case TOXIC:
|
||||||
hardlight( 0x50FF60 );
|
hardlight(0x50FF60);
|
||||||
angularSpeed = 30;
|
angularSpeed = 30;
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DIED:
|
case DIED:
|
||||||
if(Dungeon.depth==27){
|
if (Dungeon.depth == 27) {
|
||||||
hardlight(0x0);
|
hardlight(0x0);
|
||||||
} else {
|
} else {
|
||||||
hardlight(0xff5060);
|
hardlight(0xff5060);
|
||||||
}
|
}
|
||||||
|
|
||||||
angularSpeed = 30;
|
angularSpeed = 30;
|
||||||
angle =Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f,3f);
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CORROSION:
|
case CORROSION:
|
||||||
hardlight( 0xAAAAAA );
|
hardlight(0xAAAAAA);
|
||||||
angularSpeed = 30;
|
angularSpeed = 30;
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PARALYSIS:
|
case PARALYSIS:
|
||||||
hardlight( 0xFFFF66 );
|
hardlight(0xFFFF66);
|
||||||
angularSpeed = -30;
|
angularSpeed = -30;
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STENCH:
|
case STENCH:
|
||||||
hardlight( 0x003300 );
|
hardlight(0x003300);
|
||||||
angularSpeed = -30;
|
angularSpeed = -30;
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CONFUSION:
|
case CONFUSION:
|
||||||
hardlight( Random.Int( 0x1000000 ) | 0x000080 );
|
hardlight(Random.Int(0x1000000) | 0x000080);
|
||||||
angularSpeed = Random.Float( -20, +20 );
|
angularSpeed = Random.Float(-20, +20);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STORM:
|
case STORM:
|
||||||
hardlight( 0x8AD8D8 );
|
hardlight(0x8AD8D8);
|
||||||
angularSpeed = Random.Float( -20, +20 );
|
angularSpeed = Random.Float(-20, +20);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case INFERNO:
|
case INFERNO:
|
||||||
hardlight( 0xEE7722 );
|
hardlight(0xEE7722);
|
||||||
angularSpeed = Random.Float( 200, 300 ) * (Random.Int(2) == 0 ? -1 : 1);
|
angularSpeed = Random.Float(200, 300) * (Random.Int(2) == 0 ? -1 : 1);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BLIZZARD:
|
case BLIZZARD:
|
||||||
hardlight( 0xFFFFFF );
|
hardlight(0xFFFFFF);
|
||||||
angularSpeed = Random.Float( 200, 300 ) * (Random.Int(2) == 0 ? -1 : 1);
|
angularSpeed = Random.Float(200, 300) * (Random.Int(2) == 0 ? -1 : 1);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 3f );
|
lifespan = Random.Float(1f, 3f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SMOKE:
|
case SMOKE:
|
||||||
hardlight( 0x000000 );
|
hardlight(0x000000);
|
||||||
angularSpeed = 30;
|
angularSpeed = 30;
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
lifespan = Random.Float( 1f, 1.5f );
|
lifespan = Random.Float(1f, 1.5f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DUST:
|
case DUST:
|
||||||
hardlight( 0xFFFF66 );
|
hardlight(0xFFFF66);
|
||||||
angle = Random.Float( 360 );
|
angle = Random.Float(360);
|
||||||
speed.polar( Random.Float( 2 * 3.1415926f ), Random.Float( 16, 48 ) );
|
speed.polar(Random.Float(2 * 3.1415926f), Random.Float(16, 48));
|
||||||
lifespan = 0.5f;
|
lifespan = 0.5f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COIN:
|
case COIN:
|
||||||
speed.polar( -PointF.PI * Random.Float( 0.3f, 0.7f ), Random.Float( 48, 96 ) );
|
speed.polar(-PointF.PI * Random.Float(0.3f, 0.7f), Random.Float(48, 96));
|
||||||
acc.y = 256;
|
acc.y = 256;
|
||||||
lifespan = -speed.y / acc.y * 2;
|
lifespan = -speed.y / acc.y * 2;
|
||||||
break;
|
break;
|
||||||
|
@ -414,7 +409,7 @@ public class Speck extends Image {
|
||||||
|
|
||||||
case STAR:
|
case STAR:
|
||||||
case FORGE:
|
case FORGE:
|
||||||
scale.set( 1 - p );
|
scale.set(1 - p);
|
||||||
am = p < 0.2f ? p * 5f : (1 - p) * 1.25f;
|
am = p < 0.2f ? p * 5f : (1 - p) * 1.25f;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -431,26 +426,26 @@ public class Speck extends Image {
|
||||||
|
|
||||||
case RED_LIGHT:
|
case RED_LIGHT:
|
||||||
case LIGHT:
|
case LIGHT:
|
||||||
am = scale.set( p < 0.2f ? p * 5f : (1 - p) * 1.25f ).x;
|
am = scale.set(p < 0.2f ? p * 5f : (1 - p) * 1.25f).x;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case DISCOVER:
|
case DISCOVER:
|
||||||
am = 1 - p;
|
am = 1 - p;
|
||||||
scale.set( (p < 0.5f ? p : 1 - p) * 2 );
|
scale.set((p < 0.5f ? p : 1 - p) * 2);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case QUESTION:
|
case QUESTION:
|
||||||
scale.set( (float)(Math.sqrt( p < 0.5f ? p : 1 - p ) * 3) );
|
scale.set((float) (Math.sqrt(p < 0.5f ? p : 1 - p) * 3));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UP:
|
case UP:
|
||||||
scale.set( (float)(Math.sqrt( p < 0.5f ? p : 1 - p ) * 2) );
|
scale.set((float) (Math.sqrt(p < 0.5f ? p : 1 - p) * 2));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CALM:
|
case CALM:
|
||||||
case SCREAM:
|
case SCREAM:
|
||||||
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) * 2f );
|
am = (float) Math.sqrt((p < 0.5f ? p : 1 - p) * 2f);
|
||||||
scale.set( p * 7 );
|
scale.set(p * 7);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case BONE:
|
case BONE:
|
||||||
|
@ -459,7 +454,7 @@ public class Speck extends Image {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ROCK:
|
case ROCK:
|
||||||
am = p < 0.2f ? p * 5 : 1 ;
|
am = p < 0.2f ? p * 5 : 1;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case NOTE:
|
case NOTE:
|
||||||
|
@ -467,17 +462,17 @@ public class Speck extends Image {
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WOOL:
|
case WOOL:
|
||||||
scale.set( 1 - p );
|
scale.set(1 - p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CHANGE:
|
case CHANGE:
|
||||||
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) * 2);
|
am = (float) Math.sqrt((p < 0.5f ? p : 1 - p) * 2);
|
||||||
scale.y = (1 + p) * 0.5f;
|
scale.y = (1 + p) * 0.5f;
|
||||||
scale.x = scale.y * (float)Math.cos( left * 15 );
|
scale.x = scale.y * (float) Math.cos(left * 15);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HEART:
|
case HEART:
|
||||||
scale.set( 1 - p );
|
scale.set(1 - p);
|
||||||
am = 1 - p * p;
|
am = 1 - p * p;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -494,53 +489,54 @@ public class Speck extends Image {
|
||||||
case BLIZZARD:
|
case BLIZZARD:
|
||||||
case INFERNO:
|
case INFERNO:
|
||||||
case DUST:
|
case DUST:
|
||||||
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) * 0.5f );
|
am = (float) Math.sqrt((p < 0.5f ? p : 1 - p) * 0.5f);
|
||||||
scale.set( 1 + p );
|
scale.set(1 + p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case CORROSION:
|
case CORROSION:
|
||||||
hardlight( ColorMath.interpolate( 0xAAAAAA, 0xFF8800 , p ));
|
hardlight(ColorMath.interpolate(0xAAAAAA, 0xFF8800, p));
|
||||||
case STENCH:
|
case STENCH:
|
||||||
case SMOKE:
|
case SMOKE:
|
||||||
am = (float)Math.sqrt( (p < 0.5f ? p : 1 - p) );
|
am = (float) Math.sqrt((p < 0.5f ? p : 1 - p));
|
||||||
scale.set( 1 + p );
|
scale.set(1 + p);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case JET:
|
case JET:
|
||||||
am = (p < 0.5f ? p : 1 - p) * 2;
|
am = (p < 0.5f ? p : 1 - p) * 2;
|
||||||
scale.set( p * 1.5f );
|
scale.set(p * 1.5f);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case COIN:
|
case COIN:
|
||||||
scale.x = (float)Math.cos( left * 5 );
|
scale.x = (float) Math.cos(left * 5);
|
||||||
rm = gm = bm = (Math.abs( scale.x ) + 1) * 0.5f;
|
rm = gm = bm = (Math.abs(scale.x) + 1) * 0.5f;
|
||||||
am = p < 0.9f ? 1 : (1 - p) * 10;
|
am = p < 0.9f ? 1 : (1 - p) * 10;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type ) {
|
public static Emitter.Factory factory(final int type) {
|
||||||
return factory( type, false );
|
return factory(type, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Emitter.Factory factory( final int type, final boolean lightMode ) {
|
public static Emitter.Factory factory(final int type, final boolean lightMode) {
|
||||||
|
|
||||||
Emitter.Factory factory = factories.get( type );
|
Emitter.Factory factory = factories.get(type);
|
||||||
|
|
||||||
if (factory == null) {
|
if (factory == null) {
|
||||||
factory = new Emitter.Factory() {
|
factory = new Emitter.Factory() {
|
||||||
@Override
|
@Override
|
||||||
public void emit ( Emitter emitter, int index, float x, float y ) {
|
public void emit(Emitter emitter, int index, float x, float y) {
|
||||||
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;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
factories.put( type, factory );
|
factories.put(type, factory);
|
||||||
}
|
}
|
||||||
|
|
||||||
return factory;
|
return factory;
|
||||||
|
|
|
@ -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