Commit 83fee462 authored by POLYMER's avatar POLYMER

fix

parent 9e14e4fb
......@@ -44,7 +44,7 @@ function cm.initial_effect(c)
Duel.RegisterEffect(ge2,0)
end
end)
Duel.RegisterEffect(e6,0)
--Duel.RegisterEffect(e6,0)
e2:SetLabelObject(e6)
e5:SetLabelObject(e6)
local e4=Effect.CreateEffect(c)
......
......@@ -44,7 +44,7 @@ function c50218131.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c50218131.tdfilter,tp,LOCATION_GRAVE,0,1,1,nil)
if g:GetCount()>0 then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_DECK) then
if Duel.SendtoDeck(g,nil,2,REASON_EFFECT)>0 then
Duel.BreakEffect()
Duel.Draw(tp,1,REASON_EFFECT)
end
......
......@@ -28,14 +28,16 @@ function c50218135.initial_effect(c)
e3:SetTarget(c50218135.sptg)
e3:SetOperation(c50218135.spop)
c:RegisterEffect(e3)
--can not be attack
--can not be attack target
local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_SINGLE)
e4:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e4:SetRange(LOCATION_MZONE)
e4:SetCode(EFFECT_CANNOT_BE_BATTLE_TARGET)
e4:SetCondition(c50218135.atcon)
e4:SetValue(aux.imval1)
c:RegisterEffect(e4)
--can not be target
--can not be effect target
local e5=e4:Clone()
e5:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e5:SetValue(aux.tgoval)
......@@ -93,7 +95,7 @@ function c50218135.spop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c50218135.atcon(e)
return Duel.IsExistingMatchingCard(nil,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,e:GetHandler())
return Duel.GetFieldGroupCount(e:GetHandlerPlayer(),LOCATION_MZONE,0)>=2
end
function c50218135.cttg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsControlerCanBeChanged,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -35,7 +35,7 @@ function c50223170.initial_effect(c)
local e7=e3:Clone()
e7:SetCode(EFFECT_CANNOT_BE_LINK_MATERIAL)
c:RegisterEffect(e7)
--to grave
--destroy
local e8=Effect.CreateEffect(c)
e8:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e8:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......@@ -45,14 +45,14 @@ function c50223170.initial_effect(c)
e8:SetOperation(c50223170.regop)
c:RegisterEffect(e8)
local e9=Effect.CreateEffect(c)
e9:SetCategory(CATEGORY_TOGRAVE)
e9:SetCategory(CATEGORY_DESTROY)
e9:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e9:SetProperty(EFFECT_FLAG_SINGLE_RANGE+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e9:SetCode(EVENT_CUSTOM+50223170)
e9:SetRange(LOCATION_MZONE)
e9:SetCountLimit(1,50223170)
e9:SetTarget(c50223170.tgtg)
e9:SetOperation(c50223170.tgop)
e9:SetTarget(c50223170.destg)
e9:SetOperation(c50223170.desop)
c:RegisterEffect(e9)
end
function c50223170.lcheck(g,lc)
......@@ -75,14 +75,14 @@ end
function c50223170.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RaiseSingleEvent(e:GetHandler(),EVENT_CUSTOM+50223170,e,0,tp,0,0)
end
function c50223170.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
local g=Duel.GetMatchingGroup(nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,1,0,0)
function c50223170.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) end
local g=Duel.GetMatchingGroup(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end
function c50223170.tgop(e,tp,eg,ep,ev,re,r,rp)
function c50223170.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,nil,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then
Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT)
......
......@@ -26,7 +26,7 @@ function c65130317.initial_effect(c)
c:RegisterEffect(e3)
end
function c65130317.thfilter(e,c)
return c:IsLocation(LOCATION_DECK) and c:IsLevelAbove(4)
return c:IsLocation(LOCATION_DECK) and c:IsLevelAbove(4) and not c:IsStatus(STATUS_TO_HAND_WITHOUT_CONFIRM)
end
function c65130317.cfilter(c)
return c:IsAttack(878) and c:IsDefense(1157) and c:IsFaceup()
......
......@@ -46,11 +46,8 @@ function s.eqfilter(c,e,tp)
end
function s.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and s.eqfilter(chkc,e,tp) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,s.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(s.eqfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,0,0)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
end
function s.eqlimit(e,c)
......@@ -58,8 +55,10 @@ function s.eqlimit(e,c)
end
function s.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local tc=Duel.SelectMatchingCard(tp,s.eqfilter,tp,LOCATION_GRAVE,0,1,1,nil,e,tp):GetFirst()
if not tc then return end
if Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
Duel.Equip(tp,c,tc)
--Add Equip limit
......
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