Beispiel #1
0
    explicit GrandWarlockAlythessAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        auto pyrogenetics = addAISpell(GRAND_WARLOCK_ALYTHESS_PYROGENICS, 100.0f, TARGET_SELF, 0, 10);
        pyrogenetics->setMinMaxDistance(0.0f, 50.0f);

        auto flameTouched = addAISpell(GRAND_WARLOCK_ALYTHESS_FLAME_TOUCHED, 10.0f, TARGET_RANDOM_SINGLE, 0, 30);
        flameTouched->setMinMaxDistance(0.0f, 50.0f);

        auto conflagration = addAISpell(GRAND_WARLOCK_ALYTHESS_CONFLAGRATION, 15.0f, TARGET_RANDOM_SINGLE, 4, 25);
        conflagration->addEmote("Fire to the aid of shadow!", CHAT_MSG_MONSTER_YELL, 12489);
        conflagration->setMinMaxDistance(0.0f, 50.0f);

        auto blaze = addAISpell(GRAND_WARLOCK_ALYTHESS_BLAZE, 30.0f, TARGET_RANDOM_SINGLE, 3, 0);
        blaze->setMinMaxDistance(0.0f, 50.0f);

        auto flameFear = addAISpell(GRAND_WARLOCK_ALYTHESS_FLAME_SEAR, 20.0f, TARGET_RANDOM_SINGLE);
        flameFear->setMinMaxDistance(0.0f, 50.0f);

        mLocaleEnrageSpell = addAISpell(GRAND_WARLOCK_ALYTHESS_ENRAGE, 0.0f, TARGET_SELF);
        mLocaleEnrageSpell->addEmote("Your luck has run its course!", CHAT_MSG_MONSTER_YELL, 12493);
        mLocaleEnrageSpell->setMinMaxDistance(0.0f, 50.0f);

        // Emotes
        addEmoteForEvent(Event_OnTargetDied, 8849);
        addEmoteForEvent(Event_OnDied, 8850); // Wasn't able to find sound for this text

        mLocaleEnrageTimerId = 0;
    }
Beispiel #2
0
    explicit ShadowswordAssassinAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        auto assaMark = addAISpell(SHADOWSWORD_ASSASSIN_ASSASSINS_MARK, 100.0f, TARGET_RANDOM_SINGLE, 0, 15);
        assaMark->setMinMaxDistance(0.0f, 100.0f);

        auto aimedShot = addAISpell(SHADOWSWORD_ASSASSIN_AIMED_SHOT, 15.0f, TARGET_ATTACKING, 4, 6, false, true);
        aimedShot->setMinMaxDistance(5.0f, 35.0f);

        auto shadowstep = addAISpell(SHADOWSWORD_ASSASSIN_SHADOWSTEP, 15.0f, TARGET_RANDOM_SINGLE, 0, 50);
        shadowstep->setMinMaxDistance(0.0f, 40.0f);

        addAISpell(SHADOWSWORD_ASSASSIN_GREATER_INVISIBILITY, 5.0f, TARGET_SELF, 0, 180);
    }
