游戏王残局简化版

Annotation For expansions/script/c896311393.lua
Login

Annotation For expansions/script/c896311393.lua

Lines of expansions/script/c896311393.lua from check-in 065386963f that are changed by the sequence of edits moving toward check-in d44c9db3f6:

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