游戏王残局简化版

Annotation For 残局文料/副_容冗/一点点点基础.md
Login

Annotation For 残局文料/副_容冗/一点点点基础.md

Origin for each line in 残局文料/副_容冗/一点点点基础.md from check-in ea42404f54:

ea42404f54 2024-02-14    1: # 一点点点基础
ea42404f54 2024-02-14    2: 
ea42404f54 2024-02-14    3: ## 添加卡片
ea42404f54 2024-02-14    4: 
ea42404f54 2024-02-14    5: 青眼白龙的卡密是 89631139 ,但查不到 c89631139.lua 。
ea42404f54 2024-02-14    6: 
ea42404f54 2024-02-14    7: 估计<b>只需要</b>更改 cards.cdb ,就可以添加卡片了。
ea42404f54 2024-02-14    8: 
ea42404f54 2024-02-14    9: ***
ea42404f54 2024-02-14   10: 
ea42404f54 2024-02-14   11: c89631139 的 c 是指 card ,就是「卡片」。
ea42404f54 2024-02-14   12: 
ea42404f54 2024-02-14   13: ## 注册效果
ea42404f54 2024-02-14   14: 
ea42404f54 2024-02-14   15: 火球的效果足够简单,就以火球为例。
ea42404f54 2024-02-14   16: 
ea42404f54 2024-02-14   17: 火球里有很多函数,但并没有启用这些函数的语句,这表明它们自己单独是不能运行的,而是<b>被</b>其他的东西给调用。
ea42404f54 2024-02-14   18: 
ea42404f54 2024-02-14   19: 在 c46130346.lua ,有以下效果:
ea42404f54 2024-02-14   20: 
ea42404f54 2024-02-14   21: ~~~
ea42404f54 2024-02-14   22: function c46130346.initial_effect(c)
ea42404f54 2024-02-14   23: end
ea42404f54 2024-02-14   24: ~~~
ea42404f54 2024-02-14   25: 
ea42404f54 2024-02-14   26: 它被 interpreter.cpp 所调用:
ea42404f54 2024-02-14   27: 
ea42404f54 2024-02-14   28: ~~~
ea42404f54 2024-02-14   29: call_card_function(pcard, "initial_effect", 1, 0);
ea42404f54 2024-02-14   30: ~~~
ea42404f54 2024-02-14   31: 
ea42404f54 2024-02-14   32: ***
ea42404f54 2024-02-14   33: 
ea42404f54 2024-02-14   34: c46130346.initial_effect 不利于复制粘贴。
ea42404f54 2024-02-14   35: 
ea42404f54 2024-02-14   36: 在 utility.lua 有:
ea42404f54 2024-02-14   37: 
ea42404f54 2024-02-14   38: ~~~
ea42404f54 2024-02-14   39: function GetID()
ea42404f54 2024-02-14   40: end
ea42404f54 2024-02-14   41: ~~~
ea42404f54 2024-02-14   42: 
ea42404f54 2024-02-14   43: 所以可以这样注册效果:
ea42404f54 2024-02-14   44: 
ea42404f54 2024-02-14   45: ~~~
ea42404f54 2024-02-14   46: local s,id,o=GetID()
ea42404f54 2024-02-14   47: function s.initial_effect(c)
ea42404f54 2024-02-14   48: end
ea42404f54 2024-02-14   49: ~~~
ea42404f54 2024-02-14   50: 
ea42404f54 2024-02-14   51: ## 效果描述
ea42404f54 2024-02-14   52: 
ea42404f54 2024-02-14   53: 诸如 SetProperty ,其参数可以在 <b>constant.lua</b> 查。
ea42404f54 2024-02-14   54: 
ea42404f54 2024-02-14   55: ***
ea42404f54 2024-02-14   56: 
ea42404f54 2024-02-14   57: 简单的描述就写简单一点,复杂的描述就写复杂一点。
ea42404f54 2024-02-14   58: 
ea42404f54 2024-02-14   59: ## 效果参数
ea42404f54 2024-02-14   60: 
ea42404f54 2024-02-14   61: 在 processor.cpp 可以看到,有时给函数传参数的时候传的是匿名参数,所以很多时候,这些参数其实是<b>空</b>的。
ea42404f54 2024-02-14   62: 
ea42404f54 2024-02-14   63: ~~~
ea42404f54 2024-02-14   64: e effect
ea42404f54 2024-02-14   65: tp this player
ea42404f54 2024-02-14   66: eg event group
ea42404f54 2024-02-14   67: ep event player
ea42404f54 2024-02-14   68: ev event value
ea42404f54 2024-02-14   69: re reason effect
ea42404f54 2024-02-14   70: r reason
ea42404f54 2024-02-14   71: rp reason player
ea42404f54 2024-02-14   72: chk check
ea42404f54 2024-02-14   73: chkc check card
ea42404f54 2024-02-14   74: ~~~
ea42404f54 2024-02-14   75: 
ea42404f54 2024-02-14   76: ***
ea42404f54 2024-02-14   77: 
ea42404f54 2024-02-14   78: 0 指先攻玩家, 1 指后攻玩家,这是绝对的。
ea42404f54 2024-02-14   79: 
ea42404f54 2024-02-14   80: tp 指我方玩家, 1 - tp 指对方玩家,这是相对的。
ea42404f54 2024-02-14   81: 
ea42404f54 2024-02-14   82: ***
ea42404f54 2024-02-14   83: 
ea42404f54 2024-02-14   84: 这套效果参数,可以看作是一个规范,目的是为了便于看懂与复制代码。
ea42404f54 2024-02-14   85: 
ea42404f54 2024-02-14   86: ## 效果检查
ea42404f54 2024-02-14   87: 
ea42404f54 2024-02-14   88: ~~~
ea42404f54 2024-02-14   89: function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
ea42404f54 2024-02-14   90:   if chk==0 then return 233333333 end
ea42404f54 2024-02-14   91:   233333333
ea42404f54 2024-02-14   92: end
ea42404f54 2024-02-14   93: ~~~
ea42404f54 2024-02-14   94: 
ea42404f54 2024-02-14   95: 这个函数,我觉得应该看作<b>两个</b>函数。
ea42404f54 2024-02-14   96: 
ea42404f54 2024-02-14   97: 它在 chk 的值不同时,执行不同的分支。
ea42404f54 2024-02-14   98: 
ea42404f54 2024-02-14   99: 而 chk 取决于效果执行的阶段:检查阶段与执行阶段。
ea42404f54 2024-02-14  100: 
ea42404f54 2024-02-14  101: ## 火球
ea42404f54 2024-02-14  102: 
ea42404f54 2024-02-14  103: ~~~
ea42404f54 2024-02-14  104: function c46130346.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
ea42404f54 2024-02-14  105: 	if chk==0 then return true end
ea42404f54 2024-02-14  106: 	Duel.SetTargetPlayer(1-tp)
ea42404f54 2024-02-14  107: 	Duel.SetTargetParam(500)
ea42404f54 2024-02-14  108: 	Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
ea42404f54 2024-02-14  109: end
ea42404f54 2024-02-14  110: ~~~
ea42404f54 2024-02-14  111: 
ea42404f54 2024-02-14  112: ***
ea42404f54 2024-02-14  113: 
ea42404f54 2024-02-14  114: 把:
ea42404f54 2024-02-14  115: 
ea42404f54 2024-02-14  116: ~~~
ea42404f54 2024-02-14  117: if chk==0 then return true end
ea42404f54 2024-02-14  118: ~~~
ea42404f54 2024-02-14  119: 
ea42404f54 2024-02-14  120: 改成:
ea42404f54 2024-02-14  121: 
ea42404f54 2024-02-14  122: ~~~
ea42404f54 2024-02-14  123: if chk==0 then return false end
ea42404f54 2024-02-14  124: ~~~
ea42404f54 2024-02-14  125: 
ea42404f54 2024-02-14  126: 则无法发动火球。
ea42404f54 2024-02-14  127: 
ea42404f54 2024-02-14  128: ***
ea42404f54 2024-02-14  129: 
ea42404f54 2024-02-14  130: 去掉:
ea42404f54 2024-02-14  131: 
ea42404f54 2024-02-14  132: ~~~
ea42404f54 2024-02-14  133: Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
ea42404f54 2024-02-14  134: ~~~
ea42404f54 2024-02-14  135: 
ea42404f54 2024-02-14  136: 则无法<b>对应火球</b>而发动痛魂之咒术。
ea42404f54 2024-02-14  137: 
ea42404f54 2024-02-14  138: ***
ea42404f54 2024-02-14  139: 
ea42404f54 2024-02-14  140: 去掉
ea42404f54 2024-02-14  141: 
ea42404f54 2024-02-14  142: ~~~
ea42404f54 2024-02-14  143: e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
ea42404f54 2024-02-14  144: ~~~
ea42404f54 2024-02-14  145: 
ea42404f54 2024-02-14  146: 则无法对应火球而发动精灵之镜。
ea42404f54 2024-02-14  147: 
ea42404f54 2024-02-14  148: ## 叛逆之罪宝-蛇眼
ea42404f54 2024-02-14  149: 
ea42404f54 2024-02-14  150: 去掉:
ea42404f54 2024-02-14  151: 
ea42404f54 2024-02-14  152: ~~~
ea42404f54 2024-02-14  153: e1:SetCountLimit(1,id+EFFECT_COUNT_CODE_OATH)
ea42404f54 2024-02-14  154: ~~~
ea42404f54 2024-02-14  155: 
ea42404f54 2024-02-14  156: 则可以发动多次。
ea42404f54 2024-02-14  157: 
ea42404f54 2024-02-14  158: ***
ea42404f54 2024-02-14  159: 
ea42404f54 2024-02-14  160: 去掉:
ea42404f54 2024-02-14  161: 
ea42404f54 2024-02-14  162: ~~~
ea42404f54 2024-02-14  163: e1:SetDescription(aux.Stringid(id,0))
ea42404f54 2024-02-14  164: ~~~
ea42404f54 2024-02-14  165: 
ea42404f54 2024-02-14  166: 则没有变化。
ea42404f54 2024-02-14  167: 
ea42404f54 2024-02-14  168: ***
ea42404f54 2024-02-14  169: 
ea42404f54 2024-02-14  170: 去掉:
ea42404f54 2024-02-14  171: 
ea42404f54 2024-02-14  172: ~~~
ea42404f54 2024-02-14  173: Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
ea42404f54 2024-02-14  174: ~~~
ea42404f54 2024-02-14  175: 
ea42404f54 2024-02-14  176: 则提示文本发生改变。
ea42404f54 2024-02-14  177: 
ea42404f54 2024-02-14  178: 这些提示文本可以在 constant.lua 中<b>找到</b>。
ea42404f54 2024-02-14  179: 
ea42404f54 2024-02-14  180: ***
ea42404f54 2024-02-14  181: 
ea42404f54 2024-02-14  182: 去掉:
ea42404f54 2024-02-14  183: 
ea42404f54 2024-02-14  184: ~~~
ea42404f54 2024-02-14  185: e1:SetValue(TYPE_SPELL+TYPE_CONTINUOUS)
ea42404f54 2024-02-14  186: ~~~
ea42404f54 2024-02-14  187: 
ea42404f54 2024-02-14  188: 则旋风无法破坏那些怪兽。
ea42404f54 2024-02-14  189: 
ea42404f54 2024-02-14  190: ***
ea42404f54 2024-02-14  191: 
ea42404f54 2024-02-14  192: 去掉:
ea42404f54 2024-02-14  193: 
ea42404f54 2024-02-14  194: ~~~
ea42404f54 2024-02-14  195: e1:SetReset(RESET_EVENT+RESETS_STANDARD-RESET_TURN_SET)
ea42404f54 2024-02-14  196: ~~~
ea42404f54 2024-02-14  197: 
ea42404f54 2024-02-14  198: 则那些怪兽离开场上后仍然被当作永续魔法卡。
ea42404f54 2024-02-14  199: 
ea42404f54 2024-02-14  200: ## 废铁死亡恶魔
ea42404f54 2024-02-14  201: 
ea42404f54 2024-02-14  202: 去掉:
ea42404f54 2024-02-14  203: 
ea42404f54 2024-02-14  204: ~~~
ea42404f54 2024-02-14  205: c:EnableReviveLimit()
ea42404f54 2024-02-14  206: ~~~
ea42404f54 2024-02-14  207: 
ea42404f54 2024-02-14  208: 则<b>没有</b>苏生限制。
ea42404f54 2024-02-14  209: 
ea42404f54 2024-02-14  210: ## 虫饵
ea42404f54 2024-02-14  211: 
ea42404f54 2024-02-14  212: 去掉:
ea42404f54 2024-02-14  213: 
ea42404f54 2024-02-14  214: ~~~
ea42404f54 2024-02-14  215: e2:SetCode(EFFECT_CANNOT_SUMMON)
ea42404f54 2024-02-14  216: ~~~
ea42404f54 2024-02-14  217: 
ea42404f54 2024-02-14  218: 则<b>不会</b>封锁召唤。
ea42404f54 2024-02-14  219: 
ea42404f54 2024-02-14  220: ## 天底的使徒
ea42404f54 2024-02-14  221: 
ea42404f54 2024-02-14  222: 去掉:
ea42404f54 2024-02-14  223: 
ea42404f54 2024-02-14  224: ~~~
ea42404f54 2024-02-14  225: e1:SetCode(EFFECT_CANNOT_SPECIAL_SUMMON)
ea42404f54 2024-02-14  226: ~~~
ea42404f54 2024-02-14  227: 
ea42404f54 2024-02-14  228: 则我方<b>仍然</b>可从额外卡组特殊召唤怪兽。
ea42404f54 2024-02-14  229: 
ea42404f54 2024-02-14  230: ***
ea42404f54 2024-02-14  231: 
ea42404f54 2024-02-14  232: 去掉:
ea42404f54 2024-02-14  233: 
ea42404f54 2024-02-14  234: ~~~
ea42404f54 2024-02-14  235: e1:SetReset(RESET_PHASE+PHASE_END)
ea42404f54 2024-02-14  236: ~~~
ea42404f54 2024-02-14  237: 
ea42404f54 2024-02-14  238: 则我方一直被限制特召。
ea42404f54 2024-02-14  239: 
ea42404f54 2024-02-14  240: ## 异界共鸣-同调融合
ea42404f54 2024-02-14  241: 
ea42404f54 2024-02-14  242: 去掉:
ea42404f54 2024-02-14  243: 
ea42404f54 2024-02-14  244: ~~~
ea42404f54 2024-02-14  245: e1:SetTargetRange(1,0)
ea42404f54 2024-02-14  246: ~~~
ea42404f54 2024-02-14  247: 
ea42404f54 2024-02-14  248: 则我方<b>仍可</b>特召。