Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fx_set_stun_state: use a different icon in iwds

fixes pe. red myconid attack (ar8005), which has a 33% chance of stun,
granting an extraneus and wrong icon
  • Loading branch information...
commit 61cfa1c9ec5fd2d437b09c92a223d0e62f80c244 1 parent 41905e6
@lynxlynxlynx lynxlynxlynx authored
Showing with 8 additions and 3 deletions.
  1. +8 −3 gemrb/plugins/FXOpcodes/FXOpcodes.cpp
View
11 gemrb/plugins/FXOpcodes/FXOpcodes.cpp
@@ -65,7 +65,8 @@ using namespace GemRB;
#define PI_HOPELESS 44
#define PI_LEVELDRAIN 53
#define PI_FEEBLEMIND 54
-#define PI_STUN 55
+#define PI_STUN 55 //bg1+bg2
+#define PI_STUN_IWD 44 //iwd1+iwd2
#define PI_AID 57
#define PI_HOLY 59
#define PI_BOUNCE 65
@@ -2129,7 +2130,7 @@ static int power_word_stun_iwd2(Actor *target, Effect *fx)
fx->TimingMode = FX_DURATION_ABSOLUTE;
fx->Duration = stuntime*6*core->Time.round_size + core->GetGame()->GameTime;
STATE_SET( STATE_STUNNED );
- target->AddPortraitIcon(PI_STUN);
+ target->AddPortraitIcon(PI_STUN_IWD);
return FX_APPLIED;
}
@@ -2154,7 +2155,11 @@ int fx_set_stun_state (Scriptable* /*Owner*/, Actor* target, Effect* fx)
}
}
STATE_SET( STATE_STUNNED );
- target->AddPortraitIcon(PI_STUN);
+ if (core->HasFeature(GF_IWD2_SCRIPTNAME)) { // all iwds
+ target->AddPortraitIcon(PI_STUN_IWD);
+ } else {
+ target->AddPortraitIcon(PI_STUN);
+ }
if (fx->Parameter2==1) {
target->SetSpellState(SS_AWAKE);
}
Please sign in to comment.
Something went wrong with that request. Please try again.