Commit 38d8d738 authored by Nemo Ma's avatar Nemo Ma

fix

parent d0d4dd8f
......@@ -259,6 +259,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
table.insert(codes,code)
end
table.sort(codes)
if aux.GetValueType(codes[1])=="number" then
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
for i=2,#codes do
......@@ -277,6 +278,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(g1,tp,2,REASON_EFFECT)
end
end
end
if ct2>0 then
local tab2={}
for i=1,ct2 do
......@@ -332,6 +334,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
table.insert(codes,code)
end
table.sort(codes)
if aux.GetValueType(codes[1])=="number" then
local afilter={codes[1],OPCODE_ISCODE}
if #codes>1 then
for i=2,#codes do
......@@ -350,6 +353,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoDeck(g2,1-tp,2,REASON_EFFECT)
end
end
end
GetID=_TGetID
g1=g1:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
g2=g2:Filter(Card.IsLocation,nil,LOCATION_DECK+LOCATION_EXTRA)
......
......@@ -68,14 +68,17 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end
function cm.rmfilter(c)
return c:IsDefensePos() and c:IsAbleToRemove()
end
function cm.remtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
if chk==0 then return Duel.IsExistingMatchingCard(cm.rmfilter,tp,0,LOCATION_MZONE,1,nil) end
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end
function cm.remop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_MZONE,nil)
local g=Duel.GetMatchingGroup(cm.rmfilter,tp,0,LOCATION_MZONE,nil)
local x=Duel.Remove(g,POS_DEFENSE,REASON_EFFECT)
if e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,57707471) and x>0 then
Duel.BreakEffect()
......
......@@ -16,6 +16,7 @@ function cm.initial_effect(c)
e2:SetDescription(aux.Stringid(22348122,1))
e2:SetCategory(CATEGORY_TODECK)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_REMOVE)
e2:SetTarget(c22348122.target2)
e2:SetOperation(c22348122.operation2)
......
......@@ -72,7 +72,7 @@ end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
local ct1=e:GetLabel()-Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
local ct2=e:GetLabel()-Duel.GetFieldGroupCount(tp,0,LOCATION_HAND)
if chk==0 then return ct1>0 and Duel.IsPlayerCanDraw(tp,ct1) and ct2>0 and Duel.IsPlayerCanDraw(1-tp,ct2) end
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,ct2)
end
......
......@@ -25,9 +25,9 @@ function c98920059.initial_effect(c)
e0:SetCondition(c98920059.indcon)
e0:SetValue(1)
c:RegisterEffect(e0)
local e2=e0:Clone()
e2:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e2)
local e5=e0:Clone()
e5:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
c:RegisterEffect(e5)
--cannot be target
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
......@@ -45,9 +45,21 @@ function c98920059.initial_effect(c)
e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCountLimit(1,98920059)
e2:SetCondition(c98920059.tdcon1)
e2:SetTarget(c98920059.sptg)
e2:SetOperation(c98920059.spop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetCondition(c98920059.tdcon2)
c:RegisterEffect(e3)
end
function c98920059.tdcon1(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c98920059.tdcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsPlayerAffectedByEffect(tp,90351981)
end
function c98920059.lcheck(g,lc)
return g:GetClassCount(Card.GetLinkCode)==g:GetCount()
......
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