PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
spell damage

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Sat Sep 02, 2006 11:46 am    Post subject: spell damage Reply with quote

Whewre do i find spell damage, i looked at the (spell).src files, but i found nothing

Author Message
CWO



Joined: 04 Feb 2006
Posts: 685
Location: Chicago, IL USA

PostPosted: Sat Sep 02, 2006 6:03 pm    Post subject: Reply with quote

depends on your scriptbase. Most of the time that is where the damage part is though, right in the spell scripts themselves.

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Sun Sep 03, 2006 4:46 pm    Post subject: Reply with quote

Since this is the "General Help (095) forum I'll assume you're using 095 Distro.

Here are a few examples taken directly from the spell scripts showing the "Apply Damage" lines:

From clumsy.src starting at line 28:
Code:

  var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := Resisted(circle,caster,cast_on,(GetModAmount( magery )));
  var duration := GetModDuration( magery );
  DoTempMod(cast_on, "dex", 0 - mod_amount, duration); // Damage dealt here



From curse.src starting at line 20:
Code:

  var magery := GetEffectiveSkill(caster, SKILLID_MAGERY);
  var mod_amount := Resisted(circle,caster,cast_on,GetModAmount( magery ));
  var duration := GetModDuration( magery );
   SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "curse" });
  if(Reflected(cast_on))
   cast_on := caster;
  endif
  if (CanMod(cast_on, "str"))
   DoTempMod(cast_on, "str", 0- mod_amount, duration); // Damage dealt here
  endif
  if (CanMod(cast_on, "dex"))
   DoTempMod(cast_on, "dex", 0- mod_amount, duration); // Damage dealt here
  endif
  if (CanMod(cast_on, "int"))
   DoTempMod(cast_on, "int", 0- mod_amount, duration); // Damage dealt here
  endif



From fireball.src starting at line 19:
Code:

  var dmg := RandomDiceRoll("3d6");
  SetObjProperty(cast_on, "LastHit", {caster.name, caster.serial, "fireball"});
  if(Reflected(cast_on))
    PlayMovingEffect(cast_on, caster, FX_FIREBALL, 5, 1);
    PlaySoundEffect(cast_on, 0x15f);
    cast_on := caster;
  endif
  if(GetHp(cast_on) > 1)
    if(cast_on.npctemplate)
      dmg := dmg * 2;
    endif
    ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on, dmg)); // Damage dealt here
  endif



From lighting.src starting at line 17:
Code:

  var dmg := RandomDiceRoll("3d7");
  if (dmg < 1)
   dmg := 1;
  endif
  PlaySoundEffect(cast_on, SFX_SPELL_LIGHTNING);
  PlayLightningBoltEffect( cast_on);
  SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "lightning bolt"});
  if(Reflected(cast_on))
   cast_on := caster;
    PlaySoundEffect(cast_on, SFX_SPELL_LIGHTNING);
    PlayLightningBoltEffect( cast_on);
  endif
  if(cast_on.isA(POLCLASS_NPC))
    dmg := dmg * 2;
  endif
  ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on,dmg)); //damage dealt here



And finally from fstrike.src starting at line 17:
Code:

  var dmg := RandomDiceRoll("6d8");
  SetObjProperty(cast_on, "LastHit", {caster.name,caster.serial, "flame strike" });
  if (Reflected(cast_on))
   cast_on := caster;
  endif
  PlayObjectCenteredEffect(cast_on, 0x3709, 0x0a, 0x1e );
  PlaySoundEffect( caster, SFX_SPELL_FLAME_STRIKE );
  if(GetHp(cast_on) >= 1)
    if(cast_on.npctemplate)
      dmg := dmg * 2;
    endif
    ApplyRawDamage(cast_on, Resisted(circle,caster,cast_on,dmg)); //Damage dealt here
  endif


Just posting a few examples to show you the different ways damage can be applied. Some are using temporary mods for "damaging" vitals like mana or stamina and some use the ApplyDamage function to do HP damage.

Author Message
Poi



Joined: 14 Apr 2006
Posts: 203

PostPosted: Sun Sep 03, 2006 10:12 pm    Post subject: Reply with quote

Ok, thanks for your help, and i realize you did answerr my question, so let me restate it, where do i find the poison damage?(Spell/weapon(skill))

thanks though

Author Message
Yukiko



Joined: 02 Feb 2006
Posts: 1094
Location: Southern Central USA

PostPosted: Mon Sep 04, 2006 3:52 pm    Post subject: Reply with quote

Are you asking about poison damage done by the poison spell or poison damage done by a poisoned weapon? The poison damage script is located in \pkg\spells. The info is passed to that script from the calling script in an array.

Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty