v3.0.0: QoL adjustment to shard of oblivion, manual IDing now sets ready

This commit is contained in:
Evan Debenham
2025-01-09 11:45:18 -05:00
parent f94b793d1f
commit fdb77ca910
8 changed files with 95 additions and 23 deletions

View File

@@ -1393,11 +1393,12 @@ items.trinkets.saltcube.stats_desc=At its current level this trinket will increa
items.trinkets.shardofoblivion.name=shard of oblivion items.trinkets.shardofoblivion.name=shard of oblivion
items.trinkets.shardofoblivion.desc=After stewing in the alchemy pot, this small shard of cursed metal has changed to be made of... nothing? Light seems to bend around it, and it hovers in place when you aren't holding it. The shard seems to be magically drawing power from your ignorance, so it's probably best to not think about it too much. items.trinkets.shardofoblivion.desc=After stewing in the alchemy pot, this small shard of cursed metal has changed to be made of... nothing? Light seems to bend around it, and it hovers in place when you aren't holding it. The shard seems to be magically drawing power from your ignorance, so it's probably best to not think about it too much.
items.trinkets.shardofoblivion.typical_stats_desc=Typically this trinket will increase the rate that enemies drop loot by 20%% for each piece of unidentified equipment you have equipped or recently used, to a max of _%d item(s)_. The shard will also prevent you from automatically identifying equipment, but can be used to manually identify items that are ready for it. items.trinkets.shardofoblivion.typical_stats_desc=Typically this trinket will increase the rate that enemies drop loot by 20%% for each piece of unidentified equipment you have equipped or recently used, to a max of _%d item(s)_. The shard will also prevent you from identifying equipment, but can be used to manually identify items that are ready for it.
items.trinkets.shardofoblivion.stats_desc=At its current level this trinket will increase the rate that enemies drop loot by 20%% for each piece of unidentified equipment you have equipped or recently used, to a max of _%d item(s)_. The shard will also prevent you from automatically identifying equipment, but can be used to manually identify items that are ready for it. items.trinkets.shardofoblivion.stats_desc=At its current level this trinket will increase the rate that enemies drop loot by 20%% for each piece of unidentified equipment you have equipped or recently used, to a max of _%d item(s)_. The shard will also prevent you from identifying equipment, but can be used to manually identify items that are ready for it.
items.trinkets.shardofoblivion.ac_identify=IDENTIFY items.trinkets.shardofoblivion.ac_identify=IDENTIFY
items.trinkets.shardofoblivion.identify_prompt=Identify an Item items.trinkets.shardofoblivion.identify_prompt=Identify an Item
items.trinkets.shardofoblivion.identify_ready=An item is ready to identify: %s. items.trinkets.shardofoblivion.identify_ready=An item is ready to identify: %s.
items.trinkets.shardofoblivion.identify_ready_worn=Your worn items are now all ready to identify.
items.trinkets.shardofoblivion.identify_not_yet=That item isn't ready to be identified yet. items.trinkets.shardofoblivion.identify_not_yet=That item isn't ready to be identified yet.
items.trinkets.shardofoblivion.identify=You identify the item! items.trinkets.shardofoblivion.identify=You identify the item!
items.trinkets.shardofoblivion$wandusetracker.name=Unidentified Wand Used items.trinkets.shardofoblivion$wandusetracker.name=Unidentified Wand Used

View File

@@ -22,7 +22,6 @@
package com.shatteredpixel.shatteredpixeldungeon.actors.blobs; package com.shatteredpixel.shatteredpixeldungeon.actors.blobs;
import com.shatteredpixel.shatteredpixeldungeon.Assets; import com.shatteredpixel.shatteredpixeldungeon.Assets;
import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.Dungeon; import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Awareness;
import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff; import com.shatteredpixel.shatteredpixeldungeon.actors.buffs.Buff;
@@ -31,6 +30,7 @@ import com.shatteredpixel.shatteredpixeldungeon.effects.BlobEmitter;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck; import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfIdentify;
import com.shatteredpixel.shatteredpixeldungeon.journal.Notes.Landmark; import com.shatteredpixel.shatteredpixeldungeon.journal.Notes.Landmark;
import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain; import com.shatteredpixel.shatteredpixeldungeon.levels.Terrain;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
@@ -77,8 +77,7 @@ public class WaterOfAwareness extends WellWater {
if (item.isIdentified()) { if (item.isIdentified()) {
return null; return null;
} else { } else {
item.identify(); ScrollOfIdentify.IDItem(item);
Badges.validateItemLevelAquired( item );
Sample.INSTANCE.play( Assets.Sounds.DRINK ); Sample.INSTANCE.play( Assets.Sounds.DRINK );
emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) ); emitter.parent.add( new Identification( DungeonTilemap.tileCenterToWorld( pos ) ) );

View File

@@ -35,8 +35,12 @@ import com.shatteredpixel.shatteredpixeldungeon.items.artifacts.Artifact;
import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag; import com.shatteredpixel.shatteredpixeldungeon.items.bags.Bag;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring; import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse; import com.shatteredpixel.shatteredpixeldungeon.items.scrolls.ScrollOfRemoveCurse;
import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.ShardOfOblivion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
import com.watabou.utils.Bundle; import com.watabou.utils.Bundle;
import com.watabou.utils.Random; import com.watabou.utils.Random;
@@ -320,28 +324,52 @@ public class Belongings implements Iterable<Item> {
public void observe() { public void observe() {
if (weapon() != null) { if (weapon() != null) {
weapon().identify(); if (ShardOfOblivion.passiveIDDisabled() && weapon() instanceof Weapon){
Badges.validateItemLevelAquired(weapon()); ((Weapon) weapon()).setIDReady();
} else {
weapon().identify();
Badges.validateItemLevelAquired(weapon());
}
}
if (secondWep() != null){
if (ShardOfOblivion.passiveIDDisabled() && secondWep() instanceof Weapon){
((Weapon) secondWep()).setIDReady();
} else {
secondWep().identify();
Badges.validateItemLevelAquired(secondWep());
}
} }
if (armor() != null) { if (armor() != null) {
armor().identify(); if (ShardOfOblivion.passiveIDDisabled()){
Badges.validateItemLevelAquired(armor()); armor().setIDReady();
} else {
armor().identify();
Badges.validateItemLevelAquired(armor());
}
} }
if (artifact() != null) { if (artifact() != null) {
//oblivion shard does not prevent artifact IDing
artifact().identify(); artifact().identify();
Badges.validateItemLevelAquired(artifact()); Badges.validateItemLevelAquired(artifact());
} }
if (misc() != null) { if (misc() != null) {
misc().identify(); if (ShardOfOblivion.passiveIDDisabled() && misc() instanceof Ring){
Badges.validateItemLevelAquired(misc()); ((Ring) misc()).setIDReady();
} else {
misc().identify();
Badges.validateItemLevelAquired(misc());
}
} }
if (ring() != null) { if (ring() != null) {
ring().identify(); if (ShardOfOblivion.passiveIDDisabled()){
Badges.validateItemLevelAquired(ring()); ring().setIDReady();
} else {
ring().identify();
Badges.validateItemLevelAquired(ring());
}
} }
if (secondWep() != null){ if (ShardOfOblivion.passiveIDDisabled()){
secondWep().identify(); GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready_worn"));
Badges.validateItemLevelAquired(secondWep());
} }
for (Item item : backpack) { for (Item item : backpack) {
if (item instanceof EquipableItem || item instanceof Wand) { if (item instanceof EquipableItem || item instanceof Wand) {

View File

@@ -225,6 +225,10 @@ public class Armor extends EquipableItem {
return super.identify(byHero); return super.identify(byHero);
} }
public void setIDReady(){
usesLeftToID = -1;
}
public boolean readyToIdentify(){ public boolean readyToIdentify(){
return !isIdentified() && usesLeftToID <= 0; return !isIdentified() && usesLeftToID <= 0;
} }
@@ -483,7 +487,7 @@ public class Armor extends EquipableItem {
if (usesLeftToID > -1){ if (usesLeftToID > -1){
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name()); GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name());
} }
usesLeftToID = -1; setIDReady();
} else { } else {
identify(); identify();
GLog.p(Messages.get(Armor.class, "identify")); GLog.p(Messages.get(Armor.class, "identify"));

View File

@@ -253,6 +253,10 @@ public class Ring extends KindofMisc {
return super.identify(byHero); return super.identify(byHero);
} }
public void setIDReady(){
levelsToID = -1;
}
public boolean readyToIdentify(){ public boolean readyToIdentify(){
return !isIdentified() && levelsToID <= 0; return !isIdentified() && levelsToID <= 0;
} }
@@ -338,7 +342,7 @@ public class Ring extends KindofMisc {
if (levelsToID > -1){ if (levelsToID > -1){
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name()); GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name());
} }
levelsToID = -1; setIDReady();
} else { } else {
identify(); identify();
GLog.p(Messages.get(Ring.class, "identify")); GLog.p(Messages.get(Ring.class, "identify"));

View File

@@ -24,6 +24,11 @@ package com.shatteredpixel.shatteredpixeldungeon.items.scrolls;
import com.shatteredpixel.shatteredpixeldungeon.Badges; import com.shatteredpixel.shatteredpixeldungeon.Badges;
import com.shatteredpixel.shatteredpixeldungeon.effects.Identification; import com.shatteredpixel.shatteredpixeldungeon.effects.Identification;
import com.shatteredpixel.shatteredpixeldungeon.items.Item; import com.shatteredpixel.shatteredpixeldungeon.items.Item;
import com.shatteredpixel.shatteredpixeldungeon.items.armor.Armor;
import com.shatteredpixel.shatteredpixeldungeon.items.rings.Ring;
import com.shatteredpixel.shatteredpixeldungeon.items.trinkets.ShardOfOblivion;
import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand;
import com.shatteredpixel.shatteredpixeldungeon.items.weapon.Weapon;
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages; import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet;
import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.utils.GLog;
@@ -46,9 +51,32 @@ public class ScrollOfIdentify extends InventoryScroll {
curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) ); curUser.sprite.parent.add( new Identification( curUser.sprite.center().offset( 0, -16 ) ) );
item.identify(); IDItem(item);
GLog.i( Messages.get(this, "it_is", item.title()) ); }
public static void IDItem( Item item ){
if (ShardOfOblivion.passiveIDDisabled()) {
if (item instanceof Weapon){
((Weapon) item).setIDReady();
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), item.name());
return;
} else if (item instanceof Armor){
((Armor) item).setIDReady();
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), item.name());
return;
} else if (item instanceof Ring){
((Ring) item).setIDReady();
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), item.name());
return;
} else if (item instanceof Wand){
((Wand) item).setIDReady();
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), item.name());
return;
}
}
item.identify();
GLog.i(Messages.get(ScrollOfIdentify.class, "it_is", item.title()));
Badges.validateItemLevelAquired( item ); Badges.validateItemLevelAquired( item );
} }

View File

@@ -250,6 +250,10 @@ public abstract class Wand extends Item {
return this; return this;
} }
public void setIDReady(){
usesLeftToID = -1;
}
public boolean readyToIdentify(){ public boolean readyToIdentify(){
return !isIdentified() && usesLeftToID <= 0; return !isIdentified() && usesLeftToID <= 0;
} }
@@ -439,7 +443,7 @@ public abstract class Wand extends Item {
if (usesLeftToID > -1){ if (usesLeftToID > -1){
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name()); GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name());
} }
usesLeftToID = -1; setIDReady();
} else { } else {
identify(); identify();
GLog.p(Messages.get(Wand.class, "identify")); GLog.p(Messages.get(Wand.class, "identify"));

View File

@@ -134,7 +134,7 @@ abstract public class Weapon extends KindOfWeapon {
if (usesLeftToID > -1){ if (usesLeftToID > -1){
GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name()); GLog.p(Messages.get(ShardOfOblivion.class, "identify_ready"), name());
} }
usesLeftToID = -1; setIDReady();
} else { } else {
identify(); identify();
GLog.p(Messages.get(Weapon.class, "identify")); GLog.p(Messages.get(Weapon.class, "identify"));
@@ -214,6 +214,10 @@ abstract public class Weapon extends KindOfWeapon {
return super.identify(byHero); return super.identify(byHero);
} }
public void setIDReady(){
usesLeftToID = -1;
}
public boolean readyToIdentify(){ public boolean readyToIdentify(){
return !isIdentified() && usesLeftToID <= 0; return !isIdentified() && usesLeftToID <= 0;
} }