Aelor
Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.

Aelor

Forum officiel du module NeverWinter Nights et role play Aelor.
 
AccueilAccueil  PortailPortail  RechercherRechercher  Dernières imagesDernières images  S'enregistrerS'enregistrer  Connexion  
-20%
Le deal à ne pas rater :
Pack Gigabyte Ecran PC Gamer 27″ LED M27Q (rev2.0) + Radeon RX 6950 ...
749 € 939 €
Voir le deal

 

 Sort Modifié : Régénération

Aller en bas 
AuteurMessage
Gimli Oakenshield
L'ignorant en Hardware
Gimli Oakenshield


Nombre de messages : 783
Localisation : Près de mon ordi !
Date d'inscription : 15/12/2005

Sort Modifié : Régénération Empty
MessageSujet: Sort Modifié : Régénération   Sort Modifié : Régénération EmptyJeu 3 Mai - 19:41

Dans NWN2 le sort régénération offrait 10% de la vie du Joueur tous les rounds pendant 10 rounds (contrairement a ce qui est marqué dans la description) Voici le script qui le remet tel qu'il était dans NWN1, un sondage est ouvert pour l'avenir de ce sort, donc pas de commentaires ici.

Code:
//::///////////////////////////////////////////////
//:: Regenerate
//:: NW_S0_Regen
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Rend 6 PV/round, pendant 1 round/lvl
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 22, 2001
//:: Modifié par Gimli_Oakenshield le 03/05/2007
//:://////////////////////////////////////////////


// (Updated JLR - OEI 08/01/05 NWN2 3.5 -- Metamagic cleanup, Heal Amount change)
// JLR - OEI 08/23/05 -- Metamagic changes
#include "nwn2_inc_spells"


#include "x2_inc_spellhook"

void main()
{

/*
  Spellcast Hook Code
  Added 2003-06-23 by GeorgZ
  If you want to make changes to all spells,
  check x2_inc_spellhook.nss to find out more
 
*/

    if (!X2PreSpellCastCode())
    {
   // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
        return;
    }

// End of Spell Cast Hook


    //Declare major variables
    object oTarget = GetSpellTargetObject();
    int nRegenAmt = 6; /*GetMaxHitPoints(oTarget) / 10;
    if ( nRegenAmt < 1 )
    {
        nRegenAmt = 1;
    }*/
    effect eRegen = EffectRegenerate(nRegenAmt, 6.0);
    effect eVis = EffectVisualEffect(VFX_IMP_HEALING_G);
    effect eDur = EffectVisualEffect(VFX_DUR_REGENERATE);
    effect eLink = EffectLinkEffects(eRegen, eDur);


    float fDuration = /*RoundsToSeconds(10); //*/RoundsToSeconds(GetCasterLevel(OBJECT_SELF));
    //Meta-Magic Checks
    fDuration = ApplyMetamagicDurationMods(fDuration);
    int nDurType = ApplyMetamagicDurationTypeMods(DURATION_TYPE_TEMPORARY);

    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
    //Apply effects and VFX
    ApplyEffectToObject(nDurType, eLink, oTarget, fDuration);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
Revenir en haut Aller en bas
Gimli Oakenshield
L'ignorant en Hardware
Gimli Oakenshield


Nombre de messages : 783
Localisation : Près de mon ordi !
Date d'inscription : 15/12/2005

Sort Modifié : Régénération Empty
MessageSujet: Re: Sort Modifié : Régénération   Sort Modifié : Régénération EmptyLun 7 Mai - 19:51

Le script final avec les 2% + 3 PV

Code:
//::///////////////////////////////////////////////
//:: Regenerate
//:: NW_S0_Regen
//:: Copyright (c) 2001 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Rend 6 PV/round, pendant 1 round/lvl
*/
//:://////////////////////////////////////////////
//:: Created By: Preston Watamaniuk
//:: Created On: Oct 22, 2001
//:: Modifié par Gimli_Oakenshield le 03/05/2007
//:://////////////////////////////////////////////


// (Updated JLR - OEI 08/01/05 NWN2 3.5 -- Metamagic cleanup, Heal Amount change)
// JLR - OEI 08/23/05 -- Metamagic changes
#include "nwn2_inc_spells"


#include "x2_inc_spellhook"

void main()
{

/*
  Spellcast Hook Code
  Added 2003-06-23 by GeorgZ
  If you want to make changes to all spells,
  check x2_inc_spellhook.nss to find out more
 
*/

    if (!X2PreSpellCastCode())
    {
   // If code within the PreSpellCastHook (i.e. UMD) reports FALSE, do not run this spell
        return;
    }

// End of Spell Cast Hook


    //Declare major variables
    object oTarget = GetSpellTargetObject();
    int nRegenAmt = /*6; /**/(GetMaxHitPoints(oTarget) / 100 * 2) + 3;
    if ( nRegenAmt < 1 )
    {
        nRegenAmt = 1;
    }/**/
    effect eRegen = EffectRegenerate(nRegenAmt, 6.0);
    effect eVis = EffectVisualEffect(VFX_IMP_HEALING_G);
    effect eDur = EffectVisualEffect(VFX_DUR_REGENERATE);
    effect eLink = EffectLinkEffects(eRegen, eDur);


    float fDuration = /*RoundsToSeconds(10); //*/RoundsToSeconds(GetCasterLevel(OBJECT_SELF));
    //Meta-Magic Checks
    fDuration = ApplyMetamagicDurationMods(fDuration);
    int nDurType = ApplyMetamagicDurationTypeMods(DURATION_TYPE_TEMPORARY);

    SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, GetSpellId(), FALSE));
    //Apply effects and VFX
    ApplyEffectToObject(nDurType, eLink, oTarget, fDuration);
    ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget);
}
Revenir en haut Aller en bas
 
Sort Modifié : Régénération
Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» Sondage sur le sort de régénération
» Bug de sort
» Bug : sort héroïsme épique.

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
Aelor :: Archives :: Editeur :: Script-
Sauter vers: