Commit 101f5c62 authored by mercury233's avatar mercury233

fix

parent cd4f5cb8
...@@ -57,7 +57,7 @@ function c100338002.countop(e,tp,eg,ep,ev,re,r,rp) ...@@ -57,7 +57,7 @@ function c100338002.countop(e,tp,eg,ep,ev,re,r,rp)
if c:IsFacedown() or not c:IsRelateToEffect(e) then return end if c:IsFacedown() or not c:IsRelateToEffect(e) then return end
local og=Duel.GetOperatedGroup() local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE) local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_GRAVE)
if ct>0 and c:AddCounter(0x57,ct) then if ct>0 then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE) e1:SetCode(EFFECT_AVOID_BATTLE_DAMAGE)
...@@ -70,10 +70,11 @@ function c100338002.countop(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,10 +70,11 @@ function c100338002.countop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100338002.reptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100338002.reptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReason(REASON_BATTLE+REASON_EFFECT) local c=e:GetHandler()
and e:GetHandler():IsCanRemoveCounter(tp,0x57,1,REASON_EFFECT) if chk==0 then return c:IsReason(REASON_BATTLE+REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
and c:IsCanRemoveCounter(tp,0x57,1,REASON_EFFECT)
end end
return Duel.SelectEffectYesNo(tp,e:GetHandler(),96) return Duel.SelectEffectYesNo(tp,c,96)
end end
function c100338002.repop(e,tp,eg,ep,ev,re,r,rp) function c100338002.repop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RemoveCounter(tp,0x57,1,REASON_EFFECT) e:GetHandler():RemoveCounter(tp,0x57,1,REASON_EFFECT)
......
...@@ -12,7 +12,7 @@ function c100338019.initial_effect(c) ...@@ -12,7 +12,7 @@ function c100338019.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(100338019) e2:SetCode(54828837)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -12,7 +12,7 @@ function c100338034.initial_effect(c) ...@@ -12,7 +12,7 @@ function c100338034.initial_effect(c)
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD) e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCode(100338034) e2:SetCode(16317140)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
e2:SetTargetRange(1,0) e2:SetTargetRange(1,0)
c:RegisterEffect(e2) c:RegisterEffect(e2)
......
...@@ -31,8 +31,8 @@ function c101101012.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -31,8 +31,8 @@ function c101101012.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101012.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c101101012.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c101101012.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c101101012.costfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,e:GetHandler())
Duel.Remove(g,POS_FACEUP,REASON_COST)
e:SetLabel(g:GetFirst():GetLevel()) e:SetLabel(g:GetFirst():GetLevel())
Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
function c101101012.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101101012.target(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
...@@ -75,7 +75,8 @@ function c101101012.spcon2(e,tp,eg,ep,ev,re,r,rp) ...@@ -75,7 +75,8 @@ function c101101012.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnPlayer()==tp return Duel.GetTurnPlayer()==tp
end end
function c101101012.spfilter(c,e,tp) function c101101012.spfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return (c:IsFaceup() or c:IsLocation(LOCATION_GRAVE)) and c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101101012.spop2(e,tp,eg,ep,ev,re,r,rp) function c101101012.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -84,11 +85,11 @@ function c101101012.spop2(e,tp,eg,ep,ev,re,r,rp) ...@@ -84,11 +85,11 @@ function c101101012.spop2(e,tp,eg,ep,ev,re,r,rp)
c:SetTurnCounter(ct) c:SetTurnCounter(ct)
if ct==2 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0 if ct==2 and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)~=0
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101101012.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101101012.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,e,tp)
and Duel.SelectYesNo(tp,aux.Stringid(101101012,3)) then and Duel.SelectYesNo(tp,aux.Stringid(101101012,3)) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101101012.spfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101012.spfilter),tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -34,7 +34,8 @@ function c101101013.initial_effect(c) ...@@ -34,7 +34,8 @@ function c101101013.initial_effect(c)
c:RegisterEffect(e4) c:RegisterEffect(e4)
end end
function c101101013.tgfilter(c) function c101101013.tgfilter(c)
return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and not c:IsCode(101101013) and c:IsAbleToGrave() return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and not c:IsCode(101101013)
and c:IsAbleToGrave()
end end
function c101101013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101013.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101013.tgfilter,tp,LOCATION_DECK,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c101101013.tgfilter,tp,LOCATION_DECK,0,1,nil) end
...@@ -56,24 +57,25 @@ function c101101013.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -56,24 +57,25 @@ function c101101013.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c101101013.eqfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c101101013.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101101013.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101101013.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c101101013.eqop(e,tp,eg,ep,ev,re,r,rp) function c101101013.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc) if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c101101013.eqlimit) e1:SetValue(c101101013.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c101101013.eqlimit(e,c) function c101101013.eqlimit(e,c)
local tp=e:GetHandlerPlayer() return c==e:GetLabelObject()
return c:IsControler(tp)
end end
...@@ -29,16 +29,15 @@ function c101101014.initial_effect(c) ...@@ -29,16 +29,15 @@ function c101101014.initial_effect(c)
e3:SetValue(aux.tgoval) e3:SetValue(aux.tgoval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101101014.cfilter(c,ft) function c101101014.cfilter(c,tp)
return (c:IsLocation(LOCATION_HAND) or c:IsFaceup()) and ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:GetType()==TYPE_EQUIP+TYPE_SPELL) and c:IsAbleToGraveAsCost() and (ft>0 or c:GetSequence()<5) return (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
and ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:GetType()==TYPE_EQUIP+TYPE_SPELL)
and c:IsAbleToGraveAsCost() and Duel.GetMZoneCount(tp,c)>0
end end
function c101101014.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c101101014.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) if chk==0 then return Duel.IsExistingMatchingCard(c101101014.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,e:GetHandler(),tp) end
local loc=LOCATION_HAND+LOCATION_ONFIELD
if ft==0 then loc=LOCATION_MZONE end
if chk==0 then return ft>-1 and Duel.IsExistingMatchingCard(c101101014.cfilter,tp,loc,0,1,e:GetHandler(),ft) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c101101014.cfilter,tp,loc,0,1,1,e:GetHandler(),ft) local g=Duel.SelectMatchingCard(tp,c101101014.cfilter,tp,LOCATION_HAND+LOCATION_ONFIELD,0,1,1,e:GetHandler(),tp)
Duel.SendtoGrave(g,REASON_COST) Duel.SendtoGrave(g,REASON_COST)
end end
function c101101014.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101101014.target(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -53,7 +52,7 @@ function c101101014.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +52,7 @@ function c101101014.operation(e,tp,eg,ep,ev,re,r,rp)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL) e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(1) e1:SetValue(1)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
...@@ -66,24 +65,25 @@ function c101101014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,24 +65,25 @@ function c101101014.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
and Duel.IsExistingTarget(c101101014.eqfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c101101014.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,c101101014.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101101014.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c101101014.eqop(e,tp,eg,ep,ev,re,r,rp) function c101101014.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc) if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c101101014.eqlimit) e1:SetValue(c101101014.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c101101014.eqlimit(e,c) function c101101014.eqlimit(e,c)
local tp=e:GetHandlerPlayer() return c==e:GetLabelObject()
return c:IsControler(tp)
end end
...@@ -31,13 +31,15 @@ function c101101015.initial_effect(c) ...@@ -31,13 +31,15 @@ function c101101015.initial_effect(c)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c101101015.cfilter(c) function c101101015.cfilter(c)
return ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and c:IsAbleToDeckAsCost() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup())
and ((c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE)) or c:IsSetCard(0x207a)) and c:IsAbleToDeckAsCost()
end end
function c101101015.drcost(e,tp,eg,ep,ev,re,r,rp,chk) function c101101015.drcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101101015.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(c101101015.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101101015.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,e:GetHandler()) local g=Duel.SelectMatchingCard(tp,c101101015.cfilter,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,3,3,e:GetHandler())
Duel.SendtoDeck(g,nil,3,REASON_COST) Duel.HintSelection(g)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end end
function c101101015.drtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101015.drtg(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
...@@ -57,24 +59,25 @@ function c101101015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -57,24 +59,25 @@ function c101101015.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(c101101015.eqfilter,tp,LOCATION_MZONE,0,1,nil) end and Duel.IsExistingTarget(c101101015.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SelectTarget(tp,c101101015.eqfilter,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101101015.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
end end
function c101101015.eqop(e,tp,eg,ep,ev,re,r,rp) function c101101015.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsControler(tp) and tc:IsRelateToEffect(e) then
Duel.Equip(tp,c,tc) if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c101101015.eqlimit) e1:SetValue(c101101015.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c101101015.eqlimit(e,c) function c101101015.eqlimit(e,c)
local tp=e:GetHandlerPlayer() return c==e:GetLabelObject()
return c:IsControler(tp)
end end
...@@ -58,7 +58,7 @@ function c101101041.regop(e,tp,eg,ep,ev,re,r,rp) ...@@ -58,7 +58,7 @@ function c101101041.regop(e,tp,eg,ep,ev,re,r,rp)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c101101041.thcon(e,tp,eg,ep,ev,re,r,rp) function c101101041.thcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c101101041.tgfilter2,tp,LOCATION_DECK,0,1,nil) and Duel.IsExistingMatchingCard(c101101041.thfilter2,tp,LOCATION_DECK,0,1,nil) return Duel.IsExistingMatchingCard(c101101041.tgfilter2,tp,LOCATION_DECK,0,1,nil)
end end
function c101101041.thop(e,tp,eg,ep,ev,re,r,rp) function c101101041.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,101101041) Duel.Hint(HINT_CARD,0,101101041)
...@@ -78,23 +78,29 @@ end ...@@ -78,23 +78,29 @@ end
function c101101041.eqcon(e,tp,eg,ep,ev,re,r,rp) function c101101041.eqcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2 return Duel.GetCurrentPhase()==PHASE_MAIN1 or Duel.GetCurrentPhase()==PHASE_MAIN2
end end
function c101101041.eqfilter(c)
return c:IsFaceup() and c:IsRace(RACE_WARRIOR)
end
function c101101041.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101041.eqtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101101041.eqfilter(chkc) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingTarget(Card.IsRace,tp,LOCATION_MZONE,0,1,nil,RACE_WARRIOR) end and Duel.IsExistingTarget(c101101041.eqfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
Duel.SelectTarget(tp,Card.IsRace,tp,LOCATION_MZONE,0,1,1,nil,RACE_WARRIOR) Duel.SelectTarget(tp,c101101041.eqfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_EQUIP,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,e:GetHandler(),1,0,0)
end end
function c101101041.eqop(e,tp,eg,ep,ev,re,r,rp) function c101101041.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) then if c:IsRelateToEffect(e) and tc:IsFaceup() and tc:IsRelateToEffect(e) and tc:IsControler(tp) then
Duel.Equip(tp,c,tc) if not Duel.Equip(tp,c,tc) then return end
--equip limit --equip limit
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT) e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetLabelObject(tc)
e1:SetValue(c101101041.eqlimit) e1:SetValue(c101101041.eqlimit)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
c:RegisterEffect(e1) c:RegisterEffect(e1)
...@@ -107,6 +113,5 @@ function c101101041.eqop(e,tp,eg,ep,ev,re,r,rp) ...@@ -107,6 +113,5 @@ function c101101041.eqop(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c101101041.eqlimit(e,c) function c101101041.eqlimit(e,c)
local tp=e:GetHandlerPlayer() return c==e:GetLabelObject()
return c:IsControler(tp)
end end
...@@ -9,7 +9,7 @@ function c101101042.initial_effect(c) ...@@ -9,7 +9,7 @@ function c101101042.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101101042,0)) e1:SetDescription(aux.Stringid(101101042,0))
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetType(EFFECT_TYPE_QUICK_O) e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY) e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_EQUIP) e1:SetCode(EVENT_EQUIP)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
...@@ -20,6 +20,7 @@ function c101101042.initial_effect(c) ...@@ -20,6 +20,7 @@ function c101101042.initial_effect(c)
--equip --equip
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101101042,1)) e2:SetDescription(aux.Stringid(101101042,1))
e2:SetCategory(CATEGORY_EQUIP)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_PHASE+PHASE_END) e2:SetCode(EVENT_PHASE+PHASE_END)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
...@@ -42,28 +43,31 @@ function c101101042.desop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,28 +43,31 @@ function c101101042.desop(e,tp,eg,ep,ev,re,r,rp)
Duel.Destroy(sg,REASON_EFFECT) Duel.Destroy(sg,REASON_EFFECT)
end end
end end
function c101101042.eqfilter(c,ec) function c101101042.eqfilter(c,ec,tp)
return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) return c:IsType(TYPE_EQUIP) and c:CheckEquipTarget(ec) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end end
function c101101042.eqfilter2(c) function c101101042.eqfilter2(c,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and not c:IsForbidden() return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:CheckUniqueOnField(tp,LOCATION_SZONE) and not c:IsForbidden()
end end
function c101101042.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c101101042.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 end local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0
and Duel.IsExistingMatchingCard(c101101042.eqfilter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,c,tp) end
Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_EQUIP,nil,1,tp,LOCATION_HAND+LOCATION_GRAVE)
end end
function c101101042.eqop(e,tp,eg,ep,ev,re,r,rp) function c101101042.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end if Duel.GetLocationCount(tp,LOCATION_SZONE)<=0 or c:IsFacedown() or not c:IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101042.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101042.eqfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,c,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.Equip(tp,tc,c) if not Duel.Equip(tp,tc,c) then return end
Duel.BreakEffect() if Duel.IsExistingMatchingCard(c101101042.eqfilter2,tp,LOCATION_DECK,0,1,nil,tp)
if Duel.IsExistingMatchingCard(c101101042.eqfilter2,tp,LOCATION_DECK,0,1,nil,e,tp) and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101101042,2)) then and Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and Duel.SelectYesNo(tp,aux.Stringid(101101042,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_EQUIP)
local g=Duel.SelectMatchingCard(tp,c101101042.eqfilter2,tp,LOCATION_DECK,0,1,1,tp) local g=Duel.SelectMatchingCard(tp,c101101042.eqfilter2,tp,LOCATION_DECK,0,1,1,nil,tp)
local tc=g:GetFirst() local tc=g:GetFirst()
if not Duel.Equip(tp,tc,c) then return end if not Duel.Equip(tp,tc,c) then return end
--equip limit --equip limit
......
...@@ -66,11 +66,13 @@ function c101101053.thop(e,tp,eg,ep,ev,re,r,rp) ...@@ -66,11 +66,13 @@ function c101101053.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101101053.thfilter,tp,LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101101053.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then local tc=g:GetFirst()
Duel.SendtoHand(g,nil,REASON_EFFECT) if tc and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,tc)
Duel.BreakEffect() if tc:IsLocation(LOCATION_HAND) then
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end
end end
end end
function c101101053.spcon(e,tp,eg,ep,ev,re,r,rp) function c101101053.spcon(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -59,14 +59,18 @@ end ...@@ -59,14 +59,18 @@ end
function c101101054.excon(e,tp,eg,ep,ev,re,r,rp) function c101101054.excon(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsAbleToEnterBP() return Duel.IsAbleToEnterBP()
end end
function c101101054.exfilter(c)
return c:IsFaceup() and not c:IsHasEffect(EFFECT_EXTRA_ATTACK)
end
function c101101054.extg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101054.extg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101101054.exfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101101054.exfilter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,0,1,1,nil) Duel.SelectTarget(tp,c101101054.exfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c101101054.exop(e,tp,eg,ep,ev,re,r,rp) function c101101054.exop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
...@@ -83,9 +87,9 @@ function c101101054.exop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,9 +87,9 @@ function c101101054.exop(e,tp,eg,ep,ev,re,r,rp)
e2:SetLabel(tc:GetFieldID()) e2:SetLabel(tc:GetFieldID())
e2:SetReset(RESET_PHASE+PHASE_END) e2:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e2,tp) Duel.RegisterEffect(e2,tp)
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
function c101101054.ftarget(e,c) function c101101054.ftarget(e,c)
return e:GetLabel()~=c:GetFieldID() return e:GetLabel()~=c:GetFieldID()
...@@ -94,18 +98,14 @@ function c101101054.descon(e,tp,eg,ep,ev,re,r,rp) ...@@ -94,18 +98,14 @@ function c101101054.descon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_GRAVE) return c:IsReason(REASON_LOST_TARGET) and c:GetPreviousEquipTarget():IsLocation(LOCATION_GRAVE)
end end
function c101101054.desfilter(c)
return c:IsFaceup()
end
function c101101054.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101054.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c101101054.desfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsFaceup() end
if chk==0 then return Duel.IsExistingTarget(c101101054.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c101101054.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
end end
function c101101054.desop(e,tp,eg,ep,ev,re,r,rp) function c101101054.desop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT) Duel.Destroy(tc,REASON_EFFECT)
......
...@@ -23,6 +23,7 @@ function c101101055.initial_effect(c) ...@@ -23,6 +23,7 @@ function c101101055.initial_effect(c)
e3:SetDescription(aux.Stringid(101101055,0)) e3:SetDescription(aux.Stringid(101101055,0))
e3:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY) e3:SetCategory(CATEGORY_TOHAND+CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetCountLimit(1,101101055) e3:SetCountLimit(1,101101055)
e3:SetTarget(c101101055.thtg) e3:SetTarget(c101101055.thtg)
...@@ -58,7 +59,7 @@ function c101101055.thfilter(c) ...@@ -58,7 +59,7 @@ function c101101055.thfilter(c)
return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand() return c:IsAttribute(ATTRIBUTE_FIRE) and c:IsRace(RACE_WARRIOR) and c:IsAbleToHand()
end end
function c101101055.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101101055.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:GetControler()==tp and chkc:GetLocation()==LOCATION_GRAVE and c101101055.thfilter(chkc) end if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_GRAVE) and c101101055.thfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101101055.thfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingTarget(c101101055.thfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101101055.thfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectTarget(tp,c101101055.thfilter,tp,LOCATION_GRAVE,0,1,1,nil)
...@@ -66,9 +67,9 @@ function c101101055.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -66,9 +67,9 @@ function c101101055.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,e:GetHandler(),1,0,0)
end end
function c101101055.thop(e,tp,eg,ep,ev,re,r,rp) function c101101055.thop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsRace(RACE_WARRIOR) then if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
Duel.SendtoHand(tc,nil,REASON_EFFECT)
Duel.BreakEffect() Duel.BreakEffect()
Duel.Destroy(e:GetHandler(),REASON_EFFECT) Duel.Destroy(e:GetHandler(),REASON_EFFECT)
end end
......
...@@ -56,8 +56,8 @@ function c101101066.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -56,8 +56,8 @@ function c101101066.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
if l2==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then if l2==1 and e:IsHasType(EFFECT_TYPE_ACTIVATE) then
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_SPECIAL_SUMMON)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,0,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,0,tp,LOCATION_DECK)
else else
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK) Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
......
...@@ -6,26 +6,31 @@ function c101101072.initial_effect(c) ...@@ -6,26 +6,31 @@ function c101101072.initial_effect(c)
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e1:SetCountLimit(1,101101072+EFFECT_COUNT_CODE_OATH) e1:SetCountLimit(1,101101072+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c101101072.target) e1:SetTarget(c101101072.target)
e1:SetOperation(c101101072.activate) e1:SetOperation(c101101072.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c101101072.rmfilter(c) function c101101072.rmfilter(c)
return c:GetType()==TYPE_EQUIP+TYPE_SPELL and c:IsAbleToRemove() return (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup() or c:GetEquipTarget()) and c:GetType()==TYPE_EQUIP+TYPE_SPELL
and c:IsAbleToRemove()
end end
function c101101072.desfilter(c) function c101101072.desfilter(c,tp,g)
return c:IsSetCard(0x247) and c:IsType(TYPE_MONSTER) local ft=math.min((Duel.GetMZoneCount(tp,c)),3)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
return c:IsFaceup() and c:IsSetCard(0x247) and c:IsType(TYPE_MONSTER)
and (not g or ft>0 and g:CheckWithSumEqual(Card.GetLevel,9,1,ft))
end end
function c101101072.spfilter(c,e,tp) function c101101072.spfilter(c,e,tp)
return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(9) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRace(RACE_WARRIOR) and c:IsAttribute(ATTRIBUTE_FIRE) and c:IsLevelBelow(9)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101101072.target(e,tp,eg,ep,ev,re,r,rp,chk) function c101101072.target(e,tp,eg,ep,ev,re,r,rp,chk)
local g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp) local g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
local g1=Duel.GetMatchingGroup(c101101072.desfilter,tp,LOCATION_MZONE,0,nil) local g1=Duel.GetMatchingGroup(c101101072.desfilter,tp,LOCATION_MZONE,0,nil,tp,g)
local b1=Duel.IsExistingMatchingCard(c101101072.rmfilter,tp,LOCATION_GRAVE+LOCATION_SZONE,0,1,nil) local b1=Duel.IsExistingMatchingCard(c101101072.rmfilter,tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,nil)
local b2=Duel.IsExistingMatchingCard(c101101072.desfilter,tp,LOCATION_MZONE,0,1,nil) and g:CheckWithSumEqual(Card.GetLevel,9,1,3) local b2=g:GetCount()>0 and Duel.IsExistingMatchingCard(c101101072.desfilter,tp,LOCATION_MZONE,0,1,nil,tp,g)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
...@@ -35,7 +40,7 @@ function c101101072.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -35,7 +40,7 @@ function c101101072.target(e,tp,eg,ep,ev,re,r,rp,chk)
else op=Duel.SelectOption(tp,aux.Stringid(101101072,1))+1 end else op=Duel.SelectOption(tp,aux.Stringid(101101072,1))+1 end
e:SetLabel(op) e:SetLabel(op)
if op==0 then if op==0 then
e:SetCategory(CATEGORY_REMOVE) e:SetCategory(CATEGORY_REMOVE+CATEGORY_DESTROY)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_GRAVE)
else else
e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY) e:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_DESTROY)
...@@ -50,45 +55,53 @@ function c101101072.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,45 +55,53 @@ function c101101072.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if e:GetLabel()==0 then if e:GetLabel()==0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101072.rmfilter),tp,LOCATION_SZONE+LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101101072.rmfilter),tp,LOCATION_GRAVE+LOCATION_ONFIELD,0,1,1,nil)
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT) and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,nil) and Duel.SelectYesNo(tp,aux.Stringid(101101072,2)) then local exc=nil
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then exc=e:GetHandler() end
if g:GetCount()>0 and Duel.Remove(g,POS_FACEUP,REASON_EFFECT)~=0
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,exc)
and Duel.SelectYesNo(tp,aux.Stringid(101101072,2)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,exc)
if g:GetCount()>0 then Duel.HintSelection(g)
Duel.HintSelection(g) Duel.Destroy(g,REASON_EFFECT)
Duel.Destroy(g,REASON_EFFECT)
end
end end
else else
local g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,c101101072.desfilter,tp,LOCATION_MZONE,0,1,1,nil) local dg=Duel.SelectMatchingCard(tp,c101101072.desfilter,tp,LOCATION_MZONE,0,1,1,nil,tp,g)
if g:GetCount()>0 then if dg:GetCount()>0 then
Duel.HintSelection(g) Duel.HintSelection(dg)
Duel.Destroy(g,REASON_EFFECT) if Duel.Destroy(dg,REASON_EFFECT)~=0 then
Duel.BreakEffect() local ft=math.min((Duel.GetLocationCount(tp,LOCATION_MZONE)),3)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp)
if ft<=0 then return end if ft>0 and g:GetCount()>0 then
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end Duel.BreakEffect()
local g=Duel.GetMatchingGroup(c101101072.spfilter,tp,LOCATION_DECK,0,nil,e,tp) if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:SelectSubGroup(tp,c101101072.spcheck,false,1,ft) local sg=g:SelectSubGroup(tp,c101101072.spcheck,false,1,ft)
local tc=sg:GetFirst() if sg then
for tc in aux.Next(sg) do local tc=sg:GetFirst()
if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then for tc in aux.Next(sg) do
local e1=Effect.CreateEffect(c) if Duel.SpecialSummonStep(tc,0,tp,tp,false,false,POS_FACEUP_DEFENSE) then
e1:SetType(EFFECT_TYPE_SINGLE) local e1=Effect.CreateEffect(c)
e1:SetCode(EFFECT_DISABLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetCode(EFFECT_DISABLE)
tc:RegisterEffect(e1) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
local e2=Effect.CreateEffect(c) tc:RegisterEffect(e1)
e2:SetType(EFFECT_TYPE_SINGLE) local e2=Effect.CreateEffect(c)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetCode(EFFECT_DISABLE_EFFECT)
tc:RegisterEffect(e2) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2)
end
end
Duel.SpecialSummonComplete()
end
end end
end end
end end
Duel.SpecialSummonComplete()
end end
local e3=Effect.CreateEffect(e:GetHandler()) local e3=Effect.CreateEffect(e:GetHandler())
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
......
...@@ -44,12 +44,12 @@ end ...@@ -44,12 +44,12 @@ end
function c32491822.spcon(e,c) function c32491822.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 check=Duel.IsPlayerAffectedByEffect(tp,100338019) local check=Duel.IsPlayerAffectedByEffect(tp,54828837)
local g=Duel.GetMatchingGroup(c32491822.spfilter,tp,LOCATION_ONFIELD,0,nil,check) local g=Duel.GetMatchingGroup(c32491822.spfilter,tp,LOCATION_ONFIELD,0,nil,check)
return g:CheckSubGroup(aux.mzctcheck,3,3,tp) return g:CheckSubGroup(aux.mzctcheck,3,3,tp)
end end
function c32491822.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function c32491822.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local check=Duel.IsPlayerAffectedByEffect(tp,100338019) local check=Duel.IsPlayerAffectedByEffect(tp,54828837)
local g=Duel.GetMatchingGroup(c32491822.spfilter,tp,LOCATION_ONFIELD,0,nil,check) local g=Duel.GetMatchingGroup(c32491822.spfilter,tp,LOCATION_ONFIELD,0,nil,check)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,aux.mzctcheck,true,3,3,tp) local sg=g:SelectSubGroup(tp,aux.mzctcheck,true,3,3,tp)
......
...@@ -45,12 +45,12 @@ end ...@@ -45,12 +45,12 @@ end
function c6007213.spcon(e,c) function c6007213.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 check=Duel.IsPlayerAffectedByEffect(tp,100338034) local check=Duel.IsPlayerAffectedByEffect(tp,16317140)
local g=Duel.GetMatchingGroup(c6007213.spfilter,tp,LOCATION_ONFIELD,0,nil,check) local g=Duel.GetMatchingGroup(c6007213.spfilter,tp,LOCATION_ONFIELD,0,nil,check)
return g:CheckSubGroup(aux.mzctcheck,3,3,tp) return g:CheckSubGroup(aux.mzctcheck,3,3,tp)
end end
function c6007213.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c) function c6007213.sptg(e,tp,eg,ep,ev,re,r,rp,chk,c)
local check=Duel.IsPlayerAffectedByEffect(tp,100338034) local check=Duel.IsPlayerAffectedByEffect(tp,16317140)
local g=Duel.GetMatchingGroup(c6007213.spfilter,tp,LOCATION_ONFIELD,0,nil,check) local g=Duel.GetMatchingGroup(c6007213.spfilter,tp,LOCATION_ONFIELD,0,nil,check)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local sg=g:SelectSubGroup(tp,aux.mzctcheck,true,3,3,tp) local sg=g:SelectSubGroup(tp,aux.mzctcheck,true,3,3,tp)
......
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