Commit d31e2f43 authored by POLYMER's avatar POLYMER

fix

parent 08a50bb2
......@@ -19,6 +19,18 @@ function cm.initial_effect(c)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_SPSUMMON_PROC_G)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_HAND+LOCATION_SZONE)
e3:SetOperation(cm.debug)
c:RegisterEffect(e3)
end
function cm.debug(e,tp,eg,ep,ev,re,r,rp,c,sg,og)
local g=Duel.GetMatchingGroup(function(c) return c:GetTurnID()==Duel.GetTurnCount() and c:IsPreviousLocation(LOCATION_DECK) end,tp,LOCATION_GRAVE,0,nil)
Debug.Message("这个回合从卡组送去自己墓地的卡:"..#g.."张")
for tc in aux.Next(g) do tc:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(m,3)) end
end
function cm.tdfilter(c,tid)
return c:GetTurnID()==tid and not c:IsReason(REASON_RETURN) and c:GetPreviousLocation()==LOCATION_DECK and c:IsAbleToDeck()
......
......@@ -73,6 +73,7 @@ function cm.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,tc)
if tc:IsType(TYPE_MONSTER) and tc:IsSetCard(0x3f44) then
Duel.Damage(1-tp,800,REASON_EFFECT)
local ph=Duel.GetCurrentPhase()
if ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE and tc:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(m,2)) then
Duel.BreakEffect()
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
......
......@@ -82,7 +82,7 @@ function cm.spcon(e,tp,eg,ep,ev,re,r,rp)
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return eg:IsContains(chkc) and cm.spcfilter(chkc,tp,rp,e) end
if chk==0 then return not Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and eg:IsExists(cm.spcfilter,1,nil,tp,rp,e) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=eg:FilterSelect(tp,cm.spcfilter,1,1,nil,tp,rp,e)
......
......@@ -1109,18 +1109,17 @@ function s.Checkmate_geop(e,tp,eg,ep,ev,re,r,rp)
return f1(sc,se,bool)
end
end
local sg=Group.__add(Duel.GetFieldGroup(0,0xff,0xff),Duel.GetOverlayGroup(0,1,1)):Filter(function(c)return c:GetOriginalCode()==94585852 end,nil)
if #sg==0 then return end
for tc in aux.Next(sg) do
local le={tc:GetCardRegistered(nil)}
for _,v in pairs(le) do
if v:GetCode()==EVENT_CUSTOM+94585852 then
tc:SetStatus(STATUS_INITIALIZING,true)
v:SetCode(EVENT_CUSTOM+53798004)
tc:SetStatus(STATUS_INITIALIZING,false)
local sg=Group.__add(Duel.GetFieldGroup(0,0xff,0xff),Duel.GetOverlayGroup(0,1,1)):Filter(function(c)return c:GetOriginalCode()==94585852 end,nil)
for tc in aux.Next(sg) do
local le={tc:GetCardRegistered(nil)}
for _,v in pairs(le) do
if v:GetCode()==EVENT_CUSTOM+94585852 then
tc:SetStatus(STATUS_INITIALIZING,true)
v:SetCode(EVENT_CUSTOM+53798004)
tc:SetStatus(STATUS_INITIALIZING,false)
end
end
end
end
end
function s.Checkmate_regop(e,tp,eg,ep,ev,re,r,rp)
local lv1=0
......@@ -1163,13 +1162,19 @@ function s.Checkmate_chtg(_tg)
Duel.SetTargetCard=f
local g=Duel.GetFieldGroup(tp,0,LOCATION_MZONE)
local sg=g:Filter(Card.IsCanBeEffectTarget,nil,e)
if not e:IsHasProperty(EFFECT_FLAG_CARD_TARGET) and Duel.IsPlayerAffectedByEffect(1-tp,53798004) and #g>0 and #g==#sg then
local ev0=Duel.GetCurrentChain()
local chainc=false
if ev0>1 then
for i=ev0-1,1,-1 do
if Duel.GetChainInfo(i,CHAININFO_TRIGGERING_EFFECT)==e then chainc=true break end
end
end
if (not e:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or chainc) and Duel.IsPlayerAffectedByEffect(1-tp,53798004) and #g>0 and #g==#sg then
local pro1,pro2=e:GetProperty()
e:SetProperty(pro1|EFFECT_FLAG_CARD_TARGET,pro2)
Duel.ClearTargetCard()
Duel.SetTargetCard(g)
if #tg>0 then
local ev0=Duel.GetCurrentChain()
tg:KeepAlive()
tg:ForEach(Card.RegisterFlagEffect,53798004,RESET_EVENT+RESETS_STANDARD+RESET_CHAIN,0,1)
local e1=Effect.CreateEffect(e:GetHandler())
......
......@@ -98,7 +98,7 @@ function s.tkop(e,tp,eg,ep,ev,re,r,rp)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP,zone) then sp=true else break end
end
Duel.SpecialSummonComplete()
local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,LOCATION_SZONE,nil)
local dg=Duel.GetMatchingGroup(s.filter,tp,LOCATION_SZONE,0,nil)
if #dg>0 and sp then
Duel.BreakEffect()
Duel.Destroy(dg,REASON_EFFECT)
......
......@@ -34,7 +34,7 @@ end
function cm.con1(chk)
return function(e,tp,eg,ep,ev,re,r,rp)
local g = Duel.GetFieldGroup(tp, LOCATION_MZONE, 0)
local b = #g <= #Duel.GetFieldGroup(tp, 0, LOCATION_MZONE)
local b = #g > #Duel.GetFieldGroup(tp, 0, LOCATION_MZONE)
if chk then b = not b end
return b and (#g == 0 or g:IsExists(Card.IsRace, 1, nil, RACE_WINDBEAST))
end
......@@ -64,7 +64,7 @@ end
-- e3
function cm.tg3(e,oc)
if (oc:IsType(TYPE_MONSTER) and (not oc:IsType(TYPE_EFFECT) or oc:GetOriginalType() & TYPE_EFFECT == 0))
or oc:IsLocation(LOCATION_FZONE) or oc:IsSetCard(0xc754,0x3755) and oc:IsFaceup() then return false end
or oc:IsLocation(LOCATION_FZONE) or oc:IsSetCard(0xc754) and oc:IsFaceup() then return false end
local cseq = e:GetHandler():GetSequence()
local seq = oc:GetSequence()
local isp = oc:IsControler(e:GetHandlerPlayer())
......
......@@ -49,13 +49,13 @@ function cm.con2(e,tp,eg,ep,ev,re,r,rp)
return eg:IsContains(e:GetHandler())
end
function cm.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
local g = Duel.GetMatchingGroup(Card.IsFaceup, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, nil)
local g = Duel.GetMatchingGroup(Card.IsFaceup, tp, LOCATION_ONFIELD, 0, nil)
if chk==0 then return #g > 0 end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,tp,LOCATION_ONFIELD)
end
function cm.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g = Duel.SelectMatchingCard(tp, Card.IsFaceup, tp, LOCATION_ONFIELD, LOCATION_ONFIELD, 1, 1, nil)
local g = Duel.SelectMatchingCard(tp, Card.IsFaceup, tp, LOCATION_ONFIELD, 0, 1, 1, nil)
if #g == 0 then return end
Duel.HintSelection(g)
Duel.SendtoHand(g, nil, REASON_EFFECT)
......
......@@ -61,6 +61,10 @@ function c75081023.ovop(e,tp,eg,ep,ev,re,r,rp)
if tc:IsRelateToEffect(e) and not tc:IsImmuneToEffect(e) and g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_XMATERIAL)
local sg=g:Select(tp,1,1,nil)
local og=sg:GetOverlayGroup()
if og:GetCount()>0 then
Duel.SendtoGrave(og,REASON_RULE)
end
Duel.Overlay(tc,sg)
end
if e:GetLabel()==100 then
......
......@@ -111,7 +111,7 @@ function s.filter(c,e,tp,tc)
return c:IsSetCard(0xc34) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and Duel.IsExistingTarget(s.filter2,tp,LOCATION_GRAVE,0,1,Group.FromCards(tc,c),c)
end
function s.filter2(c,tc)
return not c:IsCode(tc:GetCode()) and c:IsSetCard(0xc34) and c:IsAbleToHand()
return not c:IsCode(tc:GetCode()) and c:IsSetCard(0xc34) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function s.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local c=e:GetHandler()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment