游戏王残局简化版

Annotation For single_doc/副_容冗/一点点点基础.md
Login

Annotation For single_doc/副_容冗/一点点点基础.md

Origin for each line in single_doc/副_容冗/一点点点基础.md from check-in 60c256f91b:

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