找回密码
 注册
查看: 2850|回复: 8

[讨论] 我大型飞弹风暴居然打出了20颗飞弹

[复制链接]
发表于 2007-10-17 23:41:14 | 显示全部楼层 |阅读模式
大型艾萨克飞弹风暴(Isaac's Greater Missile Storm)

施法者等级:法师/术士6
固有等级:6
派别:塑能系
描述:
组件:言语,姿势
范围:长距离
效果区域/目标:巨型范围
持续时间:立即
豁免:无
法术抵抗:不可

一批能量飞弹(1颗/级,最大10颗)出现并随机攻击法术所影响的区域内的敌对生物。每颗飞弹造成2d6点魔法伤害。

但我大型飞弹风暴居然打出了20颗飞弹,我的版本是1.10,在英雄梦里测试的。wiki上是这么写的:

A number of energy missiles (one per caster level up to a maximum of 20) appear and randomly target and hit any creature in the area of effect, evenly distributed to the targets. Each missile does 2d6 points of magic damage. A maximum of 10 missiles can hit any one target.

上面这段是说每级一颗,20级总共有20颗。但每个目标最多10颗,我测试的情况也的确如此。


[edit]
Bug Notes
(Checked: 1.03). There is a maximum of 20 missiles, not 10 as stated in the in-game description.

This spell will destroy Spell Mantle spells apart, due to these buggy lines, line 740 onwards in x0_i0_spells:

        //--------------------------------------------------------------
        // GZ: Moved SR check out of loop to have 1 check per target
        //     not one check per missile, which would rip spell mantels
        //     apart
        //--------------------------------------------------------------
        for (i=1; i <= nMissilesForThisTarget; i++)
        {
                // Don't apply damage if target successfully resists
                if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))
                {
Notably, the comment is wrong, and the resist check is inside the loop, meaning this is broken when fighting against a target with a supposed Spell Mantle - which will go down after one missile storm when cast against it, since a resist check is made for every missile.

上面这段是说Isaac's Greater Missile Storm并不是无视sr的

ps:谁知道哪有30级的测试模组?为什么英雄梦的只能到20。
发表于 2007-10-18 08:24:36 | 显示全部楼层
DebugMode 1
GiveXP 999999999
发表于 2007-10-18 18:15:10 | 显示全部楼层
这个魔法实在BT~~~~~~

毕竟是游戏创作者原创的东西~实在有点破坏平衡呀~~~~~
发表于 2007-10-19 20:22:50 | 显示全部楼层
这个魔法不仅效果BT,视觉效果也很变态啊
发表于 2007-10-26 21:18:42 | 显示全部楼层

高级飞弹风暴的完整脚本

//::///////////////////////////////////////////////
//:: Isaacs Greater Missile Storm
//:: x0_s0_MissStorm2
//:: Copyright (c) 2002 Bioware Corp.
//:://////////////////////////////////////////////
/*
Up to 20 missiles, each doing 3d6 damage to each
target in area.
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: July 31, 2002
//:://////////////////////////////////////////////
//:: Last Updated By:
// ChazM 10/19/06 - modified params to DoMissileStorm()

#include "X0_I0_SPELLS"
#include "x2_inc_spellhook"

void main()
{

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

    DoMissileStorm(2, 20, SPELL_ISAACS_GREATER_MISSILE_STORM, VFX_IMP_MAGBLUE, DAMAGE_TYPE_MAGICAL, -1, 10);   //这行中的20就是飞弹数量上限。
}



以下是上面法术脚本引用的"DoMissileStorm"函数内容

//::///////////////////////////////////////////////
//:: DoMissileStorm
//:: Copyright (c) 2002 Bioware Corp.
//:://////////////////////////////////////////////
/*
    Fires a volley of missiles around the area
    of the object selected.

    Each missiles (nD6Dice)d6 damage.
    There are casterlevel missiles (to a cap as specified)
*/
//:://////////////////////////////////////////////
//:: Created By: Brent
//:: Created On: July 31, 2002
//:://////////////////////////////////////////////
//:: Modified March 14 2003: Removed the option to hurt chests/doors
//::  was potentially causing bugs when no creature targets available.
//::
//:: Brock Heinz - OEI - 08/15/05 - Limit hits per target
//::    This function now limits the number of hits done to any
//::    creature to no more than nMaxHits each
//::
//:: AFW-OEI 06/06/2006:
//::        Changed to target only enemies.

// int nD6Dice         - Dice of damage (d6) each missile does
// int nCap                - The max number of missiles that can be fired
// int nSpell        - Spell id
// int nVIS         - Visual impact effect to use
// int nDamageType - type of damage
// int iReflexSaveType - A SAVING_THROW_TYPE_* constant, or -1 if no reflex save allowed.
// int nMaxHits - Maximum number of hits any one target.
void DoMissileStorm(int nD6Dice, int nCap, int nSpell, int nVIS = VFX_IMP_MAGBLUE, int nDamageType = DAMAGE_TYPE_MAGICAL, int iReflexSaveType = -1, int nMaxHits = 10 )
{
        //SpawnScriptDebugger();
       
        location lTargetLoc        = GetSpellTargetLocation(); // missile spread centered around target location
        location lSourceLoc = GetLocation( OBJECT_SELF );
       
        int nSpellID                 = GetSpellId();
    int nMetaMagic                 = GetMetaMagicFeat();
    effect eVis                 = EffectVisualEffect(nVIS);
       
    float fDelay                 = 0.0;
    int nMissiles                 = GetCappedCasterLevel(nCap);
        int nPathType                 = PROJECTILE_PATH_TYPE_BURST;
        int nEnemies                 = CountEnemies(lTargetLoc, RADIUS_SIZE_GARGANTUAN, nMissiles); // how many enemies (up to max number of missiles)

     // * Exit if no enemies to hit
     if (nEnemies == 0)
        return;

     // divide the missles evenly amongst the enemies;
    int nMissilesPerTarget        = nMissiles / nEnemies;
        int nExtraMissiles           = nMissiles % nEnemies;
       
        int nMissilesForThisTarget         = 0;
        location lThisTargetLoc;
    int nCnt                                 = 1; // # of enemies processed
       
    //Cycle through the targets within the spell shape until an invalid object is captured.
    object oTarget                         = GetFirstObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTargetLoc, TRUE, OBJECT_TYPE_CREATURE);
    while (GetIsObjectValid(oTarget) && nCnt <= nEnemies)
    {
        // * caster cannot be harmed by this spell
        if (spellsIsTarget(oTarget, SPELL_TARGET_SELECTIVEHOSTILE, OBJECT_SELF) && (oTarget != OBJECT_SELF) && (GetObjectSeen(oTarget,OBJECT_SELF)))
        {
                        lThisTargetLoc = GetLocation( oTarget );
                        fDelay = GetProjectileTravelTime( lSourceLoc, lThisTargetLoc, nPathType );
                       
                        //Fire cast spell at event for the specified target
                        SignalEvent(oTarget, EventSpellCastAt(OBJECT_SELF, nSpell));
                       
                        // * determine the number of missles to fire at this target
                    nMissilesForThisTarget = nMissilesPerTarget;
                        if (nCnt <= nExtraMissiles)
                                nMissilesForThisTarget++;
                               
                        // ensure we observe cap
                        nMissilesForThisTarget = GetIntInRange(nMissilesForThisTarget, 0, nMaxHits);
                       
                        ShootMissilesAtTarget(oTarget, lSourceLoc, lThisTargetLoc, nSpell, nPathType,
                                                        nMissilesForThisTarget, eVis, fDelay, nCnt,
                                                        nD6Dice, nDamageType, nMetaMagic, iReflexSaveType);
                       
                        nCnt++;// * increment count of enemies processed
        }
        oTarget = GetNextObjectInShape(SHAPE_SPHERE, RADIUS_SIZE_GARGANTUAN, lTargetLoc, TRUE, OBJECT_TYPE_CREATURE);
    }
}