Beispiel #3
0
SFXSource::SFXSource( SFXProfile *profile, SFXDescription* desc )
   :  mStatus( SFXStatusStopped ),
      mPitch( 1 ),
      mVelocity( 0, 0, 0 ),
      mTransform( true ),
      mAttenuatedVolume( 0 ),
      mDistToListener( 0 ),
      mModulativeVolume( 1 ),
      mVoice( NULL ),
      mProfile( profile ),
      mStatusCallback( NULL ),
      mPlayStartTick( 0 )
{
   mIs3D = desc->mIs3D;
   mIsLooping = desc->mIsLooping;
   mIsStreaming = desc->mIsStreaming;
   mFadeInTime = desc->mFadeInTime;
   mFadeOutTime = desc->mFadeOutTime;
   mPitch = desc->mPitch;

   setVolume( desc->mVolume ); 

   setMinMaxDistance( desc->mReferenceDistance, desc->mMaxDistance );

   setCone( F32( desc->mConeInsideAngle ),
            F32( desc->mConeOutsideAngle ),
            desc->mConeOutsideVolume );

   mChannel = desc->mChannel;

   // Allow namespace linkage.
   mNSLinkMask = LinkSuperClassName | LinkClassName;
}
Beispiel #4
0
    explicit FelmystAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        //Phase 1 spells
        auto cleave = addAISpell(FELMYST_CLEAVE, 6.0f, TARGET_ATTACKING, 0, 10);
            cleave->setAvailableForScriptPhase({ 1 });

        auto gasNova = addAISpell(FELMYST_GAS_NOVA, 25.0f, TARGET_SELF, 1, 18);
        gasNova->setAvailableForScriptPhase({ 1 });

        auto encapsulate = addAISpell(FELMYST_ENCAPSULATE, 25.0f, TARGET_RANDOM_SINGLE, 7, 30);
        encapsulate->setMinMaxDistance(0.0f, 30.0f);
        encapsulate->setAvailableForScriptPhase({ 1 });

        auto corrosion = addAISpell(FELMYST_CORROSION, 20.0f, TARGET_ATTACKING, 1, 35);
        corrosion->setMinMaxDistance(0.0f, 30.0f);
        corrosion->setAvailableForScriptPhase({ 1 });
        corrosion->addEmote("Choke on your final breath!", CHAT_MSG_MONSTER_YELL, 12478);

        //Phase 2 spells
        auto demonicVapor = addAISpell(FELMYST_DEMONIC_VAPOR, 10.0f, TARGET_RANDOM_SINGLE, 0, 20);
        demonicVapor->setAvailableForScriptPhase({ 2 });

        //Phase 3 spells
        //Fog of corruption is the actual breath Felmyst does during his second phase, probably we'll have to spawn it like a creature.

        //10min Enrage
        mLocaleEnrageSpell = addAISpell(FELMYST_ENRAGE, 0.0f, TARGET_SELF);
        mLocaleEnrageSpell->addEmote("No more hesitation! Your fates are written!", CHAT_MSG_MONSTER_YELL, 12482);

        //Emotes
        addEmoteForEvent(Event_OnCombatStart, 8842);
        addEmoteForEvent(Event_OnTargetDied, 8843);
        addEmoteForEvent(Event_OnTargetDied, 8844);
        addEmoteForEvent(Event_OnDied, 8845);
        addEmoteForEvent(Event_OnTaunt, 8846);

        mLocaleEnrageTimerId = 0;
    }
        OmorTheUnscarredAI(Creature* pCreature) : CreatureAIScript(pCreature)
        {
            pShield = addAISpell(OMOR_DEMONIC_SHIELD, 30.0f, TARGET_SELF, 0, 25);
            pShield->setMinMaxPercentHp(0, 20);

            auto pSummon = addAISpell(OMOR_SUMMON_FIENDISH_HOUND, 8.0f, TARGET_SELF, 1, 20);
            pSummon->addEmote("Achor-she-ki! Feast my pet! Eat your fill!", CHAT_MSG_MONSTER_YELL, 10277);

            pWhip = addAISpell(OMOR_SHADOW_WHIP, 10.0f, TARGET_RANDOM_SINGLE, 0, 30);
            pWhip->setMinMaxDistance(10.0f, 60.0f);

            if (!_isHeroic())
            {
                auto shadowBolt = addAISpell(OMOR_SHADOW_BOLT, 8.0f, TARGET_RANDOM_SINGLE, 3, 15, false, true);
                shadowBolt->setMinMaxDistance(10.0f, 60.0f);

                auto pAura = addAISpell(OMOR_TREACHEROUS_AURA, 8.0f, TARGET_RANDOM_SINGLE, 2, 35, false, true);
                pAura->setMinMaxDistance(0.0f, 60.0f);
                pAura->addEmote("A-Kreesh!", CHAT_MSG_MONSTER_YELL, 10278);
            }
            else
            {
                auto shadowBolt = addAISpell(OMOR_SHADOW_BOLT2, 8.0f, TARGET_RANDOM_SINGLE, 3, 15, false, true);
                shadowBolt->setMinMaxDistance(10.0f, 60.0f);

                auto pAura = addAISpell(OMOR_BANE_OF_TREACHERY, 8.0f, TARGET_RANDOM_SINGLE, 2, 35, false, true);
                pAura->setMinMaxDistance(0.0f, 60.0f);
                pAura->addEmote("A-Kreesh!", CHAT_MSG_MONSTER_YELL, 10278);
            }

            addEmoteForEvent(Event_OnCombatStart, 4856);     // I will not be defeated!
            addEmoteForEvent(Event_OnCombatStart, 4855);     // You dare stand against ME?
            addEmoteForEvent(Event_OnCombatStart, 4857);     // Your insolence will be your death!
            addEmoteForEvent(Event_OnTargetDied, 4860);      // Die, weakling!
            addEmoteForEvent(Event_OnDied, 4861);            // It is... not over.
        }
Beispiel #6
0
    explicit LadySacrolashAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        auto darkTouch = addAISpell(LADY_SACROLASH_DARK_TOUCHED, 50.0f, TARGET_RANDOM_SINGLE, 0, 10);
        darkTouch->setMinMaxDistance(0.0f, 50.0f);

        auto shadowBlades = addAISpell(LADY_SACROLASH_SHADOW_BLADES, 25.0f, TARGET_ATTACKING, 2, 5);
        shadowBlades->setMinMaxDistance(0.0f, 50.0f);

        auto shadowNova = addAISpell(LADY_SACROLASH_SHADOW_NOVA, 15.0f, TARGET_RANDOM_SINGLE, 4, 20);
        shadowNova->addEmote("Shadow to the aid of fire!", CHAT_MSG_MONSTER_YELL, 12485);
        shadowNova->setMinMaxDistance(0.0f, 50.0f);

        auto confoundingBlow = addAISpell(LADY_SACROLASH_CONFOUNDING_BLOW, 10.0f, TARGET_RANDOM_SINGLE, 0, 15);
        confoundingBlow->setMinMaxDistance(0.0f, 50.0f);

        mLocaleEnrageSpell = addAISpell(LADY_SACROLASH_ENRAGE, 0.0f, TARGET_SELF);
        mLocaleEnrageSpell->addEmote("Time is a luxury you no longer possess!", CHAT_MSG_MONSTER_YELL, 0); // Wasn't able to find sound for this text

        // Emotes
        addEmoteForEvent(Event_OnTargetDied, 8847);
        addEmoteForEvent(Event_OnDied, 8848);

        mLocaleEnrageTimerId = 0;
    }
    explicit TalonKingIkissAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        arcaneVolley = addAISpell(SP_TALRON_K_IKISS_ARCANE_VOLLEY, 12.0f, TARGET_VARIOUS, 0, 10);
        arcaneVolley->setAttackStopTimer(1000);

        auto blink = addAISpell(SP_TALRON_K_IKISS_BLINK, 7.0f, TARGET_SELF, 15, 25, false, true);
        blink->setAttackStopTimer(2500);

        auto polymorph = addAISpell(SP_TALRON_K_IKISS_POLYMORPH, 9.0f, TARGET_RANDOM_SINGLE, 0, 15, false, true);
        polymorph->setAttackStopTimer(1000);
        polymorph->setMinMaxDistance(0.0f, 40.0f);

        arcaneExplosion = addAISpell(SP_TALRON_K_IKISS_ARCANE_EXPLOSION, 0.0f, TARGET_VARIOUS);
        arcaneExplosion->setAttackStopTimer(1000);

        Blink = false;

        addEmoteForEvent(Event_OnCombatStart, SAY_TALRON_K_IKISS_02);
        addEmoteForEvent(Event_OnCombatStart, SAY_TALRON_K_IKISS_03);
        addEmoteForEvent(Event_OnCombatStart, SAY_TALRON_K_IKISS_04);
        addEmoteForEvent(Event_OnTargetDied, SAY_TALRON_K_IKISS_05);
        addEmoteForEvent(Event_OnTargetDied, SAY_TALRON_K_IKISS_06);
        addEmoteForEvent(Event_OnDied, SAY_TALRON_K_IKISS_07);
    }
    WatchkeeperGargolmarAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        auto surge = addAISpell(WATCHKEEPER_SURGE, 20.0f, TARGET_RANDOM_SINGLE, 0, 15);
        surge->addEmote("Back off, pup!", CHAT_MSG_MONSTER_YELL, 10330);
        surge->setMinMaxDistance(5.0f, 40.0f);;

        addAISpell(WATCHKEEPER_OVERPOWER, 10.0f, TARGET_ATTACKING, 0, 5);
        mRetaliation = addAISpell(WATCHKEEPER_RETALIATION, 0.0f, TARGET_SELF);

        if (_isHeroic())
            addAISpell(WATCHKEEPER_MORTAL_WOUND_H, 15.0f, TARGET_ATTACKING, 0, 12);
        else
            addAISpell(WATCHKEEPER_MORTAL_WOUND, 15.0f, TARGET_ATTACKING, 0, 12);

        mCalledForHelp = 0;
        _retaliation = false;

        addEmoteForEvent(Event_OnCombatStart, 4873);    // What have we here?
        addEmoteForEvent(Event_OnCombatStart, 4874);    // This may hurt a little....
        addEmoteForEvent(Event_OnCombatStart, 4875);    // I'm going to enjoy this...
        addEmoteForEvent(Event_OnTargetDied, 4876);     // Say farewell!
        addEmoteForEvent(Event_OnTargetDied, 4877);     // Much too easy.
        addEmoteForEvent(Event_OnDied, 4878);           // Hahah.. <cough> ..argh!
    }
