@ -2173,7 +2173,6 @@ void SeasonI::keyUpdates() {
}
if ( ACTIONKEYPRESSED ) {
if ( OVERWORLD_ITEM_BEING_USED ) { //Equipping an item.
int prevPartyInvenSize = PARTY_INVENTORY . size ( ) ;
if ( PARTY_INVENTORY [ ITEM_SELECTION_CURSOR ] - > stats . equip ! = EquipSlot : : NONE ) {
DisplayMessageBox ( PARTY_MEMBER_OBJ [ OVERWORLD_TARGET_SELECTION ] - > name + " equipped the " + PARTY_INVENTORY [ ITEM_SELECTION_CURSOR ] - > name + " . " ) ;
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ OVERWORLD_TARGET_SELECTION ] ] - > EquipItem ( ITEM_SELECTION_CURSOR ) ;
@ -2245,10 +2244,6 @@ void SeasonI::keyUpdates() {
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ OVERWORLD_TARGET_SELECTION ] ] - > RemoveItem ( ITEM_SELECTION_CURSOR ) ;
}
}
if ( ITEM_SELECTION_CURSOR > = PARTY_INVENTORY . size ( ) & & prevPartyInvenSize & 1 & & PARTY_INVENTORY . size ( ) = = prevPartyInvenSize - 1 ) {
ITEM_SELECTION_OFFSET - = 2 ;
}
ITEM_SELECTION_CURSOR = std : : clamp ( ITEM_SELECTION_CURSOR , 0 , ( int ) PARTY_INVENTORY . size ( ) - 1 ) ;
OVERWORLD_ITEM_BEING_USED = false ;
GAME_STATE = GameState : : OVERWORLD_ITEMS_MENU ;
} else { //Using a power instead.
@ -4136,8 +4131,12 @@ void SeasonI::SetupTargetSelect() {
for ( auto & ent : GetEntitiesInRange ( SELECTED_TARGET , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelPos , PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove ) ) {
ent - > obj - > highlighted = true ;
}
if ( PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove = = MOVELIST [ BattleMoveName : : CONSUMABLE ] | | PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove = = MOVELIST [ BattleMoveName : : CONSUMABLE_ENEMY ] ) {
DISPLAY_TARGET_MESSAGE = " Use " + EQUIP_ $ ITEM_DISPLAY + " on... " ;
} else {
DISPLAY_TARGET_MESSAGE = " Use " + PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > GetPowerName ( ) + " on... " ;
}
}
void SeasonI : : ConfirmPlayerTargetSelection ( ) {
for ( int i = 0 ; i < PARTY_MEMBER_COUNT ; i + + ) {
@ -4148,7 +4147,6 @@ void SeasonI::ConfirmPlayerTargetSelection() {
}
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > channelTimeRemaining = PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > selectedMove - > channelTime ;
int prevPartyInvenSize = PARTY_INVENTORY . size ( ) ;
if ( ITEM_REQUIRES_EQUIPPING ) {
Item * SelectedItem = PARTY_INVENTORY [ ITEM_SELECTION_CURSOR ] ;
if ( SelectedItem - > stats . equip = = EquipSlot : : WEAPON & & PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > equipment [ SelectedItem - > stats . equip ] ! = nullptr ) { //Only swap back to the previous equip when there was nothing equipped to begin with.
@ -4174,10 +4172,6 @@ void SeasonI::ConfirmPlayerTargetSelection() {
PARTY_MEMBER_STATS [ PARTY_MEMBER_ID [ - CURRENT_TURN - 1 ] ] - > RemoveItem ( ITEM_SELECTION_CURSOR ) ;
}
}
if ( ITEM_SELECTION_CURSOR > = PARTY_INVENTORY . size ( ) & & prevPartyInvenSize & 1 & & PARTY_INVENTORY . size ( ) = = prevPartyInvenSize - 1 ) {
ITEM_SELECTION_OFFSET - = 2 ;
}
ITEM_SELECTION_CURSOR = std : : clamp ( ITEM_SELECTION_CURSOR , 0 , ( int ) PARTY_INVENTORY . size ( ) - 1 ) ;
}
std : : vector < Entity * > SeasonI : : GetEntitiesInRange ( int targetEnt , vd2d channelPos , Battle : : Move * move ) {