Code: Select all
SetCharToPartyFacing(pChar);
obj_4 = RemoveCharacterPossession(pParam->charIdx, 0);
QueueSound(16, d.partyX, d.partyY, 1);
w_42 = sw(DetermineMastery(pParam->charIdx, 11));
pParam->attdep.shoot.range = pWeapon_18->uByte3 + pWeapon_22->uByte3;
/* 20200801 prs
* This line suffered a translation error (assembly -> c++)
* Error caught by Automaton on Dungeon-Master forum */
//pParam->attdep.shoot.damage = 2 * (pWeapon_18->word4 + w_42);
pParam->attdep.shoot.damage = 2 * ((pWeapon_18->word4 & 0xff) + w_42);
/* 20200801 prs
* This line was put here when I attempted to make the code
* a bit more self-documenting. It does not belong here.
* Error caught by Automaton on Dungeon-Master forum */
// pParam->attdep.shoot.damage = D4W;
/* 20200801 prs
* We used to use attdep.shoot.damage as the decay rate in the call to LaunchObject().
* Error caught by Automaton on Dungeon-Master forum
*/
pParam->attdep.shoot.decayRate = D4W;
pParam->attdep.shoot.success = 1;
CallAttackFilter(&filter, pParam, 1);
LaunchObject(
pChar,
obj_4,
pParam->attdep.shoot.range,
pParam->attdep.shoot.damage,
pParam->attdep.shoot.decayRate);