Beispiel #9
0
bool SFXSource::_allocVoice( SFXDevice* device )
{
   // We shouldn't have any existing voice!
   AssertFatal( !mVoice, "SFXSource::_allocVoice() - Already had a voice!" );

   // Must not assign voice to source that isn't playing.
   AssertFatal( getLastStatus() == SFXStatusPlaying,
      "SFXSource::_allocVoice() - Source is not playing!" );

   // The buffer can be lost when the device is reset 
   // or changed, so initialize it if we have to.  If
   // that fails then we cannot create the voice.
   
   if( mBuffer.isNull() )
   {
      if( mProfile != NULL )
         _setBuffer( mProfile->getBuffer() );

      if( mBuffer.isNull() )
         return false;
   }

   // Ask the device for a voice based on this buffer.
   mVoice = device->createVoice( mIs3D, mBuffer );
   if( !mVoice )
      return false;

   setVolume( mVolume );
   if( mPitch != 1.0f )
      setPitch( mPitch );
   
   if( mIs3D )
   {
      setTransform( mTransform );
      setVelocity( mVelocity );
      setMinMaxDistance( mMinDistance, mMaxDistance );
      setCone( mConeInsideAngle, mConeOutsideAngle, mConeOutsideVolume );
   }

   // Update the duration... it shouldn't have changed, but
   // its probably better that we're accurate if it did.
   mDuration = mBuffer->getDuration();

   // If virtualized playback has been started, we transfer its position to the
   // voice and stop virtualization.

   if( mVirtualPlayTimer.isStarted() )
   {
      const U32 playTime = mVirtualPlayTimer.getPosition();
      const U32 pos = mBuffer->getFormat().getSampleCount( playTime );
      mVoice->setPosition( pos);
      mVirtualPlayTimer.stop();
   }

   mVoice->play( mIsLooping );
   
   #ifdef DEBUG_SPEW
   Platform::outputDebugString( "[SFXSource] allocated voice for source '%i'", getId() );
   #endif
   
   return true;
}
Beispiel #10
0
 explicit SunbladeProtectorAI(Creature* pCreature) : CreatureAIScript(pCreature)
 {
     auto felLightning = addAISpell(SUNBLADE_PROTECTOR_FEL_LIGHTNING, 100.0f, TARGET_RANDOM_SINGLE, 0, 15);
     felLightning->setMinMaxDistance(0.0f, 60.0f);
 }