游戏王残局简化版

Annotation For expansions/script/c896311393.lua
Login

Annotation For expansions/script/c896311393.lua

Origin for each line in expansions/script/c896311393.lua from check-in 7c5800df27:

7c5800df27 2024-07-26    1: --Emヒグルミ
7c5800df27 2024-07-26    2: function c896311393.initial_effect(c)
7c5800df27 2024-07-26    3:   --pendulum summon
7c5800df27 2024-07-26    4:   aux.EnablePendulumAttribute(c)
7c5800df27 2024-07-26    5:   --spsummon
7c5800df27 2024-07-26    6:   local e2=Effect.CreateEffect(c)
7c5800df27 2024-07-26    7:   e2:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DAMAGE)
7c5800df27 2024-07-26    8:   e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
7c5800df27 2024-07-26    9:   e2:SetCode(EVENT_DESTROYED)
7c5800df27 2024-07-26   10:   e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
7c5800df27 2024-07-26   11:   e2:SetRange(LOCATION_PZONE)
7c5800df27 2024-07-26   12:   e2:SetCountLimit(1,7563580)
7c5800df27 2024-07-26   13:   e2:SetCondition(c896311393.spcon1)
7c5800df27 2024-07-26   14:   e2:SetTarget(c896311393.sptg1)
7c5800df27 2024-07-26   15:   e2:SetOperation(c896311393.spop1)
7c5800df27 2024-07-26   16:   c:RegisterEffect(e2)
7c5800df27 2024-07-26   17:   --spsummon
7c5800df27 2024-07-26   18:   local e3=Effect.CreateEffect(c)
7c5800df27 2024-07-26   19:   e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
7c5800df27 2024-07-26   20:   e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
7c5800df27 2024-07-26   21:   e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
7c5800df27 2024-07-26   22:   e3:SetCode(EVENT_DESTROYED)
7c5800df27 2024-07-26   23:   e3:SetCondition(c896311393.spcon2)
7c5800df27 2024-07-26   24:   e3:SetTarget(c896311393.sptg2)
7c5800df27 2024-07-26   25:   e3:SetOperation(c896311393.spop2)
7c5800df27 2024-07-26   26:   c:RegisterEffect(e3)
7c5800df27 2024-07-26   27: end
7c5800df27 2024-07-26   28: function c896311393.cfilter(c,tp)
7c5800df27 2024-07-26   29:   return c:IsReason(REASON_BATTLE+REASON_EFFECT) and c:IsSetCard(0xc6)
7c5800df27 2024-07-26   30:     and c:IsPreviousLocation(LOCATION_MZONE) and c:IsPreviousPosition(POS_FACEUP) and c:IsPreviousControler(tp)
7c5800df27 2024-07-26   31: end
7c5800df27 2024-07-26   32: function c896311393.spcon1(e,tp,eg,ep,ev,re,r,rp)
7c5800df27 2024-07-26   33:   return eg:IsExists(c896311393.cfilter,1,nil,tp)
7c5800df27 2024-07-26   34: end
7c5800df27 2024-07-26   35: function c896311393.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
7c5800df27 2024-07-26   36:   if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
7c5800df27 2024-07-26   37:     and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
7c5800df27 2024-07-26   38:   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
7c5800df27 2024-07-26   39:   Duel.SetOperationInfo(0,CATEGORY_DAMAGE,0,0,tp,500)
7c5800df27 2024-07-26   40: end
7c5800df27 2024-07-26   41: function c896311393.spop1(e,tp,eg,ep,ev,re,r,rp)
7c5800df27 2024-07-26   42:   local c=e:GetHandler()
7c5800df27 2024-07-26   43:   if not c:IsRelateToEffect(e) then return end
7c5800df27 2024-07-26   44:   if Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 then
7c5800df27 2024-07-26   45:     Duel.BreakEffect()
7c5800df27 2024-07-26   46:     Duel.Damage(tp,500,REASON_EFFECT)
7c5800df27 2024-07-26   47:   end
7c5800df27 2024-07-26   48: end
7c5800df27 2024-07-26   49: function c896311393.spcon2(e,tp,eg,ep,ev,re,r,rp)
7c5800df27 2024-07-26   50:   return bit.band(r,REASON_EFFECT+REASON_BATTLE)~=0 and e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
7c5800df27 2024-07-26   51: end
7c5800df27 2024-07-26   52: function c896311393.spfilter(c,e,tp)
7c5800df27 2024-07-26   53:   return c:IsSetCard(0xc6) and not c:IsCode(7563580) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
7c5800df27 2024-07-26   54: end
7c5800df27 2024-07-26   55: function c896311393.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
7c5800df27 2024-07-26   56:   if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
7c5800df27 2024-07-26   57:     and Duel.IsExistingMatchingCard(c896311393.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,nil,e,tp) end
7c5800df27 2024-07-26   58:   Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK)
7c5800df27 2024-07-26   59: end
7c5800df27 2024-07-26   60: function c896311393.spop2(e,tp,eg,ep,ev,re,r,rp)
7c5800df27 2024-07-26   61:   if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
7c5800df27 2024-07-26   62:   Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
7c5800df27 2024-07-26   63:   local g=Duel.SelectMatchingCard(tp,c896311393.spfilter,tp,LOCATION_HAND+LOCATION_DECK,0,1,1,nil,e,tp)
7c5800df27 2024-07-26   64:   if g:GetCount()>0 then
7c5800df27 2024-07-26   65:     Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
7c5800df27 2024-07-26   66:   end
7c5800df27 2024-07-26   67: end