Commit a66458ec authored by POLYMER's avatar POLYMER

fix

parent 45331995
......@@ -42,7 +42,7 @@ end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.limit(e,tp,eg,ep,ev,re,r,rp)
......@@ -101,7 +101,7 @@ function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetDescription(aux.Stringid(11451731,ct))
e1:SetLabel(flag)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(0x20000000+11451731)
e1:SetCode(EFFECT_FLAG_EFFECT+11451731)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_CLIENT_HINT)
e1:SetTargetRange(1,0)
e1:SetReset(RESET_PHASE+PHASE_END)
......
......@@ -38,11 +38,28 @@ function cm.initial_effect(c)
ge1:SetOperation(cm.limit)
Duel.RegisterEffect(ge1,0)
end
if not cm.global_check then
cm.global_check=true
local ge1=Effect.CreateEffect(c)
ge1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
ge1:SetCode(EVENT_DISCARD)
ge1:SetOperation(cm.checkop)
Duel.RegisterEffect(ge1,0)
end
end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
if tc:IsLocation(LOCATION_GRAVE+LOCATION_REMOVED) then
tc:RegisterFlagEffect(m-1,RESET_EVENT+0x1f20000,0,1)
end
tc=eg:GetNext()
end
end
function cm.limit(e,tp,eg,ep,ev,re,r,rp)
......@@ -127,7 +144,7 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
end
end
function cm.mfilter(c)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsReason(REASON_DISCARD) and c:IsType(TYPE_MONSTER)
return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and (c:IsReason(REASON_DISCARD) or c:GetFlagEffect(m-1)>0) and c:IsType(TYPE_MONSTER)
end
function cm.spfilter(c,e,tp,m,f,chkf)
return c:IsType(TYPE_FUSION) and (not f or f(c)) and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and c:CheckFusionMaterial(m,nil,chkf)
......
......@@ -25,7 +25,7 @@ if Card.SetEntityCode then KOISHI_CHECK=true end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.filter(c)
......
......@@ -25,7 +25,7 @@ if Card.SetEntityCode then KOISHI_CHECK=true end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.filter(c)
......
......@@ -25,7 +25,7 @@ if Card.SetEntityCode then KOISHI_CHECK=true end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.filter(c)
......
......@@ -25,7 +25,7 @@ if Card.SetEntityCode then KOISHI_CHECK=true end
function cm.chkop(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if c:IsReason(REASON_DISCARD) then
c:RegisterFlagEffect(0,RESET_EVENT+RESETS_STANDARD,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
c:RegisterFlagEffect(0,RESET_EVENT+0x1f20000,EFFECT_FLAG_CLIENT_HINT,1,0,aux.Stringid(11451742,0))
end
end
function cm.filter(c)
......
......@@ -2,6 +2,7 @@
local s,id,o=GetID()
function s.initial_effect(c)
aux.AddCodeList(c,13020040)
c:EnableReviveLimit()
--SearchCard
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH+CATEGORY_RELEASE)
......
......@@ -41,12 +41,8 @@ end
function s.addop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,id)
local g=Duel.GetFieldGroup(tp,0,LOCATION_HAND)
if g:GetCount()>0 then
Duel.ConfirmCards(tp,g)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DISCARD)
local sg=g:Select(tp,1,1,nil)
Duel.SendtoGrave(sg,REASON_EFFECT+REASON_DISCARD)
Duel.ShuffleHand(1-tp)
end
if g:GetCount()==0 then return end
local sg=g:RandomSelect(tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
e:GetHandler():RegisterFlagEffect(id,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end
......@@ -14,10 +14,9 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_RELEASE+CATEGORY_DRAW)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_DRAW)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCondition(s.condition)
......@@ -88,7 +87,8 @@ function s.target(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsRelateToEffect(e) and Duel.Release(e:GetHandler(),REASON_EFFECT)>0 then
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
......
......@@ -14,7 +14,7 @@ function s.initial_effect(c)
c:RegisterEffect(e2)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(id,0))
e2:SetCategory(CATEGORY_TOGRAVE+CATEGORY_SPECIAL_SUMMON)
e2:SetCategory(CATEGORY_REMOVE+CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_QUICK_F)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE)
......@@ -91,7 +91,7 @@ function s.thfilter(c,e,tp)
end
function s.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and Duel.SendtoGrave(c,REASON_EFFECT)>0 then
if c:IsRelateToEffect(e) and Duel.Remove(c,POS_FACEUP,REASON_EFFECT)>0 then
local g=Duel.GetMatchingGroup(s.thfilter,tp,LOCATION_GRAVE,0,c,e,tp)
if #g>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
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