Remove force-equip option from Force Give node

This commit is contained in:
2015-06-24 01:41:44 -04:00
parent 8c02b019a9
commit 0b9827cb6a
3 changed files with 1 additions and 12 deletions

View File

@@ -249,10 +249,6 @@ item.</dd>
<dt>Extra 1b:</dt><dd>The special to jump to if the item is not successfully given (if all
the party's item slots are full). If No Special is given, the Jump To special is used as
usual.</dd>
<dt>Extra 2a:</dt><dd>If 1, the item is given pre-equipped, without checking to see if
this is legal. This should only be used if you know exactly what else they have equipped,
for example if you are creating a joined NPC or if you previously stripped them of their
items.</dd>
<dt>Uses:</dt><dd>If you want the party to get an item after winning a combat outdoors,
use a Forced Give. This makes sure that if it is at all possible, they get it.</dd>
<dt>Uses 2:</dt><dd>Use this is the party is given an item during a talking special

View File

@@ -2217,7 +2217,7 @@ void general_spec(eSpecCtx which_mode,cSpecial cur_node,short cur_spec_type,
break;
case eSpecType::FORCED_GIVE:
check_mess = true;
if(!univ.party.forced_give(spec.ex1a + 10000 * spec.ex2a,eItemAbil::NONE) && spec.ex1b >= 0)
if(!univ.party.forced_give(spec.ex1a,eItemAbil::NONE) && spec.ex1b >= 0)
*next_spec = spec.ex1b;
break;
case eSpecType::BUY_ITEMS_OF_TYPE:

View File

@@ -455,11 +455,6 @@ bool cParty::give_item(cItem item,bool do_print) {
// TODO: Utilize the second parameter in special node processing
// if abil > 0, force abil, else ignore
bool cParty::forced_give(item_num_t item_num,eItemAbil abil,short dat) {
bool force_equip = false;
if(item_num >= 10000) {
item_num -= 10000;
force_equip = true;
}
if(item_num < 0 || item_num >= univ.scenario.scen_items.size())
return true;
cItem item = univ.scenario.scen_items[item_num];
@@ -472,8 +467,6 @@ bool cParty::forced_give(item_num_t item_num,eItemAbil abil,short dat) {
for(int j = 0; j < 24; j++)
if(adven[i]->main_status == eMainStatus::ALIVE && adven[i]->items[j].variety == eItemType::NO_ITEM) {
adven[i]->items[j] = item;
if(force_equip)
adven[i]->equip[j] = true;
if(print_result) {
std::ostringstream announce;