v0.9.3: cleaned up and polished class armor descs and interfaces
This commit is contained in:
parent
7972a5e271
commit
6f6e79128b
|
@ -347,6 +347,7 @@ actors.hero.abilities.mage.mage2.desc=I haven't decided on this ability yet.
|
|||
actors.hero.abilities.mage.mage3.name=???
|
||||
actors.hero.abilities.mage.mage3.desc=I haven't decided on this ability yet.
|
||||
actors.hero.abilities.rogue.smokebomb.name=smoke bomb
|
||||
actors.hero.abilities.rogue.smokebomb.fov=You can only jump to an empty location in your field of view
|
||||
actors.hero.abilities.rogue.smokebomb.desc=The Rogue blinks to any nearby location which he can see, leaving a plume of smoke where he stood. This ability makes the rogue temporarily invisible, and blinds any enemies adjacent to his old location.
|
||||
actors.hero.abilities.rogue.smokebomb.prompt=Choose a location to jump to
|
||||
actors.hero.abilities.rogue.rogue2.name=???
|
||||
|
|
|
@ -93,6 +93,8 @@ items.armor.armor.seal_attached=The Warrior's broken seal is attached to this ar
|
|||
items.armor.armor$glyph.glyph=glyph
|
||||
items.armor.armor$glyph.killed=%s killed you...
|
||||
|
||||
items.armor.classarmor.ac_ability=CHOOSE ABILITY
|
||||
items.armor.classarmor.no_ability=Your armor currently has no ability, you should choose one!
|
||||
items.armor.classarmor.not_equipped=You need to be wearing this armor to use its special power!
|
||||
items.armor.classarmor.low_charge=The armor does not have enough charge to use its special power!
|
||||
|
||||
|
@ -100,16 +102,14 @@ items.armor.clotharmor.name=cloth armor
|
|||
items.armor.clotharmor.desc=This lightweight armor offers basic protection.
|
||||
|
||||
items.armor.huntressarmor.name=huntress cloak
|
||||
items.armor.huntressarmor.ac_special=SPECTRAL BLADES
|
||||
items.armor.huntressarmor.no_enemies=No enemies in sight
|
||||
items.armor.huntressarmor.desc=While wearing this cloak, the huntress can create a fan of spectral blades. Each of these blades will target a single enemy in the huntress's field of view, inflicting damage depending on her currently equipped melee weapon.\n\nUsing this ability will consume 35% of the armor's charge. The armor steadily builds charge as the huntress gains experience.
|
||||
items.armor.huntressarmor.desc=... . While wearing this cloak, the Huntress can perform a special ability:
|
||||
|
||||
items.armor.leatherarmor.name=leather armor
|
||||
items.armor.leatherarmor.desc=Armor made from tanned monster hide. Not as light as cloth armor but provides better protection.
|
||||
|
||||
items.armor.magearmor.name=mage robe
|
||||
items.armor.magearmor.ac_special=MOLTEN EARTH
|
||||
items.armor.magearmor.desc=While wearing this gorgeous robe, the mage can cast a spell of molten earth. All the enemies in his field of view will be rooted to the ground and blasted by flames.\n\nUsing this ability will consume 35% of the armor's charge. The armor steadily builds charge as the mage gains experience.
|
||||
items.armor.magearmor.desc=... . While wearing this gorgeous robe, the Mage can perform a special ability:
|
||||
|
||||
items.armor.mailarmor.name=mail armor
|
||||
items.armor.mailarmor.desc=Interlocking metal links make for a tough but flexible suit of armor.
|
||||
|
@ -118,18 +118,13 @@ items.armor.platearmor.name=plate armor
|
|||
items.armor.platearmor.desc=Enormous plates of metal are joined together into a suit that provides unmatched protection to any adventurer strong enough to bear its staggering weight.
|
||||
|
||||
items.armor.roguearmor.name=rogue garb
|
||||
items.armor.roguearmor.ac_special=SMOKE BOMB
|
||||
items.armor.roguearmor.fov=You can only jump to an empty location in your field of view
|
||||
items.armor.roguearmor.prompt=Choose a location to jump to
|
||||
items.armor.roguearmor.desc=When wearing this dark garb, the rogue can blink to any nearby location which he can see, leaving a plume of smoke where he stood. This ability makes the rogue temporarily invisible, and blinds any enemies adjacent to his old location.\n\nUsing this ability will consume 35% of the armor's charge. The armor steadily builds charge as the rogue gains experience.
|
||||
items.armor.roguearmor.desc=... . When wearing this dark garb, the Rogue can perform a special ability:
|
||||
|
||||
items.armor.scalearmor.name=scale armor
|
||||
items.armor.scalearmor.desc=The metal scales sewn onto a leather vest create a flexible, yet protective armor.
|
||||
|
||||
items.armor.warriorarmor.name=warrior suit of armor
|
||||
items.armor.warriorarmor.ac_special=HEROIC LEAP
|
||||
items.armor.warriorarmor.prompt=Choose direction to leap
|
||||
items.armor.warriorarmor.desc=While this armor looks heavy, it allows the warrior to perform a heroic leap towards a targeted location, slamming down to stun all neighbouring enemies.\n\nUsing this ability will consume 35% of the armor's charge. The armor steadily builds charge as the warrior gains experience.
|
||||
items.armor.warriorarmor.desc=... . While this armor looks heavy, it allows the Warrior to perform a special ability:
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ windows.wndchallenges.title=Challenges
|
|||
|
||||
windows.wndchooseability.message=The crown glows as it rests on your head, and both it and your armor become hot to the touch. You can feel the magic of the crown begin to act on your armor, but it must be directed. Which armor ability do you choose?
|
||||
windows.wndchooseability.message_no_crown=Choose an ability for your armor!
|
||||
windows.wndchooseability.cancel=I'll decide later
|
||||
|
||||
windows.wndchooseway.message=As the mask fits over your face, your eyesight fades and visions of new power flood into your mind. How will you direct the mask's power?
|
||||
windows.wndchooseway.cancel=I'll decide later
|
||||
|
|
|
@ -36,7 +36,6 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.CellEmitter;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.ClassArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.armor.RogueArmor;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfTeleportation;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
@ -62,7 +61,7 @@ public class SmokeBomb extends ArmorAbility {
|
|||
!Dungeon.level.heroFOV[target] ||
|
||||
Actor.findChar( target ) != null) {
|
||||
|
||||
GLog.w( Messages.get(RogueArmor.class, "fov") );
|
||||
GLog.w( Messages.get(this, "fov") );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,10 @@ public class Item implements Bundlable {
|
|||
actions.add( AC_THROW );
|
||||
return actions;
|
||||
}
|
||||
|
||||
public String actionName(String action, Hero hero){
|
||||
return Messages.get(this, "ac_" + action);
|
||||
}
|
||||
|
||||
public boolean doPickUp( Hero hero ) {
|
||||
if (collect( hero.belongings.backpack )) {
|
||||
|
|
|
@ -24,6 +24,7 @@ package com.shatteredpixel.shatteredpixeldungeon.items.armor;
|
|||
import com.shatteredpixel.shatteredpixeldungeon.Challenges;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.Hero;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.actors.hero.abilities.ArmorAbility;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.BrokenSeal;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.GameScene;
|
||||
|
@ -35,13 +36,12 @@ import java.util.ArrayList;
|
|||
|
||||
abstract public class ClassArmor extends Armor {
|
||||
|
||||
private static final String AC_SPECIAL = "SPECIAL";
|
||||
private static final String AC_CHOOSE = "CHOOSE";
|
||||
private static final String AC_ABILITY = "ABILITY";
|
||||
|
||||
{
|
||||
levelKnown = true;
|
||||
cursedKnown = true;
|
||||
defaultAction = AC_SPECIAL;
|
||||
defaultAction = AC_ABILITY;
|
||||
|
||||
bones = false;
|
||||
}
|
||||
|
@ -114,12 +114,21 @@ abstract public class ClassArmor extends Armor {
|
|||
@Override
|
||||
public ArrayList<String> actions( Hero hero ) {
|
||||
ArrayList<String> actions = super.actions( hero );
|
||||
if (hero.HP >= 3 && isEquipped( hero )) {
|
||||
actions.add( AC_SPECIAL );
|
||||
if (isEquipped( hero )) {
|
||||
actions.add( AC_ABILITY );
|
||||
}
|
||||
return actions;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String actionName(String action, Hero hero) {
|
||||
if (hero.armorAbility != null && action.equals(AC_ABILITY)){
|
||||
return hero.armorAbility.name().toUpperCase();
|
||||
} else {
|
||||
return super.actionName(action, hero);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String status() {
|
||||
return Messages.format( "%.0f%%", charge );
|
||||
|
@ -130,15 +139,12 @@ abstract public class ClassArmor extends Armor {
|
|||
|
||||
super.execute( hero, action );
|
||||
|
||||
if (action.equals(AC_SPECIAL)) {
|
||||
if (action.equals(AC_ABILITY)){
|
||||
|
||||
//for pre-0.9.3 saves
|
||||
if (hero.armorAbility == null){
|
||||
GameScene.show(new WndChooseAbility(null, this, hero));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isEquipped( hero )) {
|
||||
} else if (!isEquipped( hero )) {
|
||||
GLog.w( Messages.get(this, "not_equipped") );
|
||||
} else if (charge < 35) {
|
||||
GLog.w( Messages.get(this, "low_charge") );
|
||||
|
@ -159,8 +165,17 @@ abstract public class ClassArmor extends Armor {
|
|||
|
||||
@Override
|
||||
public String desc() {
|
||||
//TODO custom desc, core desc + description of ability
|
||||
return super.desc();
|
||||
//TODO descriptions for each class armor
|
||||
String desc = super.desc();
|
||||
|
||||
ArmorAbility ability = Dungeon.hero.armorAbility;
|
||||
if (ability != null){
|
||||
desc += "\n\n" + "_" + Messages.titleCase(ability.name()) + ":_ " + ability.desc();
|
||||
} else {
|
||||
desc += "\n\n" + "_" + Messages.get(this, "no_ability") + "_";
|
||||
}
|
||||
|
||||
return desc;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -80,6 +80,17 @@ public class WndChooseAbility extends Window {
|
|||
pos = abilityButton.bottom() + GAP;
|
||||
}
|
||||
|
||||
RedButton cancelButton = new RedButton(Messages.get(this, "cancel")){
|
||||
@Override
|
||||
protected void onClick() {
|
||||
hide();
|
||||
}
|
||||
};
|
||||
cancelButton.setSize(WIDTH, 18);
|
||||
cancelButton.setRect(0, pos, WIDTH, 18);
|
||||
add(cancelButton);
|
||||
pos = cancelButton.bottom() + GAP;
|
||||
|
||||
resize(WIDTH, (int)pos);
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ package com.shatteredpixel.shatteredpixeldungeon.windows;
|
|||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Item;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
@ -52,7 +51,7 @@ public class WndUseItem extends WndInfoItem {
|
|||
ArrayList<RedButton> buttons = new ArrayList<>();
|
||||
for (final String action : item.actions( Dungeon.hero )) {
|
||||
|
||||
RedButton btn = new RedButton( Messages.get(item, "ac_" + action), 8 ) {
|
||||
RedButton btn = new RedButton( item.actionName(action, Dungeon.hero), 8 ) {
|
||||
@Override
|
||||
protected void onClick() {
|
||||
hide();
|
||||
|
|
Loading…
Reference in New Issue
Block a user