Skip to content

Commit

Permalink
Merge pull request #5 from egoal/0.4.3
Browse files Browse the repository at this point in the history
0.4.3
  • Loading branch information
egoal authored Aug 1, 2020
2 parents c73e5d6 + 2192f10 commit ee7baca
Show file tree
Hide file tree
Showing 126 changed files with 3,873 additions and 2,639 deletions.
4 changes: 2 additions & 2 deletions core/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.egoal.darkestpixeldungeon"
android:installLocation="auto"
android:versionCode="36"
android:versionName="0.4.2a">
android:versionCode="37"
android:versionName="0.4.3">

<uses-permission android:name="android.permission.VIBRATE" />

Expand Down
Binary file added core/src/main/assets/actors/seeker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added core/src/main/assets/actors/slug.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 11 additions & 11 deletions core/src/main/assets/data/CavesBossLevel.map
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 1 1 1 4 4 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4
4 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4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 1 1 1 1 1 1 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4
75 changes: 38 additions & 37 deletions core/src/main/assets/data/mobs.csv
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
NAME,HT,atkSkill,defSkill,EXP,maxLvl,lootChance,loot,minDamage,maxDamage,typeDamage,minDefend,maxDefend,magicalResistance,FIRE,POISON,ICE,LIGHT,SHADOW,HOLY,Properties
Rat,8,8,2,1,5,,,1,4,,0,1,,-0.3,0.1,,,,,
Gnoll,12,10,4,2,8,0.3,Gold,1,5,,0,2,,,,,,,,
Crab,16,12,5,4,9,0.1667,MysteryMeat,2,8,,0,3,-0.2,,,0.1,-0.2,,,
FetidRat,20,12,5,4,5,,,1,4,,0,2,,,0.2,,,0.2,-0.25,MINIBOSS DEMONIC
GnollTrickster,20,16,5,5,8,1,,1,5,,0,2,,,,-0.2,,,,MINIBOSS
GreatCrab,25,12,0,6,9,0.1667,,1,8,,0,4,,,,0.1,-0.2,,,MINIBOSS
Goo,100,,8,10,,0.333,LloydsBeacon,,,,0,2,0.25,-0.25,0.2,,,,-0.3,BOSS DEMONIC
Swarm,50,10,5,3,9,0.1667,PotionOfHealing,,,,,,,,,,,,,
Skeleton,25,12,9,5,10,0.175,,2,10,,1,2,,-0.3,,,,,-0.3,UNDEAD
Thief,20,12,6,5,10,0.01,MasterThievesArmband,1,10,,0,3,0.15,,0.2,-0.15,,,-0.2,DEMONIC
Shaman,18,11,8,6,14,0.25,,2,8,MAGICAL,0,4,0.15,0.1,-0.2,0.2,0.3,,,
Guard,40,14,10,6,14,0.25,,4,12,,0,6,-0.2,,,,,,,DEMONIC
RotHeart,80,,0,4,,,,,,,0,5,0.5,,0.5,,,,,IMMOVABLE MINIBOSS
NewbornElemental,65,25,12,7,20,,,16,26,,0,5,0.2,0.5,,-1,,,-0.25,DEMONIC MINIBOSS
Tengu,150,20,15,20,,,,6,16,,0,5,0.25,,0.2,-0.25,,,,BOSS
SkeletonKnight,50,18,0,8,16,0.1,Wine,6,18,,1,6,-0.2,-0.25,,,,0.25,-0.3,UNDEAD
AshesSkull,20,1000,10,6,15,,,4,12,NORMAL,0,3,0.3,0.3,,-0.2,,0.2,-0.3,UNDEAD
Bat,30,16,15,7,15,0.15,PotionOfHealing,5,15,,0,5,,-0.15,,0.3,,0.2,-0.2,
Brute,40,20,15,8,15,0.2,Gold,8,24,,0,8,,,-0.15,,,0.2,,
Spinner,50,20,14,9,16,0.125,MysteryMeat,10,25,,0,6,,-0.2,0.25,,,,,
DM300,200,28,18,30,,0.3333,CapeOfThorns,20,25,,0,10,0.25,,0.3,0.1,-0.25,,,BOSS MACHINE
Elemental,60,25,20,9,20,0.1,PotionOfLiquidFlame,16,22,,2,6,0.2,0.5,,-1,,,-0.2,DEMONIC
Ballista,65,30,18,12,21,0.3,,16,30,,0,10,,,,0.1,-0.2,,,MACHINE
QuickFiringGun,65,30,18,15,22,0.3,,6,12,,0,10,,,,0.1,-0.2,,,MACHINE
Warlock,70,25,18,10,21,0.75,,12,18,MAGICAL,1,8,0.15,,-0.2,,,0.2,-0.1,
Monk,70,30,30,11,21,0.064,Food,12,25,,0,2,-0.2,,,-0.15,,0.2,-0.1,
Golem,85,28,18,12,22,,,25,40,,2,12,,,,0.2,-0.2,,,MACHINE
King,300,32,25,40,,,,25,40,,0,14,0.2,0.15,0.15,-0.15,,0.2,-0.2,BOSS UNDEAD
King.Undead,30,16,15,0,,,,12,18,,0,5,-0.15,-0.3,,,0.15,0.2,-0.4,UNDEAD PHANTOM
Succubus,80,40,25,12,25,0.05,ScrollOfLullaby,22,30,,0,10,,,,-0.2,-0.2,0.2,-0.25,DEMONIC
Eye,100,30,20,13,26,0.5,Dewdrop,15,25,MAGICAL,0,10,0.15,,,,,,-0.25,DEMONIC
Scorpio,95,36,24,14,26,0.2,PotionOfHealing,26,36,,0,16,-0.25,,0.2,-0.25,,0.2,-0.2,DEMONIC
Yog,300,,,50,,,,,,,,,0.25,,0.2,,,0.2,-0.25,BOSS DEMONIC IMMOVABLE
Yog.RottingFist,300,36,25,0,,,,20,50,,0,15,0.2,,0.2,,,,-0.25,BOSS DEMONIC
Yog.BurningFist,200,36,25,0,,,,22,30,MAGICAL,0,15,0.2,,0.2,-0.5,,0.2,-0.25,BOSS DEMONIC
Yog.Larva,25,30,20,0,,,,22,30,,0,8,-0.15,,0.2,,,,-0.25,DEMONIC
NAME,HT,atkSkill,defSkill,EXP,maxLvl,lootChance,loot,minDamage,maxDamage,typeDamage,critChance,critRatio,minDefend,maxDefend,magicalResistance,FIRE,POISON,ICE,LIGHT,SHADOW,HOLY,Properties
Rat,8,8,2,1,5,,,1,4,,,,0,1,,-0.3,0.1,,,,,
Slug,6,8,2,1,5,,,2,4,,,,0,1,-0.35,-0.5,0.75,,,,,
Gnoll,12,10,4,2,8,0.3,Gold,1,6,,0.09,,0,2,,,,,,,,
Crab,16,12,5,4,9,0.1667,MysteryMeat,2,8,,,,0,3,-0.2,,,0.1,-0.2,,,
FetidRat,20,12,6,4,5,,,1,4,,,,0,2,,,0.2,,,0.2,-0.25,MINIBOSS DEMONIC
GnollTrickster,20,16,6,5,8,1,,1,5,,,,0,2,,,,-0.2,,,,MINIBOSS
GreatCrab,25,12,0,6,9,0.1667,,1,8,,,,0,4,,,,0.1,-0.2,,,MINIBOSS
Goo,100,,8,10,,0.333,LloydsBeacon,,,,,,0,2,0.25,-0.25,0.2,,,,-0.3,BOSS DEMONIC
Swarm,50,10,5,3,9,0.1667,PotionOfHealing,,,,,,,,,,,,,,,
Skeleton,25,12,9,5,10,0.175,,2,10,,,,1,2,,-0.3,,,,,-0.3,UNDEAD
Thief,20,12,6,5,10,0.1,MasterThievesArmband,1,8,,0.1,1.5,0,3,0.15,,0.2,-0.15,,,-0.2,DEMONIC
Shaman,18,11,8,6,14,0.25,,2,8,MAGICAL,,,0,4,0.15,0.1,-0.2,0.2,0.3,,,
Guard,40,14,10,6,14,0.25,,4,12,,0.05,,0,6,-0.2,0.05,0.05,0.05,0.05,0.05,,DEMONIC
RotHeart,80,,0,4,,,,,,,,,0,5,0.5,,0.5,,,,,IMMOVABLE MINIBOSS
NewbornElemental,65,25,12,7,20,,,16,26,,,,0,5,0.2,0.5,,-1,,,-0.25,DEMONIC MINIBOSS
Tengu,150,20,15,20,,,,6,16,,,,0,5,0.25,,0.2,-0.25,,,,BOSS
SkeletonKnight,50,18,0,8,16,0.1,Wine,6,18,,0.1,,1,6,-0.2,-0.25,,,,0.25,-0.3,UNDEAD
AshesSkull,20,1000,10,6,15,,,4,12,NORMAL,,,0,3,0.3,0.3,,-0.2,,0.2,-0.3,UNDEAD
Bat,30,16,16,7,15,0.15,PotionOfHealing,5,15,,,,0,5,,-0.15,,0.3,,0.2,-0.2,
Brute,40,20,15,8,15,0.2,Gold,8,24,,,,0,8,,,-0.15,,,0.2,,
Spinner,50,20,14,9,16,0.125,MysteryMeat,10,25,,0.1,,0,6,,-0.2,0.25,,,,,
DM300,200,28,18,30,,,,20,25,,,,0,10,0.35,,0.3,-0.2,-0.1,,,BOSS MACHINE
Elemental,60,25,20,9,20,0.1,PotionOfLiquidFlame,16,22,,,,2,6,0.2,0.5,,-1,,,-0.2,DEMONIC
Ballista,65,30,18,12,21,0.3,,16,30,,0.075,,0,10,,,,0.1,-0.2,,,MACHINE
QuickFiringGun,65,30,18,15,22,0.3,,6,12,,0.075,,0,10,,,,0.1,-0.2,,,MACHINE
Warlock,70,25,20,10,21,0.75,,12,18,MAGICAL,,,1,8,0.15,,-0.2,,,0.2,-0.1,
Monk,70,30,30,11,21,0.064,Food,12,25,,0.05,1.2,0,2,-0.2,,,-0.15,,0.2,-0.1,
Golem,85,28,18,12,22,,,25,40,,,,2,12,,,,0.2,-0.2,,,MACHINE
King,300,32,25,40,,,,25,40,,,,0,14,0.2,0.15,0.15,-0.15,,0.2,-0.2,BOSS UNDEAD
King.Undead,30,16,15,0,,,,12,18,,,,0,5,-0.15,-0.3,,,0.15,0.2,-0.4,UNDEAD PHANTOM
Succubus,80,40,25,12,25,0.05,ScrollOfLullaby,20,26,,0.1,1.5,0,10,,,,-0.2,-0.2,0.2,-0.25,DEMONIC
Eye,100,30,20,13,26,0.5,Dewdrop,15,25,MAGICAL,,,0,10,0.15,,,,,,-0.25,DEMONIC
Scorpio,95,36,24,14,26,0.2,PotionOfHealing,26,36,,,,0,16,-0.25,,0.2,-0.25,,0.2,-0.2,DEMONIC
Yog,300,,,50,,,,,,,,,,,0.25,,0.2,,,0.2,-0.25,BOSS DEMONIC IMMOVABLE
Yog.RottingFist,300,36,25,0,,,,20,50,,,,0,15,0.2,,0.2,,,,-0.25,BOSS DEMONIC
Yog.BurningFist,200,36,26,0,,,,22,30,MAGICAL,,,0,15,0.2,,0.2,-0.5,,0.2,-0.25,BOSS DEMONIC
Yog.Larva,25,30,20,0,,,,22,30,,,,0,8,-0.15,,0.2,,,,-0.25,DEMONIC
Binary file modified core/src/main/assets/miscs/badges.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/src/main/assets/miscs/items.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/src/main/assets/miscs/perks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions core/src/main/java/com/egoal/darkestpixeldungeon/Assets.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class Assets {
public static final String SCROLL_SELLER = ACTORS + "scroll_seller.png";
public static final String PLAGUE_DOCTOR = ACTORS + "plague_doctor.png";
public static final String UNDEAD_SHOPKEEPER = ACTORS + "undead-shopkeeper.png";
public static final String SEEKER = ACTORS+ "seeker.png";

// mobs
public static final String RAT = ACTORS + "rat.png";
Expand Down Expand Up @@ -116,6 +117,7 @@ public class Assets {
public static final String KING_STATUARY = ACTORS + "king_statuary.png";
public static final String GLOWWORM = ACTORS + "glowworm.png";
public static final String SKULL = ACTORS + "skull.png";
public static final String SLUG = ACTORS+ "slug.png";

// levels=====================================================================
// tile
Expand Down
9 changes: 8 additions & 1 deletion core/src/main/java/com/egoal/darkestpixeldungeon/Badges.kt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ object Badges {
PERK_GAIN_2(65),
PERK_GAIN_3(66),
PERK_NONE(67, true),
SUICIDE(68, true),
PERK_EMPTY(68, true), //err, this should be none, but it already used...
SUICIDE(69, true),
GAMES_PLAYED_1(60, true),
GAMES_PLAYED_2(61, true),
GAMES_PLAYED_3(62, true),
Expand Down Expand Up @@ -895,6 +896,12 @@ object Badges {
fun validateNoPerk() {
if (Dungeon.IsChallenged()) return

if (Dungeon.hero.heroPerk.perks.isEmpty()) displayBadge(Badge.PERK_EMPTY)
}

fun validateNeverGainPerk() {
if (Dungeon.IsChallenged()) return

if (Dungeon.hero.perkGained == 0) displayBadge(Badge.PERK_NONE)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ object PropertyConfiger {
EXP = int(at("EXP"), 1), maxLvl = int(at("maxLvl"), Hero.MAX_LEVEL),
lootChance = float(at("lootChance")), loot = at("loot"), //todo: loot
minDamage = int(at("minDamage")), maxDamage = int(at("maxDamage")), typeDamage = damageType(at("typeDamage")),
criticalChance = float(at("critChance")), criticalRatio = float(at("critRatio"), 1f),
minDefend = int(at("minDefend")), maxDefend = int(at("maxDefend")),
magicalResistance = float(at("magicalResistance"))).apply {
elementalResistances[0] = float(at("FIRE"))
Expand Down Expand Up @@ -68,6 +69,8 @@ object PropertyConfiger {
mob.minDamage = mp.minDamage
mob.maxDamage = mp.maxDamage
mob.typeDamage = mp.typeDamage
mob.criticalChance = mp.criticalChance
mob.criticalRatio = mp.criticalRatio
mob.minDefense = mp.minDefend
mob.maxDefense = mp.maxDefend

Expand All @@ -85,6 +88,7 @@ object PropertyConfiger {
val EXP: Int = 0, val maxLvl: Int = 0,
val lootChance: Float = 0f, val loot: String = "",
val minDamage: Int = 0, val maxDamage: Int = 0, val typeDamage: Damage.Type = Damage.Type.NORMAL,
val criticalChance: Float = 0f, val criticalRatio: Float = 1.25f,
val minDefend: Int = 0, val maxDefend: Int = 0,
val magicalResistance: Float = 0f) {
val elementalResistances = FloatArray(Damage.Element.ELEMENT_COUNT) { 0f }
Expand Down
16 changes: 10 additions & 6 deletions core/src/main/java/com/egoal/darkestpixeldungeon/actors/Char.java
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,11 @@ public int takeDamage(Damage dmg) {
// buffs shall remove when take damage
if (this.buff(Frost.class) != null)
Buff.detach(this, Frost.class);
if (this.buff(MagicalSleep.class) != null)
Buff.detach(this, MagicalSleep.class);
MagicalSleep ms = buff(MagicalSleep.class);
if(ms!=null){
if(ms instanceof MagicalSleep.Deep) ((MagicalSleep.Deep) ms).setDamage(dmg);
Buff.detach(ms);
}
if (dmg.from instanceof Char && isCharmedBy((Char) dmg.from))
Buff.detach(this, Charm.class);

Expand Down Expand Up @@ -424,10 +427,11 @@ public int takeDamage(Damage dmg) {
if (buff(Ignorant.class) == null) {
if (dmg.value > 0 || dmg.from instanceof Char) {
String number = Integer.toString(dmg.value);
int color = HP > HT / 4 ? CharSprite.WARNING : CharSprite.NEGATIVE;
if (dmg.isFeatured(Damage.Feature.CRITICAL)) number += "!";

if (dmg.isFeatured(Damage.Feature.CRITICAL))
number += "!";
int color = 0x8c8c8c; // gray
if(dmg.type== Damage.Type.MAGICAL) color = 0x3b94ff; // blue for magical damage.
if(HP< HT/4) color = CharSprite.NEGATIVE;

sprite.showStatus(color, number);
}
Expand Down Expand Up @@ -461,7 +465,7 @@ protected Damage resistDamage(Damage dmg) {

// elemental resistance
for (int of = 0; of < Damage.Element.ELEMENT_COUNT; ++of)
if (dmg.isFeatured(0x01 << of))
if (dmg.hasElement(0x01 << of))
dmg.value -= Math.round(dmg.value * elementalResistance[of]);

if (dmg.type == Damage.Type.MAGICAL)
Expand Down
Loading

0 comments on commit ee7baca

Please sign in to comment.