上面脚本中出现的ShootMissilesAtTarget函数,里面决定了,飞弹需要过魔抗检定。
void ShootMissilesAtTarget(object oTarget, location lSourceLoc, location lTargetLoc, int nSpell, int nPathType,
                                                        int nMissilesForThisTarget, effect eVis, float fDelay, int nCnt,
                                                        int nD6Dice, int nDamageType, int nMetaMagic, int iReflexSaveType)
{
        float fTime         = fDelay + ((nCnt - 1) * 0.25);
        float fTime2         = ((nCnt - 1) * 0.25);       

        effect eDam;
       
        int nDam;
        int i;
       
        //--------------------------------------------------------------
        // GZ: Moved SR check out of loop to have 1 check per target
        //     not one check per missile, which would rip spell mantels
        //     apart
        //--------------------------------------------------------------
        for (i=1; i <= nMissilesForThisTarget; i++)
        {
                // Don't apply damage if target successfully resists
                if (!MyResistSpell(OBJECT_SELF, oTarget, fDelay))   
                {
                        //Roll damage
                        nDam = RollMissileDamage(oTarget, nD6Dice, nMetaMagic, iReflexSaveType);
                       
                        //Set damage effect
                        eDam = EffectDamage(nDam, nDamageType);
                        eDam = EffectLinkEffects( eDam, eVis );
                        DelayCommand(fTime, ApplyEffectToObject(DURATION_TYPE_INSTANT, eDam, oTarget));
                }
                // always show the attempted effect visually
                DelayCommand( fTime2, SpawnSpellProjectile(OBJECT_SELF, oTarget, lSourceLoc, lTargetLoc, nSpell, nPathType) );
        }
}
发表于 2007-10-27 01:21:58 | 显示全部楼层

回复 #3 浪燕陵 的帖子

这个法术是原创的?原本还认为Isacc是某与牛顿同名的法师呢。
 楼主| 发表于 2007-10-27 09:36:04 | 显示全部楼层
Up to 20 missiles, each doing 3d6 damage to each
target in area.
我不太懂脚本,只能按英文的大概意思看。怎么里面写的每颗 3d6?
void DoMissileStorm(int nD6Dice, int nCap, int nSpell, int nVIS = VFX_IMP_MAGBLUE, int nDamageType = DAMAGE_TYPE_MAGICAL, int iReflexSaveType = -1, int nMaxHits = 10 )
这句应该是每个目标最多10颗吧。
ps:怎么才能察看脚本or用什么工具?
发表于 2007-10-28 13:20:44 | 显示全部楼层
是2d6,
DoMissileStorm(2, 20, SPELL_ISAACS_GREATER_MISSILE_STORM, VFX_IMP_MAGBLUE, DAMAGE_TYPE_MAGICAL, -1, 10); //括号里的“2”决定2d6。
黑曜石的人员连个脚本注释都能写错[s:3] [s:3][s:3]

(更不要提druid的Storm Avatar里加闪电伤害应为3d6,实际上为2d6....原因是2代的iprp_damagecost.2da里没有3d6。)

无冬2的脚本在Neverwinter Nights 2\Data下的Scripts,Scripts_X1两个zip文件中,其中的nss文件是源文件,可以用记事本强开。
发表于 2007-10-28 14:44:49 | 显示全部楼层
Storm Avatar在人物界面显示的是3d6,实际上的效果只有2d6?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|奥德赛公会

GMT+8, 2026-6-17 00:26 , Processed in 0.010619 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表