Experimental: Identify spell now brings up shop-like identify interface
This commit is contained in:
@@ -825,7 +825,7 @@ void handle_switch_pc(short which_pc, bool& need_redraw, bool& need_reprint) {
|
||||
}
|
||||
|
||||
cPlayer& pc = univ.party[which_pc];
|
||||
if(!prime_time() && overall_mode != MODE_SHOPPING && overall_mode != MODE_TALKING)
|
||||
if(!prime_time() && overall_mode != MODE_SHOPPING && overall_mode != MODE_TALKING && overall_mode != MODE_ITEM_TARGET)
|
||||
add_string_to_buf("Set active: Finish what you're doing first.");
|
||||
else if(is_combat()) {
|
||||
if(pc.ap > 0) {
|
||||
@@ -963,6 +963,9 @@ void handle_item_shop_action(short item_hit) {
|
||||
ASB("Your item is identified.");
|
||||
target.ident = true;
|
||||
shopper.combine_things();
|
||||
if(overall_mode == MODE_ITEM_TARGET) {
|
||||
// TODO: End if there are no unidentified items left
|
||||
}
|
||||
}
|
||||
break;
|
||||
case MODE_RECHARGE:
|
||||
@@ -2228,7 +2231,12 @@ bool handle_keystroke(const sf::Event& event, cFramerateLimiter& fps_limiter){
|
||||
} else if(overall_mode == MODE_SPELL_TARGET)
|
||||
// Rotate a force wall
|
||||
spell_cast_hit_return();
|
||||
else if(overall_mode == MODE_TOWN || overall_mode == MODE_COMBAT || overall_mode == MODE_OUTDOORS) {
|
||||
else if(overall_mode == MODE_ITEM_TARGET) {
|
||||
if(stat_screen_mode == MODE_IDENTIFY)
|
||||
ASB("Identify: Finished");
|
||||
overall_mode = MODE_TOWN;
|
||||
stat_screen_mode = MODE_INVEN;
|
||||
} else if(overall_mode == MODE_TOWN || overall_mode == MODE_COMBAT || overall_mode == MODE_OUTDOORS) {
|
||||
// Pause (skip turn)
|
||||
handle_pause(did_something, need_redraw);
|
||||
advance_time(did_something, need_redraw, need_reprint);
|
||||
|
@@ -18,6 +18,7 @@ enum eGameMode {
|
||||
MODE_TOWN,
|
||||
MODE_TALK_TOWN, // looking for someone to talk
|
||||
MODE_TOWN_TARGET, // spell target, that is
|
||||
MODE_ITEM_TARGET,
|
||||
MODE_USE_TOWN,
|
||||
MODE_DROP_TOWN,
|
||||
MODE_BASH_TOWN, // Bashing down a door
|
||||
|
@@ -586,6 +586,15 @@ void do_mage_spell(short pc_num,eSpell spell_num,bool freebie) {
|
||||
case eSpell::IDENTIFY:
|
||||
if(!freebie)
|
||||
univ.party[pc_num].cur_sp -= (*spell_num).cost;
|
||||
if(!univ.scenario.is_legacy && is_town()) {
|
||||
ASB("Select items to identify. Press Space when done.");
|
||||
overall_mode = MODE_ITEM_TARGET;
|
||||
stat_screen_mode = MODE_IDENTIFY;
|
||||
extern short shop_identify_cost;
|
||||
shop_identify_cost = 0;
|
||||
put_item_screen(stat_window);
|
||||
break;
|
||||
}
|
||||
ASB("All of your items are identified.");
|
||||
for(cPlayer& pc : univ.party)
|
||||
for(cItem& item : pc.items)
|
||||
|
Reference in New Issue
Block a user