v0.6.2: reworked rogue and cloak of shadows
This commit is contained in:
parent
d4489e6901
commit
f8244d013e
|
@ -25,7 +25,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Badges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.HornOfPlenty;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
@ -108,8 +107,7 @@ public class Hunger extends Buff implements Hero.Doom {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float step = ((Hero)target).heroClass == HeroClass.ROGUE ? STEP * 1.2f : STEP;
|
spend( target.buff( Shadows.class ) == null ? STEP : STEP * 1.5f );
|
||||||
spend( target.buff( Shadows.class ) == null ? step : step * 1.5f );
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
|
@ -318,7 +318,6 @@ public class Hero extends Char {
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
int bonus = 0;
|
int bonus = 0;
|
||||||
if (heroClass == HeroClass.ROGUE) bonus += -aEnc;
|
|
||||||
|
|
||||||
if (belongings.armor != null && belongings.armor.hasGlyph(Swiftness.class))
|
if (belongings.armor != null && belongings.armor.hasGlyph(Swiftness.class))
|
||||||
bonus += 5 + belongings.armor.level()*1.5f;
|
bonus += 5 + belongings.armor.level()*1.5f;
|
||||||
|
@ -1474,7 +1473,7 @@ public class Hero extends Char {
|
||||||
|
|
||||||
boolean smthFound = false;
|
boolean smthFound = false;
|
||||||
|
|
||||||
int distance = 1;
|
int distance = heroClass == HeroClass.ROGUE ? 2 : 1;
|
||||||
|
|
||||||
int cx = pos % Dungeon.level.width();
|
int cx = pos % Dungeon.level.width();
|
||||||
int cy = pos / Dungeon.level.width();
|
int cy = pos / Dungeon.level.width();
|
||||||
|
|
|
@ -216,7 +216,6 @@ public enum HeroClass {
|
||||||
Messages.get(HeroClass.class, "rogue_perk3"),
|
Messages.get(HeroClass.class, "rogue_perk3"),
|
||||||
Messages.get(HeroClass.class, "rogue_perk4"),
|
Messages.get(HeroClass.class, "rogue_perk4"),
|
||||||
Messages.get(HeroClass.class, "rogue_perk5"),
|
Messages.get(HeroClass.class, "rogue_perk5"),
|
||||||
Messages.get(HeroClass.class, "rogue_perk6"),
|
|
||||||
};
|
};
|
||||||
case HUNTRESS:
|
case HUNTRESS:
|
||||||
return new String[]{
|
return new String[]{
|
||||||
|
|
|
@ -27,7 +27,6 @@ import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
|
import com.shatteredpixel.shatteredpixeldungeon.items.EquipableItem;
|
||||||
|
@ -292,8 +291,6 @@ public class Armor extends EquipableItem {
|
||||||
|
|
||||||
if (STRReq() > Dungeon.hero.STR()) {
|
if (STRReq() > Dungeon.hero.STR()) {
|
||||||
info += " " + Messages.get(Armor.class, "too_heavy");
|
info += " " + Messages.get(Armor.class, "too_heavy");
|
||||||
} else if (Dungeon.hero.heroClass == HeroClass.ROGUE && Dungeon.hero.STR() > STRReq()){
|
|
||||||
info += " " + Messages.get(Armor.class, "excess_str");
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
info += "\n\n" + Messages.get(Armor.class, "avg_absorb", DRMin(0), DRMax(0), STRReq(0));
|
info += "\n\n" + Messages.get(Armor.class, "avg_absorb", DRMin(0), DRMax(0), STRReq(0));
|
||||||
|
|
|
@ -44,13 +44,11 @@ public class CloakOfShadows extends Artifact {
|
||||||
image = ItemSpriteSheet.ARTIFACT_CLOAK;
|
image = ItemSpriteSheet.ARTIFACT_CLOAK;
|
||||||
|
|
||||||
exp = 0;
|
exp = 0;
|
||||||
levelCap = 14;
|
levelCap = 10;
|
||||||
|
|
||||||
charge = level()+6;
|
charge = Math.min(level()+3, 10);
|
||||||
partialCharge = 0;
|
partialCharge = 0;
|
||||||
chargeCap = level()+6;
|
chargeCap = Math.min(level()+3, 10);
|
||||||
|
|
||||||
cooldown = 0;
|
|
||||||
|
|
||||||
defaultAction = AC_STEALTH;
|
defaultAction = AC_STEALTH;
|
||||||
|
|
||||||
|
@ -79,8 +77,7 @@ public class CloakOfShadows extends Artifact {
|
||||||
|
|
||||||
if (!stealthed){
|
if (!stealthed){
|
||||||
if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
if (!isEquipped(hero)) GLog.i( Messages.get(Artifact.class, "need_to_equip") );
|
||||||
else if (cooldown > 0) GLog.i( Messages.get(this, "cooldown", cooldown) );
|
else if (charge <= 0) GLog.i( Messages.get(this, "no_charge") );
|
||||||
else if (charge <= 1) GLog.i( Messages.get(this, "no_charge") );
|
|
||||||
else {
|
else {
|
||||||
stealthed = true;
|
stealthed = true;
|
||||||
hero.spend( 1f );
|
hero.spend( 1f );
|
||||||
|
@ -136,25 +133,28 @@ public class CloakOfShadows extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Item upgrade() {
|
public Item upgrade() {
|
||||||
chargeCap++;
|
chargeCap = Math.min(chargeCap + 1, 10);
|
||||||
return super.upgrade();
|
return super.upgrade();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final String STEALTHED = "stealthed";
|
private static final String STEALTHED = "stealthed";
|
||||||
private static final String COOLDOWN = "cooldown";
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void storeInBundle( Bundle bundle ) {
|
public void storeInBundle( Bundle bundle ) {
|
||||||
super.storeInBundle(bundle);
|
super.storeInBundle(bundle);
|
||||||
bundle.put( STEALTHED, stealthed );
|
bundle.put( STEALTHED, stealthed );
|
||||||
bundle.put( COOLDOWN, cooldown );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void restoreFromBundle( Bundle bundle ) {
|
public void restoreFromBundle( Bundle bundle ) {
|
||||||
super.restoreFromBundle(bundle);
|
super.restoreFromBundle(bundle);
|
||||||
stealthed = bundle.getBoolean( STEALTHED );
|
stealthed = bundle.getBoolean( STEALTHED );
|
||||||
cooldown = bundle.getInt( COOLDOWN );
|
// pre-0.6.2 saves
|
||||||
|
if (bundle.contains("cooldown")){
|
||||||
|
exp = 0;
|
||||||
|
level((int)Math.ceil(level()*0.7f));
|
||||||
|
charge = chargeCap = Math.min(3 + level(), 10);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -167,8 +167,11 @@ public class CloakOfShadows extends Artifact {
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
if (charge < chargeCap) {
|
if (charge < chargeCap) {
|
||||||
LockedFloor lock = target.buff(LockedFloor.class);
|
LockedFloor lock = target.buff(LockedFloor.class);
|
||||||
if (!stealthed && (lock == null || lock.regenOn()))
|
if (!stealthed && (lock == null || lock.regenOn())) {
|
||||||
partialCharge += (1f / (50 - (chargeCap-charge)));
|
float turnsToCharge = (60 - 2*(chargeCap - charge));
|
||||||
|
if (level() > 7) turnsToCharge -= 2 * (level() - 7);
|
||||||
|
partialCharge += (1f / turnsToCharge);
|
||||||
|
}
|
||||||
|
|
||||||
if (partialCharge >= 1) {
|
if (partialCharge >= 1) {
|
||||||
charge++;
|
charge++;
|
||||||
|
@ -213,24 +216,28 @@ public class CloakOfShadows extends Artifact {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act(){
|
public boolean act(){
|
||||||
if (turnsToCost == 0) charge--;
|
turnsToCost--;
|
||||||
if (charge <= 0) {
|
|
||||||
|
if (turnsToCost <= 0){
|
||||||
|
charge--;
|
||||||
|
if (charge < 0) {
|
||||||
|
charge = 0;
|
||||||
detach();
|
detach();
|
||||||
GLog.w(Messages.get(this, "no_charge"));
|
GLog.w(Messages.get(this, "no_charge"));
|
||||||
((Hero) target).interrupt();
|
((Hero) target).interrupt();
|
||||||
}
|
} else {
|
||||||
|
exp += 10 + ((Hero) target).lvl;
|
||||||
|
|
||||||
if (turnsToCost == 0) exp += 10 + ((Hero)target).lvl;
|
if (exp >= (level() + 1) * 50 && level() < levelCap) {
|
||||||
|
|
||||||
if (exp >= (level()+1)*40 && level() < levelCap) {
|
|
||||||
upgrade();
|
upgrade();
|
||||||
exp -= level()*40;
|
exp -= level() * 50;
|
||||||
GLog.p(Messages.get(this, "levelup"));
|
GLog.p(Messages.get(this, "levelup"));
|
||||||
}
|
|
||||||
|
|
||||||
if (turnsToCost == 0) turnsToCost = 2;
|
}
|
||||||
else turnsToCost--;
|
turnsToCost = 5;
|
||||||
|
}
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
|
}
|
||||||
|
|
||||||
spend( TICK );
|
spend( TICK );
|
||||||
|
|
||||||
|
@ -238,16 +245,6 @@ public class CloakOfShadows extends Artifact {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void dispel(){
|
public void dispel(){
|
||||||
charge --;
|
|
||||||
|
|
||||||
exp += 10 + ((Hero)target).lvl;
|
|
||||||
|
|
||||||
if (exp >= (level()+1)*40 && level() < levelCap) {
|
|
||||||
upgrade();
|
|
||||||
exp -= level()*40;
|
|
||||||
GLog.p( Messages.get(this, "levelup") );
|
|
||||||
}
|
|
||||||
|
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
detach();
|
detach();
|
||||||
}
|
}
|
||||||
|
@ -273,7 +270,6 @@ public class CloakOfShadows extends Artifact {
|
||||||
if (target.invisible > 0)
|
if (target.invisible > 0)
|
||||||
target.invisible--;
|
target.invisible--;
|
||||||
stealthed = false;
|
stealthed = false;
|
||||||
cooldown = 6 - (level() / 4);
|
|
||||||
|
|
||||||
updateQuickslot();
|
updateQuickslot();
|
||||||
super.detach();
|
super.detach();
|
||||||
|
|
|
@ -26,7 +26,6 @@ import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.Char;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler;
|
import com.shatteredpixel.shatteredpixeldungeon.items.ItemStatusHandler;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.items.KindofMisc;
|
import com.shatteredpixel.shatteredpixeldungeon.items.KindofMisc;
|
||||||
|
@ -279,18 +278,6 @@ public class Ring extends KindofMisc {
|
||||||
|
|
||||||
public class RingBuff extends Buff {
|
public class RingBuff extends Buff {
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean attachTo( Char target ) {
|
|
||||||
|
|
||||||
if (target instanceof Hero && ((Hero)target).heroClass == HeroClass.ROGUE && !isKnown()) {
|
|
||||||
setKnown();
|
|
||||||
GLog.i( Messages.get(Ring.class, "known", name()) );
|
|
||||||
Badges.validateItemLevelAquired( Ring.this );
|
|
||||||
}
|
|
||||||
|
|
||||||
return super.attachTo(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean act() {
|
public boolean act() {
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,9 @@
|
||||||
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret;
|
package com.shatteredpixel.shatteredpixeldungeon.levels.rooms.secret;
|
||||||
|
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.HeroClass;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
|
import com.shatteredpixel.shatteredpixeldungeon.levels.rooms.special.SpecialRoom;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.StartScene;
|
||||||
import com.watabou.utils.Bundle;
|
import com.watabou.utils.Bundle;
|
||||||
import com.watabou.utils.Random;
|
import com.watabou.utils.Random;
|
||||||
|
|
||||||
|
@ -47,11 +49,11 @@ public abstract class SecretRoom extends SpecialRoom {
|
||||||
|
|
||||||
float[] regionChances = baseRegionSecrets.clone();
|
float[] regionChances = baseRegionSecrets.clone();
|
||||||
|
|
||||||
/*if (StartScene.curClass == HeroClass.ROGUE){
|
if (StartScene.curClass == HeroClass.ROGUE){
|
||||||
for (int i = 0; i < regionChances.length; i++){
|
for (int i = 0; i < regionChances.length; i++){
|
||||||
regionChances[i] += 0.6f;
|
regionChances[i] += 0.6f;
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
for (int i = 0; i < regionSecretsThisRun.length; i++){
|
for (int i = 0; i < regionSecretsThisRun.length; i++){
|
||||||
regionSecretsThisRun[i] = (int)regionChances[i];
|
regionSecretsThisRun[i] = (int)regionChances[i];
|
||||||
|
|
|
@ -237,12 +237,11 @@ actors.hero.heroclass.mage_perk4=When eaten, any piece of food restores 1 charge
|
||||||
actors.hero.heroclass.mage_perk5=Scrolls of Upgrade are identified from the beginning.
|
actors.hero.heroclass.mage_perk5=Scrolls of Upgrade are identified from the beginning.
|
||||||
|
|
||||||
actors.hero.heroclass.rogue=rogue
|
actors.hero.heroclass.rogue=rogue
|
||||||
actors.hero.heroclass.rogue_perk1=The Rogue starts with a unique Cloak of Shadows.
|
actors.hero.heroclass.rogue_perk1=The Rogue starts with a unique Cloak of Shadows, which he can use to become invisible at will.
|
||||||
actors.hero.heroclass.rogue_perk2=The Rogue identifies a type of a ring on equipping it.
|
actors.hero.heroclass.rogue_perk2=The Rogue's cloak is an artifact, it becomes more powerful as he uses it.
|
||||||
actors.hero.heroclass.rogue_perk3=The Rogue is proficient with light armor, dodging better with excess strength.
|
actors.hero.heroclass.rogue_perk3=The Rogue detects secrets and traps from farther away than other heroes.
|
||||||
actors.hero.heroclass.rogue_perk4=The Rogue is more proficient in detecting hidden doors and traps.
|
actors.hero.heroclass.rogue_perk4=The Rogue is able to find more secrets hidden in the dungeon than other heroes.
|
||||||
actors.hero.heroclass.rogue_perk5=The Rogue can go without food longer.
|
actors.hero.heroclass.rogue_perk5=Scrolls of Magic Mapping are identified from the beginning.
|
||||||
actors.hero.heroclass.rogue_perk6=Scrolls of Magic Mapping are identified from the beginning.
|
|
||||||
|
|
||||||
actors.hero.heroclass.huntress=huntress
|
actors.hero.heroclass.huntress=huntress
|
||||||
actors.hero.heroclass.huntress_perk1=The Huntress starts with a unique upgradeable boomerang.
|
actors.hero.heroclass.huntress_perk1=The Huntress starts with a unique upgradeable boomerang.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user