This action instructs the engine to use the specified column of [WISH.2DA]({{ 2da }}/wish.htm), randomly select 5 choices (rows; count appears hardcoded) and set the appropriate globals for those spells. Once the maximum "wish choices" have been selected, the dialog continues and casts the selected spell.
From a dialog:
IF ~CheckStatGT(LastTalkedToBy,17,WIS)~ THEN DO ~SetupWish(4,1)~ GOTO 8
IF ~Global("WishPower01","GLOBAL",1)~ THEN REPLY #72526 // ~'Breach' on everyone in the area, including the party.~
DO ~ActionOverride(LastTalkedToBy,ForceSpellRES("spwish26",Myself)) ApplySpell(Myself,POOF_GONE)~ EXIT
The key is the Global("WishPower**","GLOBAL",1). The highest is "WishPower37", and the highest number in the WISH.2DA is also 37. There are a total of 46 SPWISH**.SPL files, but 9 are unused:
SPWISH01 STR Bonus +1 SPWISH02 INT Bonus +1 SPWISH03 DEX Bonus +1 SPWISH04 CON Bonus +1 SPWISH05 WIS Bonus +1 SPWISH06 CHA Bonus +1 SPWISH07 Restoration SPWISH09 Globe of Blades SPWISH15 Gain 10,000 Gold (Party)
Looking at the spells that have a "WishPower**" next to them, this list can be derived (sorted by Wisdom level (E=enemies, P=party, C=caster A=All)):
Low (9-) Medium (10-14) High (15-17) Ultra (18+)
Heal E Heal E Heal E TS & IA (X2) P
Improved Haste E Improved Haste E Improved Haste E Improved Haste E
Dark Planetar E Silenced A Dark Planetar E Lose 10,000 gp P
Level Drain P Level Drain P WIS (3) P Level Drain P
Hit Points -50% C Hit Points -50% C TS & IA (X2) P Hit Points -50% C
Hit Points -15% P Haste A Hit Points -15% P Mass Raise Dead P
Lose Spells C Lose Spells C Lose Spells C WIS (3) P
STR (3) P STR (3) P STR (3) P Haste A
CON (3) P CON (3) P Stats (25) P Stats (25) P
DEX (3) P DEX (3) P DEX (3) P Rest & Remem. P
INT (3) P INT (3) P Silenced A Bad Luck A
Slowed P Slowed P Rest & Remem. P Meteor Swarm C
Restoration P Restoration P Improved Haste P Restoration P
Gr. Deathblow P Gr. Deathblow P Gr. Deathblow P Gr. Deathblow P
Hardiness P Hardiness P Breach E Hardiness P
Create Wand C Create Wand C Create Wand C Create Wand C
Create Potion C Create Potion C Create Potion C Create Potion C
Breach A Breach A Breach A Improved Haste P
Wing Buffet A Wing Buffet A Wing Buffet A Breach E
Heal A Heal A Heal A Heal A
STR (18) A STR (18) A STR (18) A STR (18) A
Miscast Magic A Miscast Magic A Miscast Magic A Miscast Magic A
Magic Resist A Magic Resist A Magic Resist A Magic Resist A
Abi-Dalzim's A Abi-Dalzim's A Abi-Dalzim's A Abi-Dalzim's A
Intoxicated A Intoxicated A Intoxicated A Intoxicated A
Bad Luck A Bad Luck A Bad Luck A
/ Breach E Stats (25) P \
OR < > OR
\ Rest & Remem. P Mass Raise Dead P /
BG2 barrel re-exports.
Generated by ts-update. Do not edit manually.
Uses named re-exports (not export *) so esbuild can statically resolve each binding without falling back to runtime __reExport helpers for externalized .d.ts modules.