Rajoute une petite vérification dans l'évènement "OnDamaged" du boss, qui enverra un message à ses congénères, si sa vie baisse un peu trop. Une commande comme ci-dessous suffira :
int nMaxHP = GetMaxHitPoints();
int nCurrentHP = GetCurrentHitPoints();
// Hop un petit pourcentage de points de vie perdus:
int nPercentHP = (nCurrentHP/nMaxHP)*100;
// Si le boss est a moins de 10% de sa vie
if(nPercentHP < 10)
SpeakString("HEAL_10",TALKVOLUME_SILENT_SHOUT);
// Tu peux enlever "TALKVOLUME..." pour les tests
// ou, si le boss est a moins de 20% de sa vie
else if(nPercentHP < 20)
SpeakString("HEAL_20",TALKVOLUME_SILENT_SHOUT);
// ou, si le boss est a moins de 50% de sa vie
else if(nPercentHP < 50)
SpeakString("HEAL_50",TALKVOLUME_SILENT_SHOUT);
Ensuite tu paramètre tes soigneurs.
Dans leur évènement "OnSpawn" tu fais en sorte qu'ils puissent "entendre", et qu'ils réagissent à l'appel du Boss, en fonction de cet appel. Ces deux lignes suffiront :
SetListenPattern(OBJECT_SELF,"HEAL_**",26999);
SetListening(OBJECT_SELF,TRUE);
Dans leur évènement "OnConversation", tu les fait réagir s'ils "entendent" l'appel de leur boss.
if(GetListenPatternNumber()==26999)
{
object oBoss = GetNearestObjectByTag("Tag_du_Boss");
string sPhrase = GetMatchedSubstring(0);
int bCritical = GetHasSpell(SPELL_CURE_CRITICAL_WOUNDS) > 0;
int bSerious = GetHasSpell(SPELL_CURE_SERIOUS_WOUNDS) > 0;
int bModerate = GetHasSpell(SPELL_CURE_MODERATE_WOUNDS) > 0;
int bLight = GetHasSpell(SPELL_CURE_LIGHT_WOUNDS) > 0;
int bMinor = GetHasSpell(SPELL_CURE_MINOR_WOUNDS) > 0;
if(sPhrase == "HEAL_10")
{
if(bCritical)
ActionCastSpell(SPELL_CURE_CRITICAL_WOUNDS,oBoss);
else if(bSerious)
ActionCastSpell(SPELL_CURE_SERIOUS_WOUNDS,oBoss);
else if(bModerate)
ActionCastSpell(SPELL_CURE_MODERATE_WOUNDS,oBoss);
else if(bLight)
ActionCastSpell(SPELL_CURE_LIGHT_WOUNDS,oBoss);
else if(bMinor)
ActionCastSpell(SPELL_CURE_MINOR_WOUNDS,oBoss);
}
else if(sPhrase == "HEAL_20")
{
if(bSerious)
ActionCastSpell(SPELL_CURE_SERIOUS_WOUNDS,oBoss);
else if(bModerate)
ActionCastSpell(SPELL_CURE_MODERATE_WOUNDS,oBoss);
else if(bLight)
ActionCastSpell(SPELL_CURE_LIGHT_WOUNDS,oBoss);
else if(bMinor)
ActionCastSpell(SPELL_CURE_MINOR_WOUNDS,oBoss);
}
else if(sPhrase == "HEAL_50")
{
if(bModerate)
ActionCastSpell(SPELL_CURE_MODERATE_WOUNDS,oBoss);
else if(bLight)
ActionCastSpell(SPELL_CURE_LIGHT_WOUNDS,oBoss);
else if(bMinor)
ActionCastSpell(SPELL_CURE_MINOR_WOUNDS,oBoss);
}
}