Skip to content
This repository has been archived by the owner on Jul 15, 2020. It is now read-only.

Commit

Permalink
ported over 0.6.3b changes
Browse files Browse the repository at this point in the history
  • Loading branch information
00-Evan committed Mar 11, 2018
1 parent 706bf0a commit bbe543d
Show file tree
Hide file tree
Showing 35 changed files with 317 additions and 271 deletions.
4 changes: 3 additions & 1 deletion PD-classes/src/com/watabou/noosa/Camera.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,9 @@ public static synchronized Camera remove( Camera camera ) {
}

public static synchronized void updateAll() {
for (Camera c : all) {
int length = all.size();
for (int i=0; i < length; i++) {
Camera c = all.get( i );
if (c.exists && c.active) {
c.update();
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ allprojects {
apply plugin: "eclipse"
apply plugin: "idea"

version = '0.6.3a'
version = '0.6.3b'
ext {
versionCode = 241
versionCode = 245
appName = 'shattered-pixel-dungeon'
appTitle = 'Shattered Pixel Dungeon'
appId = 'com.shatteredpixel.shatteredpixeldungeon'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ private int score( boolean win ) {
public static final String STATS = "stats";
public static final String BADGES = "badges";
public static final String HANDLERS = "handlers";
public static final String CHALLENGES = "challenges";

public void saveGameData(Record rec){
rec.gameData = new Bundle();
Expand Down Expand Up @@ -151,6 +152,9 @@ public void saveGameData(Record rec){

//restore items now that we're done saving
belongings.backpack.items = allItems;

//save challenges
rec.gameData.put( CHALLENGES, Dungeon.challenges );
}

public void loadGameData(Record rec){
Expand All @@ -174,7 +178,7 @@ public void loadGameData(Record rec){

Statistics.restoreFromBundle(data.getBundle(STATS));

Dungeon.challenges = 0;
Dungeon.challenges = data.getInt(CHALLENGES);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
import com.shatteredpixel.shatteredpixeldungeon.effects.SpellSprite;
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal.WarriorShield;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
Expand Down Expand Up @@ -88,10 +89,12 @@ public boolean act() {
}
} else {

float percentHP = target.HP/(float)target.HT;

if (percentHP > targetHPPercent()){
target.HP = (int)Math.max(target.HT*targetHPPercent(), target.HP - pastRages);
if (target.HP > targetHPMax()){
target.HP = Math.max(targetHPMax(), target.HP - 1);
if (target instanceof Hero){
((Hero) target).resting = false;
target.remove(MagicalSleep.class);
}
}

if (state == State.EXHAUSTED){
Expand All @@ -108,19 +111,21 @@ public boolean act() {

public int damageFactor(int dmg){
float bonus;

if (state == State.EXHAUSTED) {
bonus = 1f - ((float)Math.sqrt(exhaustion) / 8f);

if (state == State.BERSERK){
bonus = 2f;
} else if (state == State.EXHAUSTED) {
bonus = 1f - ((float)Math.sqrt(exhaustion) / 10f);
} else {
float percentMissing = 1f - target.HP/(float)target.HT;
bonus = 1f + (float)Math.pow(percentMissing, 3);
float percentMissing = 1f - target.HP/(float)targetHPMax();
bonus = 1f + (0.5f * (float)Math.pow(percentMissing, 2));
}

return Math.round(dmg * bonus);
}

public float targetHPPercent(){
return Math.round(20* Math.pow(0.8f, pastRages))/20f;
public int targetHPMax(){
return Math.round(target.HT * Math.round(20* Math.pow(0.8f, pastRages))/20f);
}

public boolean berserking(){
Expand Down Expand Up @@ -211,7 +216,8 @@ public String desc() {
if (pastRages == 0){
text += "\n\n" + Messages.get(this, "no_rages");
} else {
text += "\n\n" + Messages.get(this, "past_rages", pastRages, (int)(targetHPPercent()*100));
int dispPercent = (int)(targetHPMax()/(float)target.HT * 100);
text += "\n\n" + Messages.get(this, "past_rages", pastRages, dispPercent);
}
return text;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public boolean attachTo( Char target ) {
if (!target.isImmune(Sleep.class) && super.attachTo( target )) {

if (target instanceof Hero)
if (target.HP == target.HT) {
if (target.HP == target.buff(Regeneration.class).regencap()) {
GLog.i(Messages.get(this, "toohealthy"));
detach();
return true;
Expand All @@ -63,7 +63,7 @@ public boolean act(){
if (target instanceof Hero) {
target.HP = Math.min(target.HP+1, target.HT);
((Hero) target).resting = true;
if (target.HP == target.HT) {
if (target.HP == target.buff(Regeneration.class).regencap()) {
GLog.p(Messages.get(this, "wakeup"));
detach();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public class Regeneration extends Buff {
public boolean act() {
if (target.isAlive()) {

if (target.HP < target.HT && !((Hero)target).isStarving()) {
if (target.HP < regencap() && !((Hero)target).isStarving()) {
LockedFloor lock = target.buff(LockedFloor.class);
if (target.HP > 0 && (lock == null || lock.regenOn())) {
target.HP += 1;
if (target.HP == target.HT) {
if (target.HP == regencap()) {
((Hero) target).resting = false;
}
}
Expand All @@ -66,4 +66,8 @@ public boolean act() {

return true;
}

public int regencap(){
return target.buff(Berserk.class) == null ? target.HT : target.buff(Berserk.class).targetHPMax();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,7 @@ public int stealth() {
int stealth = super.stealth();

if (belongings.armor != null && belongings.armor.hasGlyph(Obfuscation.class)){
stealth += belongings.armor.level();
stealth += 1 + belongings.armor.level()/3;
}
return stealth;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ public void adjustStats( int level ) {
}

@Override
public void die( Object cause ) {

super.die( cause );
public void rollToDropLoot(){

if (items != null) {
for (Item item : items) {
Dungeon.level.drop( item, pos ).sprite.drop();
}
items = null;
}
super.rollToDropLoot();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,6 @@ public void add( Buff buff ) {
state = FLEEING;
} else if (buff instanceof Sleep) {
state = SLEEPING;
this.sprite().showSleep();
postpone( Sleep.SWS );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,7 @@ public int stealth() {
int stealth = super.stealth();

if (rose != null && rose.armor != null && rose.armor.hasGlyph(Obfuscation.class)){
stealth += rose.armor.level();
stealth += 1 + rose.armor.level()/3;
}

return stealth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public enum Languages {

KOREAN("한국어", "ko", Status.UNREVIEWED, new String[]{"Flameblast12"}, new String[]{"Korean2017", "WondarRabb1t", "ddojin0115", "eeeei", "hancyel", "linterpreteur", "lsiebnie" }),
RUSSIAN("русский", "ru", Status.UNREVIEWED, new String[]{"ConsideredHamster", "Inevielle", "yarikonline"}, new String[]{"AttHawk46", "HerrGotlieb", "HoloTheWise", "MrXantar", "Shamahan", "roman.yagodin", "un_logic", " Вoвa"}),
FRENCH("français", "fr", Status.UNREVIEWED, new String[]{"Emether", "canc42", "kultissim", "minikrob"}, new String[]{"Alsydis", "Basttee", "Dekadisk", "Draal", "Neopolitan", "SpeagleZNT", "antoine9298", "go11um", "linterpreteur", "solthaar", "vavavoum"}),
POLISH("polski", "pl", Status.UNREVIEWED, new String[]{"Deksippos", "kuadziw"}, new String[]{"Chasseur", "Darden", "MJedi", "MrKukurykpl", "Peperos", "Scharnvirk", "Shmilly", "dusakus", "michaub", "ozziezombie", "szczoteczka22", "szymex73"}),
ITALIAN("italiano", "it", Status.UNREVIEWED, new String[]{"bizzolino", "funnydwarf"}, new String[]{"4est", "DaniMare", "Danzl", "andrearubbino00", "nessunluogo", "righi.a", "umby000"}),
CHINESE("中文", "zh", Status.UNREVIEWED, new String[]{"Jinkeloid(zdx00793)"}, new String[]{"931451545", "HoofBumpBlurryface", "Lery", "Lyn-0401", "ShatteredFlameBlast", "hmdzl001", "tempest102"}),
ESPERANTO("esperanto", "eo", Status.UNREVIEWED, new String[]{"Verdulo"}, new String[]{"Raizin"}),

GERMAN("deutsch", "de", Status.INCOMPLETE, new String[]{"Dallukas", "KrystalCroft", "Wuzzy", "Zap0", "davedude" }, new String[]{"DarkPixel", "ErichME", "LenzB", "Sarius", "Sorpl3x", "ThunfischGott", "Topicranger", "oragothen"}),
FRENCH("français", "fr", Status.INCOMPLETE, new String[]{"Emether", "canc42", "kultissim", "minikrob"}, new String[]{"Alsydis", "Basttee", "Dekadisk", "Draal", "antoine9298", "go11um", "linterpreteur", "solthaar"}),
SPANISH("español", "es", Status.INCOMPLETE, new String[]{"Kiroto", "Kohru", "grayscales"}, new String[]{"Alesxanderk", "CorvosUtopy", "Dewstend", "Dyrran", "Fervoreking", "Illyatwo2", "airman12", "alfongad", "benzarr410", "ctrijueque", "dhg121", "javifs", "jonismack1"}),
PORTUGUESE("português", "pt", Status.INCOMPLETE, new String[]{"TDF2001", "matheus208"}, new String[]{"ChainedFreaK", "JST", "MadHorus", "Tio_P_", "ancientorange", "danypr23", "ismael.henriques12", "owenreilly", "try31"}),
FINNISH("suomi", "fi", Status.INCOMPLETE, new String[]{"TenguTheKnight"}, null ),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ actors.blobs.toxicgas.desc=Eine grünliche Wolke aus toxischen Gasen wirbelt hie
actors.blobs.toxicgas.rankings_desc=Erstickt
actors.blobs.toxicgas.ondeath=Du bist durch das giftige Gas gestorben...

actors.blobs.corrosivegas.desc=A cloud of deadly caustic gas is swirling here.
actors.blobs.corrosivegas.desc=Eine Wolke aus tödlich ätzendem Gas schwebt hier umher.

actors.blobs.waterofawareness.procced=Als du einen Schluck nimmst, fühlst du, wie das Wissen deinen Geist erfüllt. Du weißt alles über deine ausgerüsteten Gegenstände. Außerdem nimmst du alle Gegenstände auf dieser Ebene und all ihre Geheimnisse wahr.
actors.blobs.waterofawareness.desc=Die Kraft des Wissens strahlt aus dem Wasser dieses Brunnens hervor. Nimm einen Schluck, um sämtliche Geheimnisse deiner ausgerüsteten Gegenstände zu enthüllen.
Expand Down Expand Up @@ -217,8 +217,8 @@ actors.buffs.terror.desc=Terror ist eine manipulative Magie, welche das Ziel in
actors.buffs.toxicimbue.name=Eins mit dem Gift
actors.buffs.toxicimbue.desc=Du bist eins mit dem Element des Giftes!\n\nImmer wenn du dich bewegst, bricht ein Schwall von giften Gasen hervor, welcher deinen Gegnern schadet. Solange du diesen Effekt besitzt, bist du gegen die Auswirkungen von Giften immun.\n\nAnzahl der verbleibenden Runden: %s

actors.buffs.corrosion.name=Corrosion
actors.buffs.corrosion.heromsg=You are melting!
actors.buffs.corrosion.name=Korrosion
actors.buffs.corrosion.heromsg=Du schmilzt!
actors.buffs.corrosion.ondeath=Du löst dich auf...
actors.buffs.corrosion.rankings_desc=Aufgelöst
actors.buffs.corrosion.desc=Powerful acid melts away flesh, metal, and bone at an alarming rate.\n\nCorrosion damage increases over time, as the target continues to melt away.\n\nTurns of corrosion remaining: %1$s.\nCurrent corrosion damage: %2$d.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ actors.blobs.toxicgas.desc=Una nube verdosa de gas tóxico se arremolina aquí.
actors.blobs.toxicgas.rankings_desc=Asfixiado
actors.blobs.toxicgas.ondeath=Has muerto por el gas tóxico...

actors.blobs.corrosivegas.desc=A cloud of deadly caustic gas is swirling here.
actors.blobs.corrosivegas.desc=Una nube de gas cáustico mortal está remolineando por aquí.

actors.blobs.waterofawareness.procced=Al tomar un trago, sientes como el conocimiento se vierte en tu mente. Ahora sabes todo sobre tus ítems equipados. También percibes todos los ítems en el nivel y conoces todos sus secretos.
actors.blobs.waterofawareness.desc=El poder del conocimiento irradia del agua de este pozo. Toma un sorbo para revelar todos los secretos de tus ítems equipados.
Expand All @@ -45,12 +45,12 @@ actors.buffs.berserk.angered=Enfadado
actors.buffs.berserk.berserk=Enfurecido
actors.buffs.berserk.exhausted=Exhausto
actors.buffs.berserk.recovering=Recuperando
actors.buffs.berserk.angered_desc=The severity of the berserker's injuries strengthen his blows. The lower the berserker's health is, the more bonus damage he will deal. This bonus is significantly stronger when the berserker is close to death.\n\nWhen the berserker is brought to 0 hp and is wearing his seal, he will go berserk and _refuse to die_ for a short time.\n\nCurrent damage: _%.0f%%_
actors.buffs.berserk.angered_desc=La gravedad de las heridas de un Frenético fortalecen sus golpes. Mientras más baja esté la salud de un Frenético, más daño extra infringirá. Éste extra en daño es significativamente más fuerte mientras el Frenético se aproxime más a la muerte.\n\nCuando el Frenético llega a 0 PS, si tiene puesto su sello, perderá el control y _se negará a morir_ por un período corto.\n\nDaño actual: _%.0f%%_
actors.buffs.berserk.berserk_desc=Al borde de la muerte, el miedo y la incertidumbre se desvanecen, dejando sólo la ira. En este estado cercano a la muerte, el frenético es increíblemente poderoso, _dobla el daño, gana bonificación de blindaje y se niega a morir._\n\nEsta bonificación de blindaje es mayor cuanto mejor sea la armadura del frenético y se agota lentamente con el tiempo. Cuando esta protección se reduce a 0, el frenético cede y muere.\n\nCualquier curación devolverá la estabilidad al frenético, pero estará agotado. Mientras esté agotado, el frenético sufrirá una gran reducción de daños por un corto periodo de tiempo, y luego tendrá que reunir experiencia antes de poder entrar en frenesí de nuevo.
actors.buffs.berserk.exhausted_desc=Inner strength has its limits. The berserker is exhausted, weakening him and making him unable to rage.\n\nIn this state The berserker deals significantly reduced damage, and will _immediately die at 0 health._\n\nTurns of exhaustion remaining: _%d_\nCurrent damage: _%.0f%%_
actors.buffs.berserk.recovering_desc=Inner strength has its limits. The berserker must rest before using his rage again.\n\nWhile recovering the berserker still deals bonus damage, but will _immediately die at 0 health._\n\nLevels until recovered: _%.2f_\nCurrent damage: _%.0f%%_
actors.buffs.berserk.no_rages=Berserking will also permanently wear on him, reducing his max health each time.
actors.buffs.berserk.past_rages=Times berserker has raged: _%d_\nMax health reduced to: _%d%%_
actors.buffs.berserk.no_rages=Volverse frenético también le afectará permanentemente, reduciendo su salud máxima cada vez.
actors.buffs.berserk.past_rages=Veces que el Frenético se ha enfurecido: _%d_\nSalud máxima reducida a: _%d%%_
actors.buffs.berserk.rankings_desc=El Berseker a muerto

actors.buffs.bleeding.name=Sangrando
Expand Down Expand Up @@ -217,8 +217,8 @@ actors.buffs.terror.desc=El terror es magia de manipulación que fuerza al objet
actors.buffs.toxicimbue.name=Imbuido con Toxicidad
actors.buffs.toxicimbue.desc=¡Estás imbuido con energía tóxica!\n\nMientras te muevas, un gas tóxico emanará constantemente de tu cuerpo, dañando a tus enemigos. Tú eres inmune al gas tóxico y al veneno mientras dure este efecto.\n\nTurnos de imbuido con toxicidad restantes: %s

actors.buffs.corrosion.name=Corrosion
actors.buffs.corrosion.heromsg=You are melting!
actors.buffs.corrosion.name=Corrosión
actors.buffs.corrosion.heromsg=¡Te estás derritiendo!
actors.buffs.corrosion.ondeath=Te derrites...
actors.buffs.corrosion.rankings_desc=Disuelto
actors.buffs.corrosion.desc=Powerful acid melts away flesh, metal, and bone at an alarming rate.\n\nCorrosion damage increases over time, as the target continues to melt away.\n\nTurns of corrosion remaining: %1$s.\nCurrent corrosion damage: %2$d.
Expand Down Expand Up @@ -253,28 +253,28 @@ actors.hero.heroclass.warrior_perk1=El Guerrero comienza con un sello roto que p
actors.hero.heroclass.warrior_perk2=El Guerrero generará lentamente un escudo mientras porte una armadura con el sello fijado.
actors.hero.heroclass.warrior_perk3=El sello puede moverse entre armaduras, llevándose una sola mejora con él.
actors.hero.heroclass.warrior_perk4=Cualquier pieza de comida restaura algo de vida cuando se come.
actors.hero.heroclass.warrior_perk5=Potions of Healing are automatically identified.
actors.hero.heroclass.warrior_perk5=Las Pociones de Curación son identificadas automáticamente.

actors.hero.heroclass.mage=mago
actors.hero.heroclass.mage_perk1=El Mago comienza con un Báculo único, que puede imbuirse con las propiedades de una varita.
actors.hero.heroclass.mage_perk2=El báculo del Mago puede utilizarse como un arma cuerpo a cuerpo o como una varita más poderosa.
actors.hero.heroclass.mage_perk3=El Mago identifica parcialmente a las varitas después de usarlas.
actors.hero.heroclass.mage_perk4=Cuando son consumidas, cualquier pieza de comida restaura 1 carga a todas las varitas del inventario.
actors.hero.heroclass.mage_perk5=Scrolls of Upgrade are automatically identified.
actors.hero.heroclass.mage_perk5=Los Pergaminos de Mejoras son identificados automáticamente.

actors.hero.heroclass.rogue=pícaro
actors.hero.heroclass.rogue_perk1=El Pícaro comienza con un Manto de Sombras único, que puede usar cuando quiere hacerse invisible.
actors.hero.heroclass.rogue_perk2=El Manto del Pícaro es un artefacto, se vuelve más poderoso a medida que él lo usa.
actors.hero.heroclass.rogue_perk3=El Pícaro detecta secretos y trampas a mayor distancia que otros héroes.
actors.hero.heroclass.rogue_perk4=El Pícaro puede encontrar más secretos escondidos en la mazmorra que otros héroes.
actors.hero.heroclass.rogue_perk5=Scrolls of Magic Mapping are automatically identified.
actors.hero.heroclass.rogue_perk5=Los Pergaminos de Mapeo Mágico son identificados automáticamente.

actors.hero.heroclass.huntress=cazadora
actors.hero.heroclass.huntress_perk1=La Cazadora comienza con un búmeran único mejorable.
actors.hero.heroclass.huntress_perk2=The Huntress gains bonus damage from excess strength on thrown weapons.
actors.hero.heroclass.huntress_perk3=The Huntress can use thrown weapons for longer before they break.
actors.hero.heroclass.huntress_perk2=La Cazadora gana daño extra del excedente de fuerza en armas arrojadizas.
actors.hero.heroclass.huntress_perk3=La Cazadora puede usar armas arrojadizas por más tiempo antes de que se rompan.
actors.hero.heroclass.huntress_perk4=La Cazadora puede sentir a los enemigos cercanos, aún cuando esten ocultos detras de obstáculos.
actors.hero.heroclass.huntress_perk5=Potions of Mind Vision are automatically identified.
actors.hero.heroclass.huntress_perk5=Las Pociones de Visión Mental son identificadas automáticamente.

actors.hero.herosubclass.gladiator=gladiador
actors.hero.herosubclass.gladiator_desc=Un ataque exitoso con arma cuerpo a cuerpo permite al _Gladiador_ empezar un combo. Acumular un combo le permite usar habilidades finales únicas.
Expand Down
Loading

0 comments on commit bbe543d

Please sign in to comment.