Commit b35795c2 authored by mercury233's avatar mercury233

fix

parent 70b39628
...@@ -26,7 +26,6 @@ function c100266038.initial_effect(c) ...@@ -26,7 +26,6 @@ function c100266038.initial_effect(c)
e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE) e3:SetCode(EVENT_PRE_DAMAGE_CALCULATE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c100266038.atkcon) e3:SetCondition(c100266038.atkcon)
e3:SetTarget(c100266038.atktg)
e3:SetOperation(c100266038.atkop) e3:SetOperation(c100266038.atkop)
c:RegisterEffect(e3) c:RegisterEffect(e3)
--draw --draw
...@@ -80,15 +79,8 @@ function c100266038.atkcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,15 +79,8 @@ function c100266038.atkcon(e,tp,eg,ep,ev,re,r,rp)
return ac:IsControler(tp) and ac:IsFaceup() and ac:IsType(TYPE_LINK) and ac:IsSetCard(0x24b) and g:IsContains(ac) return ac:IsControler(tp) and ac:IsFaceup() and ac:IsType(TYPE_LINK) and ac:IsSetCard(0x24b) and g:IsContains(ac)
and ac:IsRelateToBattle() and bc:IsControler(1-tp) and ac:IsRelateToBattle() and bc:IsControler(1-tp)
end end
function c100266038.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
local ac=e:GetLabelObject()
if not ac then return false end
local g=e:GetHandler():GetMutualLinkedGroup()
if chk==0 then return g:GetCount()>0 end
end
function c100266038.atkop(e,tp,eg,ep,ev,re,r,rp) function c100266038.atkop(e,tp,eg,ep,ev,re,r,rp)
local ac=e:GetLabelObject() local ac=e:GetLabelObject()
if not ac then return end
if not e:GetHandler():IsRelateToEffect(e) then return end if not e:GetHandler():IsRelateToEffect(e) then return end
local g=e:GetHandler():GetMutualLinkedGroup() local g=e:GetHandler():GetMutualLinkedGroup()
if ac:IsRelateToBattle() and ac:IsFaceup() and ac:IsControler(tp) then if ac:IsRelateToBattle() and ac:IsFaceup() and ac:IsControler(tp) then
......
...@@ -13,21 +13,20 @@ function c100266044.initial_effect(c) ...@@ -13,21 +13,20 @@ function c100266044.initial_effect(c)
e1:SetOperation(c100266044.activate) e1:SetOperation(c100266044.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c100266044.filter(c,tp) function c100266044.filter(c,e,tp)
if not (c:IsType(TYPE_LINK) and c:IsSetCard(0x24b)) then return false end if not (c:IsType(TYPE_LINK) and c:IsSetCard(0x24b)) then return false end
local zone=bit.band(c:GetLinkedZone(tp),0x1f) local zone=c:GetLinkedZone(tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)>0 return Duel.IsExistingMatchingCard(c100266044.gfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp,zone)
end end
function c100266044.gfilter(c,e,tp) function c100266044.gfilter(c,e,tp,zone)
return c:IsSetCard(0x24b) and c:IsType(TYPE_LINK) and c:GetLink()==1 return c:IsSetCard(0x24b) and c:IsType(TYPE_LINK) and c:IsLink(1)
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP,tp,zone)
end end
function c100266044.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100266044.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100266044.filter(chkc,tp) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c100266044.filter(chkc,e,tp) end
if chk==0 then return Duel.IsExistingTarget(c100266044.filter,tp,LOCATION_MZONE,0,1,nil,tp) if chk==0 then return Duel.IsExistingTarget(c100266044.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
and Duel.IsExistingMatchingCard(c100266044.gfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c100266044.filter,tp,LOCATION_MZONE,0,1,1,nil,tp) local g=Duel.SelectTarget(tp,c100266044.filter,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_GRAVE)
end end
function c100266044.activate(e,tp,eg,ep,ev,re,r,rp) function c100266044.activate(e,tp,eg,ep,ev,re,r,rp)
...@@ -35,10 +34,10 @@ function c100266044.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -35,10 +34,10 @@ function c100266044.activate(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
local zone=bit.band(tc:GetLinkedZone(tp),0x1f) local zone=bit.band(tc:GetLinkedZone(tp),0x1f)
local upbound=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone) local upbound=Duel.GetLocationCount(tp,LOCATION_MZONE,tp,LOCATION_REASON_TOFIELD,zone)
if zone==0 or upbound<=0 then return end if upbound<=0 then return end
if Duel.IsPlayerAffectedByEffect(tp,59822133) then upbound=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then upbound=1 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100266044.gfilter),tp,LOCATION_GRAVE,0,1,upbound,nil,e,tp) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c100266044.gfilter),tp,LOCATION_GRAVE,0,1,upbound,nil,e,tp,zone)
if g:GetCount()>0 then if g:GetCount()>0 then
local fid=e:GetHandler():GetFieldID() local fid=e:GetHandler():GetFieldID()
local tc=g:GetFirst() local tc=g:GetFirst()
...@@ -53,7 +52,6 @@ function c100266044.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -53,7 +52,6 @@ function c100266044.activate(e,tp,eg,ep,ev,re,r,rp)
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_END)
e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e1:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(fid) e1:SetLabel(fid)
e1:SetLabelObject(g) e1:SetLabelObject(g)
...@@ -76,6 +74,5 @@ end ...@@ -76,6 +74,5 @@ end
function c100266044.rmop(e,tp,eg,ep,ev,re,r,rp) function c100266044.rmop(e,tp,eg,ep,ev,re,r,rp)
local g=e:GetLabelObject() local g=e:GetLabelObject()
local tg=g:Filter(c100266044.rmfilter,nil,e:GetLabel()) local tg=g:Filter(c100266044.rmfilter,nil,e:GetLabel())
g:DeleteGroup()
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT) Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end end
...@@ -16,8 +16,8 @@ end ...@@ -16,8 +16,8 @@ end
function c100268004.ffilter(c) function c100268004.ffilter(c)
return c:IsFaceup() and c:IsCode(15259703) return c:IsFaceup() and c:IsCode(15259703)
end end
function c100268004.con(e) function c100268004.con(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c100268004.ffilter,e:GetHandlerPlayer(),LOCATION_ONFIELD,0,1,nil) return Duel.IsExistingMatchingCard(c100268004.ffilter,tp,LOCATION_ONFIELD,0,1,nil)
end end
function c100268004.filter(c,e,tp) function c100268004.filter(c,e,tp)
return c:IsType(TYPE_TOON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP) return c:IsType(TYPE_TOON) and c:IsCanBeSpecialSummoned(e,0,tp,true,false,POS_FACEUP)
...@@ -37,8 +37,6 @@ function c100268004.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -37,8 +37,6 @@ function c100268004.op(e,tp,eg,ep,ev,re,r,rp)
if #sg>0 then if #sg>0 then
Duel.ConfirmCards(1-tp,sg) Duel.ConfirmCards(1-tp,sg)
local tc=sg:RandomSelect(1-tp,1):GetFirst() local tc=sg:RandomSelect(1-tp,1):GetFirst()
Duel.ConfirmCards(tp,tc)
Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,true,false,POS_FACEUP)
Duel.ShuffleDeck(tp)
end end
end end
...@@ -47,12 +47,15 @@ function c100268006.tdfilter(c,e,tp) ...@@ -47,12 +47,15 @@ function c100268006.tdfilter(c,e,tp)
return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeEffectTarget(e) return c:IsFaceup() and c:IsType(TYPE_MONSTER) and c:IsCanBeEffectTarget(e)
and (c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false)) and (c:IsAbleToDeck() or c:IsCanBeSpecialSummoned(e,0,tp,false,false))
end end
function c100268006.fselect(g,e,tp)
return aux.dncheck(g) and g:IsExists(Card.IsAbleToDeck,2,nil) and g:IsExists(Card.IsCanBeSpecialSummoned,1,nil,e,0,tp,false,false)
end
function c100268006.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100268006.tdtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local dg=Duel.GetMatchingGroup(c100268006.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,e,tp) local dg=Duel.GetMatchingGroup(c100268006.tdfilter,tp,LOCATION_REMOVED,LOCATION_REMOVED,nil,e,tp)
if chkc then return false end if chkc then return false end
if chk==0 then return dg:GetClassCount(Card.GetCode)>=3 and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end if chk==0 then return dg:CheckSubGroup(c100268006.fselect,3,3,e,tp) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=dg:SelectSubGroup(tp,aux.dncheck,false,3,3) local g=dg:SelectSubGroup(tp,c100268006.fselect,false,3,3,e,tp)
Duel.SetTargetCard(g) Duel.SetTargetCard(g)
Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0) Duel.SetOperationInfo(0,CATEGORY_TODECK,g,2,0,0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,1,0,0)
......
...@@ -59,7 +59,7 @@ function c100268009.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -59,7 +59,7 @@ function c100268009.activate(e,tp,eg,ep,ev,re,r,rp)
end end
end end
function c100268009.tdfilter(c) function c100268009.tdfilter(c)
return c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and not c:IsSummonableCard() and c:IsAbleToDeck() return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK) and not c:IsSummonableCard() and c:IsAbleToDeck()
end end
function c100268009.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100268009.tg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100268009.tdfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c100268009.tdfilter(chkc) end
......
...@@ -39,9 +39,9 @@ function c100311001.spcostfilter(c) ...@@ -39,9 +39,9 @@ function c100311001.spcostfilter(c)
return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_DRAGON+RACE_WINDBEAST) return c:IsAbleToRemoveAsCost() and c:IsRace(RACE_DRAGON+RACE_WINDBEAST)
end end
function c100311001.spcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100311001.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100311001.spcostfilter,tp,LOCATION_GRAVE,0,2,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100311001.spcostfilter,tp,LOCATION_GRAVE,0,2,e:GetHandler()) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local sg=Duel.SelectMatchingCard(tp,c100311001.spcostfilter,tp,LOCATION_GRAVE,0,2,2,nil) local sg=Duel.SelectMatchingCard(tp,c100311001.spcostfilter,tp,LOCATION_GRAVE,0,2,2,e:GetHandler())
Duel.Remove(sg,POS_FACEUP,REASON_COST) Duel.Remove(sg,POS_FACEUP,REASON_COST)
end end
function c100311001.sptg(e,tp,eg,ep,ev,re,r,rp,chk) function c100311001.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
...@@ -55,13 +55,13 @@ function c100311001.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -55,13 +55,13 @@ function c100311001.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
function c100311001.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c100311001.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsType(TYPE_MONSTER) and chkc:IsFaceup() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(Card.IsFaceup,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,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,LOCATION_MZONE,1,1,nil) Duel.SelectTarget(tp,aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
end end
function c100311001.eqfilter(c) function c100311001.eqfilter(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup() return (c:IsFaceup() or c:GetEquipTarget()) and c:IsType(TYPE_EQUIP)
end end
function c100311001.disop(e,tp,eg,ep,ev,re,r,rp) function c100311001.disop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -79,24 +79,16 @@ function c100311001.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -79,24 +79,16 @@ function c100311001.disop(e,tp,eg,ep,ev,re,r,rp)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetReset(RESET_EVENT+RESETS_STANDARD) e2:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
if tc:IsType(TYPE_TRAPMONSTER) then local ct=Duel.GetMatchingGroupCount(c100311001.eqfilter,tp,LOCATION_ONFIELD,0,nil)
if ct>0 then
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE) e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE) e3:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e3:SetValue(-ct*1000)
e3:SetReset(RESET_EVENT+RESETS_STANDARD) e3:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e3) tc:RegisterEffect(e3)
end end
local ct=Duel.GetMatchingGroupCount(c100311001.eqfilter,tp,LOCATION_ONFIELD,0,nil)
if ct>0 and tc:IsType(TYPE_MONSTER) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetValue(-ct*1000)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
tc:RegisterEffect(e1)
end
end end
end end
function c100311001.cfilter(c,tp) function c100311001.cfilter(c,tp)
...@@ -105,35 +97,41 @@ end ...@@ -105,35 +97,41 @@ end
function c100311001.eqcon(e,tp,eg,ep,ev,re,r,rp) function c100311001.eqcon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c100311001.cfilter,1,nil,tp) return eg:IsExists(c100311001.cfilter,1,nil,tp)
end end
function c100311001.filter(c,e,tp) function c100311001.chkfilter(c,tp)
return not c:IsForbidden() and c:CheckUniqueOnField(tp,LOCATION_SZONE)
end
function c100311001.filter(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==1-tp return c:IsType(TYPE_MONSTER) and c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==1-tp
and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and not c:IsForbidden() and c:IsLocation(LOCATION_GRAVE) and c:IsReason(REASON_BATTLE) and c100311001.chkfilter(c,tp)
end end
function c100311001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100311001.eqtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 local g=eg:Filter(c100311001.filter,nil,tp)
and eg:IsExists(c100311001.filter,1,nil,e,tp) end if chk==0 then return #g>0 and Duel.GetLocationCount(tp,LOCATION_SZONE)>=#g end
local g=eg:Filter(c100311001.filter,nil,e,tp) Duel.SetTargetCard(g)
local tg=nil
if g:GetCount()>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
tg=g:Select(tp,1,1,nil)
else
tg=g
end
Duel.SetTargetCard(tg)
Duel.SetOperationInfo(0,CATEGORY_LEAVE_GRAVE,tg,1,0,0)
end end
function c100311001.eqop(e,tp,eg,ep,ev,re,r,rp) function c100311001.eqop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=Duel.GetFirstTarget() local g=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS):Filter(Card.IsRelateToEffect,nil,e):Filter(aux.NecroValleyFilter(c100311001.chkfilter),nil,tp)
if c:IsFaceup() and tc:IsRelateToEffect(e) then local ft=Duel.GetLocationCount(tp,LOCATION_SZONE)
if Duel.Equip(tp,tc,c,true,true) then if c:IsFaceup() and c:IsRelateToEffect(e) and #g>0 and ft>0 then
local e1=Effect.CreateEffect(c) local sg=nil
e1:SetType(EFFECT_TYPE_SINGLE) if #g>ft then
e1:SetCode(EFFECT_EQUIP_LIMIT) sg=g:Select(tp,ft,ft,nil)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) else
e1:SetValue(c100311001.eqlimit) sg=g
tc:RegisterEffect(e1) end
local tc=sg:GetFirst()
while tc do
if Duel.Equip(tp,tc,c,true,true) then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_EQUIP_LIMIT)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(c100311001.eqlimit)
tc:RegisterEffect(e1)
end
tc=sg:GetNext()
end end
Duel.EquipComplete() Duel.EquipComplete()
end end
......
...@@ -21,12 +21,12 @@ function c100311051.initial_effect(c) ...@@ -21,12 +21,12 @@ function c100311051.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--remove --remove
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(33823832,1)) e2:SetDescription(aux.Stringid(100311051,1))
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCategory(CATEGORY_REMOVE) e2:SetCategory(CATEGORY_REMOVE)
e2:SetCode(EVENT_BATTLED) e2:SetCode(EVENT_BATTLED)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1) e2:SetCountLimit(1,100311051+100)
e2:SetCondition(c100311051.rmcon) e2:SetCondition(c100311051.rmcon)
e2:SetTarget(c100311051.rmtg) e2:SetTarget(c100311051.rmtg)
e2:SetOperation(c100311051.rmop) e2:SetOperation(c100311051.rmop)
...@@ -37,6 +37,7 @@ function c100311051.initial_effect(c) ...@@ -37,6 +37,7 @@ function c100311051.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O) e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY) e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED) e3:SetCode(EVENT_DESTROYED)
e3:SetCountLimit(1,100311051+200)
e3:SetCondition(c100311051.descon) e3:SetCondition(c100311051.descon)
e3:SetTarget(c100311051.destg) e3:SetTarget(c100311051.destg)
e3:SetOperation(c100311051.desop) e3:SetOperation(c100311051.desop)
...@@ -50,6 +51,7 @@ function c100311051.negcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -50,6 +51,7 @@ function c100311051.negcon(e,tp,eg,ep,ev,re,r,rp)
end end
function c100311051.negcost(e,tp,eg,ep,ev,re,r,rp,chk) function c100311051.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100311051.cfilter,tp,LOCATION_GRAVE,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c100311051.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c100311051.cfilter,tp,LOCATION_GRAVE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100311051.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST) Duel.Remove(g,POS_FACEUP,REASON_COST)
end end
...@@ -69,7 +71,7 @@ function c100311051.rmcon(e,tp,eg,ep,ev,re,r,rp) ...@@ -69,7 +71,7 @@ function c100311051.rmcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
e:SetLabelObject(bc) e:SetLabelObject(bc)
return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) return bc and bc:IsStatus(STATUS_BATTLE_DESTROYED) and c:IsStatus(STATUS_OPPO_BATTLE) and bc:IsControler(1-tp) and bc:IsRelateToBattle()
end end
function c100311051.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) function c100311051.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
...@@ -78,7 +80,7 @@ function c100311051.rmtg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -78,7 +80,7 @@ function c100311051.rmtg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c100311051.rmop(e,tp,eg,ep,ev,re,r,rp) function c100311051.rmop(e,tp,eg,ep,ev,re,r,rp)
local bc=e:GetLabelObject() local bc=e:GetLabelObject()
if bc:IsRelateToBattle() and bc:IsAbleToRemove() then if bc:IsRelateToBattle() and bc:IsControler(1-tp) then
Duel.Remove(bc,POS_FACEUP,REASON_EFFECT) Duel.Remove(bc,POS_FACEUP,REASON_EFFECT)
end end
end end
......
...@@ -72,7 +72,8 @@ function c100339006.dmop(e,tp,eg,ep,ev,re,r,rp) ...@@ -72,7 +72,8 @@ function c100339006.dmop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPPO)
local g=Duel.SelectMatchingCard(tp,c100339006.dmfilter,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectMatchingCard(tp,c100339006.dmfilter,tp,0,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc and tc:IsFaceup() and tc:GetBaseAttack()>0 then if tc then
Duel.HintSelection(g)
Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT) Duel.Damage(1-tp,tc:GetBaseAttack(),REASON_EFFECT)
end end
end end
......
...@@ -45,10 +45,12 @@ function c100339031.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -45,10 +45,12 @@ function c100339031.activate(e,tp,eg,ep,ev,re,r,rp)
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP_ATTACK) then spos=spos+POS_FACEUP_ATTACK end
if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end if tc:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEDOWN_DEFENSE) then spos=spos+POS_FACEDOWN_DEFENSE end
if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end if spos~=0 then Duel.SpecialSummon(tc,0,tp,tp,false,false,spos) end
if tc:IsFacedown() then Duel.ConfirmCards(1-tp,tc) end
end end
local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil) local mg=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_MZONE,0,nil)
local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil) local g=Duel.GetMatchingGroup(Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,nil)
if mg:GetClassCount(Card.GetAttribute)>=2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100339031,1)) then if mg:GetClassCount(Card.GetAttribute)>=2 and g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(100339031,1)) then
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil) local g=Duel.SelectMatchingCard(tp,Card.IsFaceup,tp,LOCATION_ONFIELD,LOCATION_ONFIELD,1,1,nil)
if g:GetCount()>0 then if g:GetCount()>0 then
......
...@@ -21,6 +21,7 @@ function c101102002.initial_effect(c) ...@@ -21,6 +21,7 @@ function c101102002.initial_effect(c)
e2:SetDescription(aux.Stringid(101102002,1)) e2:SetDescription(aux.Stringid(101102002,1))
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE) e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,101102102)
e2:SetCost(aux.bfgcost) e2:SetCost(aux.bfgcost)
e2:SetTarget(c101102002.sptarget) e2:SetTarget(c101102002.sptarget)
e2:SetOperation(c101102002.spoperation) e2:SetOperation(c101102002.spoperation)
...@@ -43,15 +44,14 @@ function c101102002.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,15 +44,14 @@ function c101102002.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect() Duel.BreakEffect()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetCode(EFFECT_UPDATE_LEVEL) e1:SetCode(EFFECT_UPDATE_LEVEL)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetValue(1) e1:SetValue(1)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
end end
function c101102002.filter(c,e,tp) function c101102002.filter(c,e,tp)
return c:IsSetCard(0x10db) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x10db) and not c:IsCode(101102002) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c101102002.sptarget(e,tp,eg,ep,ev,re,r,rp,chk) function c101102002.sptarget(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
...@@ -62,7 +62,7 @@ function c101102002.spoperation(e,tp,eg,ep,ev,re,r,rp) ...@@ -62,7 +62,7 @@ function c101102002.spoperation(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c101102002.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp) local g=Duel.SelectMatchingCard(tp,c101102002.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP) and Duel.SelectYesNo(tp,aux.Stringid(101102002,2)) then if g:GetCount()>0 and Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)~=0 and Duel.SelectYesNo(tp,aux.Stringid(101102002,2)) then
Duel.BreakEffect() Duel.BreakEffect()
local tc=g:GetFirst() local tc=g:GetFirst()
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
......
...@@ -7,6 +7,7 @@ function c101102005.initial_effect(c) ...@@ -7,6 +7,7 @@ function c101102005.initial_effect(c)
e1:SetDescription(aux.Stringid(101102005,0)) e1:SetDescription(aux.Stringid(101102005,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,101102005) e1:SetCountLimit(1,101102005)
e1:SetCondition(c101102005.spcon) e1:SetCondition(c101102005.spcon)
...@@ -38,8 +39,9 @@ function c101102005.sstg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,8 +39,9 @@ function c101102005.sstg(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101102005.ssop(e,tp,eg,ep,ev,re,r,rp) function c101102005.ssop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -101,13 +101,6 @@ function c101102019.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -101,13 +101,6 @@ function c101102019.operation(e,tp,eg,ep,ev,re,r,rp)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
nc:RegisterEffect(e2) nc:RegisterEffect(e2)
if nc:IsType(TYPE_TRAPMONSTER) then
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_TRAPMONSTER)
e3:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
nc:RegisterEffect(e3)
end
nc=b2:GetNext() nc=b2:GetNext()
end end
end end
......
...@@ -32,7 +32,7 @@ function c101102032.initial_effect(c) ...@@ -32,7 +32,7 @@ function c101102032.initial_effect(c)
end end
function c101102032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102032.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAttackPos() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and chkc:IsAttackPos() end
if chk==0 then return Duel.IsExistingTarget(c101102032.desfilter,tp,0,LOCATION_MZONE,1,nil) end if chk==0 then return Duel.IsExistingTarget(Card.IsAttackPos,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil) local g=Duel.SelectTarget(tp,Card.IsAttackPos,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
...@@ -30,7 +30,7 @@ function c101102033.initial_effect(c) ...@@ -30,7 +30,7 @@ function c101102033.initial_effect(c)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c101102033.repfilter(c,tp) function c101102033.repfilter(c,tp)
return c:IsSetCard(0x24d) and c:IsType(TYPE_FUSION) and c:IsControler(tp) and c:IsLocation(LOCATION_ONFIELD) return c:IsFaceup() and c:IsSetCard(0x24d) and c:IsType(TYPE_FUSION) and c:IsControler(tp) and c:IsLocation(LOCATION_MZONE)
and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE) and c:IsReason(REASON_EFFECT) and not c:IsReason(REASON_REPLACE)
end end
function c101102033.desfilter(c,e,tp) function c101102033.desfilter(c,e,tp)
...@@ -83,11 +83,13 @@ function c101102033.disop(e,tp,eg,ep,ev,re,r,rp) ...@@ -83,11 +83,13 @@ function c101102033.disop(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_DISABLE) e1:SetCode(EFFECT_DISABLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(e:GetHandler()) local e2=Effect.CreateEffect(e:GetHandler())
e2:SetType(EFFECT_TYPE_SINGLE) e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE_EFFECT) e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e2:SetValue(RESET_TURN_SET) e2:SetValue(RESET_TURN_SET)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END) e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2) tc:RegisterEffect(e2)
......
...@@ -29,9 +29,10 @@ function c101102034.initial_effect(c) ...@@ -29,9 +29,10 @@ function c101102034.initial_effect(c)
--negate --negate
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101102034,1)) e3:SetDescription(aux.Stringid(101102034,1))
e3:SetCategory(CATEGORY_DISABLE) e3:SetCategory(CATEGORY_NEGATE)
e3:SetType(EFFECT_TYPE_QUICK_O) e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_CHAINING) e3:SetCode(EVENT_CHAINING)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,101102034) e3:SetCountLimit(1,101102034)
e3:SetCondition(c101102034.discon) e3:SetCondition(c101102034.discon)
...@@ -65,11 +66,11 @@ function c101102034.discon(e,tp,eg,ep,ev,re,r,rp) ...@@ -65,11 +66,11 @@ function c101102034.discon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end if rp~=1-tp or not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) or c:IsStatus(STATUS_BATTLE_DESTROYED) then return false end
local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return tg and tg:IsContains(c) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainDisablable(ev) and Duel.IsExistingMatchingCard(c101102034.cfilter,tp,LOCATION_MZONE,0,2,nil) return tg and tg:IsContains(c) and re:IsActiveType(TYPE_SPELL+TYPE_TRAP) and Duel.IsChainNegatable(ev) and Duel.IsExistingMatchingCard(c101102034.cfilter,tp,LOCATION_MZONE,0,2,nil)
end end
function c101102034.distg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102034.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_DISABLE,eg,1,0,0) Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0)
end end
function c101102034.disop(e,tp,eg,ep,ev,re,r,rp,chk) function c101102034.disop(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then if Duel.NegateActivation(ev) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and re:GetHandler():IsRelateToEffect(re) then
......
...@@ -39,9 +39,6 @@ end ...@@ -39,9 +39,6 @@ end
function c101102041.mgfilter(c) function c101102041.mgfilter(c)
return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK) return c:IsType(TYPE_XYZ) and c:IsAttribute(ATTRIBUTE_DARK)
end end
function c101102041.tgfilter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c101102041.operation(e,tp,eg,ep,ev,re,r,rp) function c101102041.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if c:IsFaceup() and c:IsRelateToEffect(e) then if c:IsFaceup() and c:IsRelateToEffect(e) then
...@@ -54,7 +51,8 @@ function c101102041.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -54,7 +51,8 @@ function c101102041.operation(e,tp,eg,ep,ev,re,r,rp)
c:RegisterEffect(e1) c:RegisterEffect(e1)
local mg=c:GetOverlayGroup() local mg=c:GetOverlayGroup()
if mg:IsExists(c101102041.mgfilter,1,nil) then if mg:IsExists(c101102041.mgfilter,1,nil) then
local g=Duel.GetMatchingGroup(c101102041.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,c) local g=Duel.GetMatchingGroup(aux.disfilter1,tp,LOCATION_MZONE,LOCATION_MZONE,c)
if #g>0 then Duel.BreakEffect() end
for tc in aux.Next(g) do for tc in aux.Next(g) do
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -30,18 +30,20 @@ function c101102057.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -30,18 +30,20 @@ function c101102057.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c101102057.activate(e,tp,eg,ep,ev,re,r,rp) function c101102057.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)==0 then return end if Duel.DiscardHand(tp,Card.IsDiscardable,1,1,REASON_EFFECT+REASON_DISCARD,nil,REASON_EFFECT)~=0 then
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 or not Duel.IsPlayerCanSpecialSummonMonster(tp,101102157,0x24d,0x4011,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end if ft>0 and Duel.IsPlayerCanSpecialSummonMonster(tp,101102157,0x24d,0x4011,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end if Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
local count=0 local count=0
for i=1,ft do for i=1,ft do
local token=Duel.CreateToken(tp,101102157) local token=Duel.CreateToken(tp,101102157)
if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)~=0 and count==0 then if Duel.SpecialSummonStep(token,0,tp,tp,false,false,POS_FACEUP)~=0 and count==0 then
count=2 count=2
end
end
Duel.SpecialSummonComplete()
end end
end end
Duel.SpecialSummonComplete()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
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_END)
......
...@@ -50,10 +50,11 @@ function c101102058.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -50,10 +50,11 @@ function c101102058.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0) Duel.SetOperationInfo(0,CATEGORY_TOKEN,nil,1,0,0)
end end
function c101102058.spop(e,tp,eg,ep,ev,re,r,rp) function c101102058.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 if Duel.GetLocationCount(tp,LOCATION_MZONE)>0
or not Duel.IsPlayerCanSpecialSummonMonster(tp,101102158,0x24d,0x4011,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then return end and Duel.IsPlayerCanSpecialSummonMonster(tp,101102158,0x24d,0x4011,0,0,2,RACE_WARRIOR,ATTRIBUTE_LIGHT) then
local token=Duel.CreateToken(tp,101102158) local token=Duel.CreateToken(tp,101102158)
Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(token,0,tp,tp,false,false,POS_FACEUP)
end
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
......
...@@ -19,6 +19,7 @@ function c101102059.cfilter(c) ...@@ -19,6 +19,7 @@ function c101102059.cfilter(c)
end end
function c101102059.ffilter(c,tp) function c101102059.ffilter(c,tp)
return c:IsPreviousSetCard(0x24d) and c:GetPreviousControler()==tp and c:GetPreviousTypeOnField()&TYPE_FUSION~=0 return c:IsPreviousSetCard(0x24d) and c:GetPreviousControler()==tp and c:GetPreviousTypeOnField()&TYPE_FUSION~=0
and c:IsPreviousPosition(POS_FACEUP)
end end
function c101102059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c101102059.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
......
...@@ -27,16 +27,18 @@ function c101102062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -27,16 +27,18 @@ function c101102062.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500) Duel.SetOperationInfo(0,CATEGORY_RECOVER,nil,0,tp,500)
end end
function c101102062.cfilter(c) function c101102062.cfilter(c)
return (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER) and not c:IsPublic() return (c:IsSetCard(0xb2) or c:IsSetCard(0x107)) and c:IsType(TYPE_MONSTER) and not c:IsPublic() and c:IsAbleToDeck()
end end
function c101102062.activate(e,tp,eg,ep,ev,re,r,rp) function c101102062.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if not tc:IsRelateToEffect(e) then return end if not tc:IsRelateToEffect(e) then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then if Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM) local d=Duel.GetChainInfo(0,CHAININFO_TARGET_PARAM)
if Duel.Recover(tp,d,REASON_EFFECT)<=0 then return end if Duel.Recover(tp,d,REASON_EFFECT)<=0 then return end
if not Duel.SelectYesNo(tp,aux.Stringid(101102062,0)) then return end local tg=Duel.GetMatchingGroup(c101102062.cfilter,tp,LOCATION_HAND,0,nil)
if #tg<=0 or not Duel.SelectYesNo(tp,aux.Stringid(101102062,0)) then return end
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,c101102062.cfilter,tp,LOCATION_HAND,0,1,63,nil) local g=Duel.SelectMatchingCard(tp,c101102062.cfilter,tp,LOCATION_HAND,0,1,63,nil)
if g:GetCount()==0 then return end if g:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
......
...@@ -64,11 +64,9 @@ function c101102068.ssetfilter(c) ...@@ -64,11 +64,9 @@ function c101102068.ssetfilter(c)
return c:IsType(TYPE_SPELL) and c:IsSetCard(0x95) and c:IsSSetable() return c:IsType(TYPE_SPELL) and c:IsSetCard(0x95) and c:IsSSetable()
end end
function c101102068.ssettg(e,tp,eg,ep,ev,re,r,rp,chk) function c101102068.ssettg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and if chk==0 then return Duel.IsExistingMatchingCard(c101102068.ssetfilter,tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
Duel.IsExistingMatchingCard(aux.NecroValleyFilter(c101102068.ssetfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,nil) end
end end
function c101102068.ssetop(e,tp,eg,ep,ev,re,r,rp) function c101102068.ssetop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_SZONE)<1 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101102068.ssetfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c101102068.ssetfilter),tp,LOCATION_GRAVE+LOCATION_DECK,0,1,1,nil)
if g then if g then
......
...@@ -44,11 +44,12 @@ function c101102069.tgfilter(c) ...@@ -44,11 +44,12 @@ function c101102069.tgfilter(c)
return c:IsFaceup() and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ) return c:IsFaceup() and c:IsSetCard(0xba) and c:IsType(TYPE_XYZ)
end end
function c101102069.operation(e,tp,eg,ep,ev,re,r,rp) function c101102069.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()>0 then if Duel.NegateActivation(ev) and re:GetHandler():IsRelateToEffect(re) and Duel.Destroy(eg,REASON_EFFECT)>0 and e:GetLabel()==1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SELF)
local g=Duel.SelectMatchingCard(tp,c101102069.tgfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectMatchingCard(tp,c101102069.tgfilter,tp,LOCATION_MZONE,0,1,1,nil)
local tc=g:GetFirst() local tc=g:GetFirst()
if tc then if tc then
Duel.HintSelection(g)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
......
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