Ejemplo n.º 1
0
    /// <summary>
    /// Casts poison other
    /// </summary>
    /// <param name="caster">Caster.</param>
    /// <param name="EffectID">Effect ID of the spell</param>
    void Cast_NoxYlem(GameObject caster, int EffectID)
    {
        //poison other.
                RaycastHit hit= new RaycastHit();
                NPC npc = GetNPCTargetRandom(caster, ref hit);
                if (npc != null)
                {
                        SpellProp_Poison poison = new SpellProp_Poison();
                        poison.init (EffectID,caster);
                        //Apply a impact effect to the npc
                        Impact.SpawnHitImpact(npc.transform.name + "_impact",npc.GetImpactPoint(),poison.impactFrameStart,poison.impactFrameEnd);

                        int EffectSlot = CheckPassiveSpellEffectNPC(npc.gameObject);
                        if (EffectSlot!=-1)
                        {
                                SpellEffectPoison sep= (SpellEffectPoison)SetSpellEffect(npc.gameObject, npc.NPCStatusEffects, EffectSlot, EffectID);
                                sep.Value=poison.BaseDamage;
                                sep.counter=poison.counter;
                                sep.isNPC=true;
                                sep.Go ();
                        }
                }
    }
Ejemplo n.º 2
0
 /// <summary>
 /// Casts the poison spells (generic)
 /// </summary>
 /// <param name="caster">Caster.</param>
 /// <param name="ActiveSpellArray">Active spell array.</param>
 /// <param name="EffectID">Effect ID of the spell</param>
 /// <param name="EffectSlot">Effect slot.</param>
 public void Cast_Poison(GameObject caster, SpellEffect[] ActiveSpellArray, int EffectID, int EffectSlot)
 {
     //Poison
             SpellProp_Poison spp = new SpellProp_Poison();
             spp.init (EffectID,caster);
             SpellEffectPoison sep = (SpellEffectPoison)SetSpellEffect (caster, ActiveSpellArray,EffectSlot,EffectID);
             sep.Value=spp.BaseDamage;//Poison will damage the player for 100 hp over it's duration
             sep.counter=spp.counter; //It will run for x ticks. Ie 10 hp damage per tick
             if (caster.name!=GameWorldController.instance.playerUW.name)
             {
                     sep.isNPC=true;
             }
             //
             sep.Go ();
 }