Commit e206a8df authored by Nemo Ma's avatar Nemo Ma

fix

parent 928f0be3
...@@ -116,7 +116,7 @@ function cm.adop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -116,7 +116,7 @@ function cm.adop2(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function cm.filter2(c,re,tp,r) function cm.filter2(c,re,tp,r)
return c:IsAttribute(ATTRIBUTE_LIGHT) and re:IsActivated() and bit.band(r,REASON_COST)~=0 and re:GetHandler()==c return c:IsAttribute(ATTRIBUTE_LIGHT) and re:IsActivated() and bit.band(r,REASON_COST)~=0 and re:GetHandler()==c and c:IsReason(REASON_RELEASE)
end end
function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -36,7 +36,8 @@ function c115020.initial_effect(c) ...@@ -36,7 +36,8 @@ function c115020.initial_effect(c)
--indes --indes
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT) e3:SetCode(EFFECT_INDESTRUCTABLE_EFFECT)
e3:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetTargetRange(LOCATION_ONFIELD,0) e3:SetTargetRange(LOCATION_ONFIELD,0)
e3:SetTarget(c115020.indtg) e3:SetTarget(c115020.indtg)
...@@ -45,8 +46,8 @@ function c115020.initial_effect(c) ...@@ -45,8 +46,8 @@ function c115020.initial_effect(c)
--cannot be target --cannot be target
local e4=Effect.CreateEffect(c) local e4=Effect.CreateEffect(c)
e4:SetType(EFFECT_TYPE_FIELD) e4:SetType(EFFECT_TYPE_FIELD)
e4:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET) e4:SetCode(EFFECT_CANNOT_BE_EFFECT_TARGET)
e4:SetProperty(EFFECT_FLAG_SET_AVAILABLE)
e4:SetRange(LOCATION_MZONE) e4:SetRange(LOCATION_MZONE)
e4:SetTargetRange(LOCATION_ONFIELD,0) e4:SetTargetRange(LOCATION_ONFIELD,0)
e4:SetTarget(c115020.indtg) e4:SetTarget(c115020.indtg)
......
...@@ -64,18 +64,18 @@ function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -64,18 +64,18 @@ function c115025.xdop(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c115025.atkcon) e1:SetCondition(c115025.atkcon)
e1:SetOperation(c115025.atkop) e1:SetOperation(c115025.atkop)
if Duel.GetTurnPlayer()==tp then if Duel.GetTurnPlayer()==tp and Duel.IsAbleToEnterBP() then
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
else else
e1:SetReset(RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
end end
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c115025.atkcon(e,tp,eg,ep,ev,re,r,rp) function c115025.atkcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 return (Duel.GetTurnCount()~=e:GetLabel() or Duel.IsAbleToEnterBP()) and Duel.GetTurnPlayer()==tp and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil)
end end
function c115025.spop(e,tp,eg,ep,ev,re,r,rp) function c115025.atkop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,115025) Duel.Hint(HINT_CARD,0,115025)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -13,6 +13,7 @@ function c115039.initial_effect(c) ...@@ -13,6 +13,7 @@ function c115039.initial_effect(c)
e1:SetTarget(c115039.sptg) e1:SetTarget(c115039.sptg)
e1:SetOperation(c115039.spop) e1:SetOperation(c115039.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
c115039.summon_effect=e2
--SpecialSummon P --SpecialSummon P
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
......
...@@ -68,7 +68,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -68,7 +68,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.Hint(11,0,aux.Stringid(g:GetFirst():GetCode(),4)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(g:GetFirst():GetCode(),4))
end end
end end
function cm.chkfilter(c,tp) function cm.chkfilter(c,tp)
...@@ -102,7 +102,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -102,7 +102,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
local tc=g:GetFirst() local tc=g:GetFirst()
Duel.Hint(11,0,aux.Stringid(tc:GetCode(),4)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(tc:GetCode(),4))
local tep=tc:GetControler() local tep=tc:GetControler()
local PCe=tama.getTargetTable(tc,"deck_equip") local PCe=tama.getTargetTable(tc,"deck_equip")
if PCe and cm.canActivate(tc,PCe,eg,ep,ev,re,r,rp) then if PCe and cm.canActivate(tc,PCe,eg,ep,ev,re,r,rp) then
......
...@@ -38,7 +38,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c) ...@@ -38,7 +38,8 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.SendtoDeck(g,nil,2,REASON_COST) Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler():IsOnField() and re:GetHandler():IsFaceup() and (re:IsActiveType(TYPE_MONSTER) local rc=re:GetHandler()
return rc:IsOnField() and rc:IsControler(1-tp) and rc:IsFaceup() and (re:IsActiveType(TYPE_MONSTER)
or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE))) or (re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and not re:IsHasType(EFFECT_TYPE_ACTIVATE)))
end end
function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.descost(e,tp,eg,ep,ev,re,r,rp,chk)
......
...@@ -38,6 +38,6 @@ end ...@@ -38,6 +38,6 @@ end
function cm.efilter1(e,te) function cm.efilter1(e,te)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not(g==nil or {g:IsContains(e:GetHandler():GetEquipTarget())})[1] return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not(g~=nil and g:IsContains(ec))
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) --return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end end
...@@ -44,6 +44,6 @@ end ...@@ -44,6 +44,6 @@ end
function cm.efilter1(e,te) function cm.efilter1(e,te)
local ec=e:GetHandler():GetEquipTarget() local ec=e:GetHandler():GetEquipTarget()
local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and (g and g:IsContains(ec)) return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and (g~=nil and g:IsContains(ec))
--return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET) --return te:GetOwnerPlayer()~=e:GetHandlerPlayer() and not te:IsHasProperty(EFFECT_FLAG_CARD_TARGET)
end end
...@@ -108,7 +108,7 @@ function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -108,7 +108,7 @@ function cm.pctg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
local ct1=0 local ct1=0
--for power capsule --for power capsule
if eg then ct1=eg:GetCount() end if eg~=nil then ct1=eg:FilterCount(Card.IsPreviousLocation,nil,LOCATION_MZONE) end
local t1=ct1>0 local t1=ct1>0
local op=0 local op=0
local m1={} local m1={}
...@@ -134,5 +134,5 @@ function cm.pcop(e,tp,eg,ep,ev,re,r,rp) ...@@ -134,5 +134,5 @@ function cm.pcop(e,tp,eg,ep,ev,re,r,rp)
local ct=Duel.Draw(p,d,REASON_EFFECT) local ct=Duel.Draw(p,d,REASON_EFFECT)
end end
function cm.bgmop(e,tp,eg,ep,ev,re,r,rp) function cm.bgmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(11,0,aux.Stringid(m,7)) Duel.Hint(HINT_MUSIC,0,aux.Stringid(m,7))
end end
...@@ -39,8 +39,7 @@ function c29065703.ntcon(e,c,minc) ...@@ -39,8 +39,7 @@ function c29065703.ntcon(e,c,minc)
and Duel.IsExistingMatchingCard(c29065703.ntfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil) and Duel.IsExistingMatchingCard(c29065703.ntfilter,c:GetControler(),LOCATION_ONFIELD,0,1,nil)
end end
function c29065703.efcon(e,tp,eg,ep,ev,re,r,rp) function c29065703.efcon(e,tp,eg,ep,ev,re,r,rp)
local ec=e:GetHandler():GetReasonCard() return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
return bit.band(r,REASON_MATERIAL)~=0 and bit.band(r,REASON_SUMMON)==0
end end
function c29065703.xefcon(e,tp,eg,ep,ev,re,r,rp) function c29065703.xefcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -97,7 +97,7 @@ function cm.xyzcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -97,7 +97,7 @@ function cm.xyzcost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetCode(EFFECT_CANNOT_ACTIVATE) e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
e1:SetTarget(cm.aclimit) e1:SetValue(cm.aclimit)
e1:SetLabel(tc:GetCode()) e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
......
...@@ -190,13 +190,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -190,13 +190,13 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
tc=g:GetNext() tc=g:GetNext()
end end
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1,fid) c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_BATTLE,0,1,fid)
g:KeepAlive() g:KeepAlive()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_PHASE+PHASE_END) e1:SetCode(EVENT_PHASE+PHASE_BATTLE)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_BATTLE)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetLabelObject(g) e1:SetLabelObject(g)
......
...@@ -32,7 +32,7 @@ function cm.initial_effect(c) ...@@ -32,7 +32,7 @@ function cm.initial_effect(c)
Duel.RegisterEffect(e4,1) Duel.RegisterEffect(e4,1)
end end
function cm.cfilter(c) function cm.cfilter(c)
return cm.BeastDeity(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return cm.BeastDeity(c) and c:IsAbleToRemoveAsCost()
end end
function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
......
...@@ -34,7 +34,7 @@ function cm.initial_effect(c) ...@@ -34,7 +34,7 @@ function cm.initial_effect(c)
end end
function cm.cfilter(c) function cm.cfilter(c)
return cm.BeastDeity(c) and c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost() return cm.BeastDeity(c) and c:IsAbleToRemoveAsCost()
end end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost() if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
......
...@@ -19,11 +19,11 @@ function cm.initial_effect(c) ...@@ -19,11 +19,11 @@ function cm.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function cm.tdfilter(c,tp) function cm.tdfilter(c,tp)
return cm.BeastDeity(c) and not c:IsPublic() and c:IsAbleToDeck() return cm.BeastDeity(c) and c:IsType(TYPE_MONSTER) and not c:IsPublic() and c:IsAbleToDeck()
and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode()) and Duel.IsExistingMatchingCard(cm.thfilter,tp,LOCATION_DECK,0,1,nil,c:GetCode())
end end
function cm.thfilter(c,code) function cm.thfilter(c,code)
return cm.BeastDeity(c) and not c:IsCode(code) and c:IsAbleToHand() return cm.BeastDeity(c) and not c:IsCode(code) and c:IsAbleToHand() and c:IsType(TYPE_MONSTER)
end end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,1,nil,tp) end if chk==0 then return Duel.IsExistingMatchingCard(cm.tdfilter,tp,LOCATION_HAND,0,1,nil,tp) end
......
...@@ -50,13 +50,8 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,13 +50,8 @@ function cm.setop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,cm.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst() if g:GetCount()>0 then
if tc and Duel.SSet(tp,tc)~=0 then Duel.SSet(tp,g:GetFirst())
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CANNOT_TRIGGER)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
end end
end end
function cm.repfilter(c,tp) function cm.repfilter(c,tp)
......
...@@ -26,7 +26,7 @@ function cm.initial_effect(c) ...@@ -26,7 +26,7 @@ function cm.initial_effect(c)
c:RegisterEffect(e6) c:RegisterEffect(e6)
end end
function cm.dscost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.dscost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) and Duel.IsExistingMatchingCard(Card.IsOnField,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil) end
Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil) Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_COST,nil)
end end
function cm.dsop(e,tp,eg,ep,ev,re,r,rp) function cm.dsop(e,tp,eg,ep,ev,re,r,rp)
...@@ -54,8 +54,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -54,8 +54,7 @@ function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
end end
function cm.activate(e,tp,eg,ep,ev,re,r,rp) function cm.activate(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) then
Duel.Destroy(eg,REASON_EFFECT)
Duel.Damage(1-tp,1000,REASON_EFFECT) Duel.Damage(1-tp,1000,REASON_EFFECT)
end end
end end
......
...@@ -6,6 +6,7 @@ function c6160004.initial_effect(c) ...@@ -6,6 +6,7 @@ function c6160004.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,6161004+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c6160004.spcon) e1:SetCondition(c6160004.spcon)
e1:SetOperation(c6160004.spop) e1:SetOperation(c6160004.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -16,6 +17,7 @@ function c6160004.initial_effect(c) ...@@ -16,6 +17,7 @@ function c6160004.initial_effect(c)
e2:SetCode(EVENT_CHAINING) e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e2:SetCountLimit(1,6160004)
e2:SetCondition(c6160004.condition) e2:SetCondition(c6160004.condition)
e2:SetTarget(c6160004.target) e2:SetTarget(c6160004.target)
e2:SetOperation(c6160004.operation) e2:SetOperation(c6160004.operation)
......
...@@ -6,6 +6,7 @@ function c6160005.initial_effect(c) ...@@ -6,6 +6,7 @@ function c6160005.initial_effect(c)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_UNCOPYABLE+EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_SPSUMMON_PROC) e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
e1:SetCountLimit(1,6161005+EFFECT_COUNT_CODE_OATH)
e1:SetCondition(c6160005.spcon) e1:SetCondition(c6160005.spcon)
e1:SetOperation(c6160005.spop) e1:SetOperation(c6160005.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -30,13 +31,13 @@ function c6160005.spcon(e,c) ...@@ -30,13 +31,13 @@ function c6160005.spcon(e,c)
if c==nil then return true end if c==nil then return true end
local tp=c:GetControler() local tp=c:GetControler()
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local g=Duel.GetMatchingGroup(c6160005.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,c) local g=Duel.GetMatchingGroup(c6160005.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,c)
return g:GetCount()>=2 and ft>-2 and g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>-ft return g:GetCount()>=2 and ft>-2 and g:FilterCount(Card.IsLocation,nil,LOCATION_MZONE)>-ft
end end
function c6160005.spop(e,tp,eg,ep,ev,re,r,rp,c) function c6160005.spop(e,tp,eg,ep,ev,re,r,rp,c)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
local ct=-ft+1 local ct=-ft+1
local g=Duel.GetMatchingGroup(c6160005.cfilter,tp,LOCATION_MZONE+LOCATION_HAND,0,c) local g=Duel.GetMatchingGroup(c6160005.cfilter,tp,LOCATION_ONFIELD+LOCATION_HAND,0,c)
local sg=nil local sg=nil
if ft<=0 then if ft<=0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
......
...@@ -41,7 +41,8 @@ function c6160301.spcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -41,7 +41,8 @@ function c6160301.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST) e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
end end
function c6160301.afilter(c,e,tp) function c6160301.afilter(c,e,tp)
return c:IsSetCard(0x616) and c:IsType(TYPE_MONSTER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x616) and c:IsType(TYPE_MONSTER)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_DEFENSE)
end end
function c6160301.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c6160301.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......
...@@ -66,14 +66,14 @@ function c9911014.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,14 +66,14 @@ function c9911014.activate(e,tp,eg,ep,ev,re,r,rp)
end end
if #sg==0 or Duel.Destroy(sg,REASON_EFFECT)==0 then return end if #sg==0 or Duel.Destroy(sg,REASON_EFFECT)==0 then return end
local dg=Duel.GetOperatedGroup():Filter(c9911014.disfilter,nil) local dg=Duel.GetOperatedGroup():Filter(c9911014.disfilter,nil)
if lab==1 or lab==3 and c:IsRelateToEffect(e) and c:IsCanTurnSet() if (lab==1 or lab==3) and c:IsRelateToEffect(e) and c:IsCanTurnSet()
and Duel.SelectYesNo(tp,aux.Stringid(9911014,0)) then and Duel.SelectYesNo(tp,aux.Stringid(9911014,0)) then
Duel.BreakEffect() Duel.BreakEffect()
c:CancelToGrave() c:CancelToGrave()
Duel.ChangePosition(c,POS_FACEDOWN) Duel.ChangePosition(c,POS_FACEDOWN)
Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0) Duel.RaiseEvent(c,EVENT_SSET,e,REASON_EFFECT,tp,tp,0)
end end
if lab==2 or lab==3 and #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(9911014,1)) then if (lab==2 or lab==3) and #dg>0 and Duel.SelectYesNo(tp,aux.Stringid(9911014,1)) then
Duel.BreakEffect() Duel.BreakEffect()
for sc in aux.Next(dg) do for sc in aux.Next(dg) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
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