Commit 7b980111 authored by argon.sun's avatar argon.sun

fix

parent 4b2230a7
...@@ -77,7 +77,8 @@ function c1992816.dacost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,7 +77,8 @@ function c1992816.dacost(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c1992816.daop(e,tp,eg,ep,ev,re,r,rp) function c1992816.daop(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)
and Duel.IsExistingMatchingCard(c1992816.dafilter,tp,0,LOCATION_MZONE,1,nil,c:GetAttack()) then
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:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
......
...@@ -20,7 +20,7 @@ function c4335645.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -20,7 +20,7 @@ function c4335645.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsDestructable() end
if chk==0 then return true end if chk==0 then return true end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,tp) local g=Duel.SelectTarget(tp,Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0) Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end end
function c4335645.operation(e,tp,eg,ep,ev,re,r,rp) function c4335645.operation(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -18,7 +18,7 @@ function c56074358.initial_effect(c) ...@@ -18,7 +18,7 @@ function c56074358.initial_effect(c)
e3:SetType(EFFECT_TYPE_FIELD) e3:SetType(EFFECT_TYPE_FIELD)
e3:SetCode(EFFECT_UPDATE_ATTACK) e3:SetCode(EFFECT_UPDATE_ATTACK)
e3:SetRange(LOCATION_SZONE) e3:SetRange(LOCATION_SZONE)
e3:SetTargetRange(LOCATION_MZONE,0) e3:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26)) e3:SetTarget(aux.TargetBoolFunction(Card.IsSetCard,0x26))
e3:SetValue(c56074358.atkval) e3:SetValue(c56074358.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
......
...@@ -17,14 +17,28 @@ function c61314842.xyzfilter(c,mg) ...@@ -17,14 +17,28 @@ function c61314842.xyzfilter(c,mg)
if c.xyz_count~=2 then return false end if c.xyz_count~=2 then return false end
return c:IsXyzSummonable(mg) return c:IsXyzSummonable(mg)
end end
function c61314842.mfilter1(c,exg)
return exg:IsExists(c61314842.mfilter2,1,nil,c)
end
function c61314842.mfilter2(c,mc)
return c.xyz_filter(mc)
end
function c61314842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c61314842.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end if chkc then return false end
local mg=Duel.GetMatchingGroup(c61314842.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,23516703) or c23516703[tp]==0) if chk==0 then return (not Duel.IsPlayerAffectedByEffect(tp,23516703) or c23516703[tp]==0)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and mg:GetCount()>1
and Duel.IsExistingTarget(c61314842.filter,tp,LOCATION_GRAVE,0,2,nil,e,tp) end and Duel.IsExistingMatchingCard(c61314842.xyzfilter,tp,LOCATION_EXTRA,0,1,nil,mg) end
local exg=Duel.GetMatchingGroup(c61314842.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg1=mg:FilterSelect(tp,c61314842.mfilter1,1,1,nil,exg)
local tc1=sg1:GetFirst()
local exg2=exg:Filter(c61314842.mfilter2,nil,tc1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectTarget(tp,c61314842.filter,tp,LOCATION_GRAVE,0,2,2,nil,e,tp) local sg2=mg:FilterSelect(tp,c61314842.mfilter1,1,1,tc1,exg2)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,g,2,0,0) sg1:Merge(sg2)
Duel.SetTargetCard(sg1)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,sg1,2,0,0)
end end
function c61314842.filter2(c,e,tp) function c61314842.filter2(c,e,tp)
return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsRelateToEffect(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
...@@ -40,8 +54,6 @@ function c61314842.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -40,8 +54,6 @@ function c61314842.activate(e,tp,eg,ep,ev,re,r,rp)
if xyzg:GetCount()>0 then if xyzg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local xyz=xyzg:Select(tp,1,1,nil):GetFirst() local xyz=xyzg:Select(tp,1,1,nil):GetFirst()
xyz:SetMaterial(g) Duel.XyzSummon(tp,xyz,g)
Duel.Overlay(xyz,g)
Duel.SpecialSummon(xyz,SUMMON_TYPE_XYZ,tp,tp,false,false,POS_FACEUP)
end end
end end
...@@ -22,6 +22,7 @@ function c62437430.initial_effect(c) ...@@ -22,6 +22,7 @@ function c62437430.initial_effect(c)
end end
function c62437430.filter(c) function c62437430.filter(c)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() and not c:IsHasEffect(EFFECT_NECRO_VALLEY) return c:IsAttribute(ATTRIBUTE_WATER) and c:IsAbleToRemove() and not c:IsHasEffect(EFFECT_NECRO_VALLEY)
and (not c:IsLocation(LOCATION_MZONE) or c:IsFaceup())
end end
function c62437430.target(e,tp,eg,ep,ev,re,r,rp,chk) function c62437430.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c62437430.filter,tp,0x16,0,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c62437430.filter,tp,0x16,0,1,nil) end
......
...@@ -44,7 +44,7 @@ function c770365.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -44,7 +44,7 @@ function c770365.operation(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetDecktopGroup(tp,5) local g=Duel.GetDecktopGroup(tp,5)
local ct=g:FilterCount(c770365.filter,nil) local ct=g:FilterCount(c770365.filter,nil)
local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil) local sg=Duel.GetMatchingGroup(Card.IsDestructable,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
if ct>0 and sg:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(770365,1)) then if ct>0 and sg:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local dg=sg:Select(tp,1,ct,nil) local dg=sg:Select(tp,1,ct,nil)
Duel.Destroy(dg,REASON_EFFECT) Duel.Destroy(dg,REASON_EFFECT)
......
...@@ -48,7 +48,7 @@ end ...@@ -48,7 +48,7 @@ end
function c89521713.thop(e,tp,eg,ep,ev,re,r,rp) function c89521713.thop(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 tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 then if tc:IsRelateToEffect(e) and tc:IsFaceup() and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
if c:IsRelateToEffect(e) and c:IsFaceup() then if c:IsRelateToEffect(e) and c:IsFaceup() then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
......
...@@ -8,7 +8,8 @@ function c95352218.initial_effect(c) ...@@ -8,7 +8,8 @@ function c95352218.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--adjust --adjust
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e2:SetDescription(aux.Stringid(95352218,0))
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE) e2:SetProperty(EFFECT_FLAG_IGNORE_IMMUNE)
e2:SetCode(EVENT_PHASE+PHASE_STANDBY) e2:SetCode(EVENT_PHASE+PHASE_STANDBY)
e2:SetRange(LOCATION_SZONE) e2:SetRange(LOCATION_SZONE)
...@@ -33,6 +34,7 @@ function c95352218.filter2(c,lv) ...@@ -33,6 +34,7 @@ function c95352218.filter2(c,lv)
return c:IsFaceup() and c:GetLevel()~=lv return c:IsFaceup() and c:GetLevel()~=lv
end end
function c95352218.adjustop(e,tp,eg,ep,ev,re,r,rp) function c95352218.adjustop(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local turnp=Duel.GetTurnPlayer() local turnp=Duel.GetTurnPlayer()
local g=Duel.GetMatchingGroup(c95352218.filter1,turnp,LOCATION_MZONE,0,nil) local g=Duel.GetMatchingGroup(c95352218.filter1,turnp,LOCATION_MZONE,0,nil)
if g:GetCount()<2 then return end if g:GetCount()<2 then return end
......
...@@ -11,7 +11,8 @@ function c95642274.initial_effect(c) ...@@ -11,7 +11,8 @@ function c95642274.initial_effect(c)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c95642274.target(e,tp,eg,ep,ev,re,r,rp,chk) function c95642274.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler()) end if chk==0 then return Duel.IsExistingMatchingCard(Card.IsAbleToDeck,tp,LOCATION_HAND,0,1,e:GetHandler())
and not Duel.IsExistingMatchingCard(Card.IsPublic,tp,LOCATION_HAND,0,1,e:GetHandler()) end
Duel.SetTargetPlayer(tp) Duel.SetTargetPlayer(tp)
Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_TODECK,nil,1,tp,LOCATION_HAND)
end end
......
...@@ -5,7 +5,6 @@ function c97997309.initial_effect(c) ...@@ -5,7 +5,6 @@ function c97997309.initial_effect(c)
e1:SetDescription(aux.Stringid(97997309,0)) e1:SetDescription(aux.Stringid(97997309,0))
e1:SetCategory(CATEGORY_TOHAND) e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE) e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c97997309.condition) e1:SetCondition(c97997309.condition)
...@@ -18,7 +17,6 @@ function c97997309.initial_effect(c) ...@@ -18,7 +17,6 @@ function c97997309.initial_effect(c)
e2:SetDescription(aux.Stringid(97997309,1)) e2:SetDescription(aux.Stringid(97997309,1))
e2:SetCategory(CATEGORY_POSITION) e2:SetCategory(CATEGORY_POSITION)
e2:SetType(EFFECT_TYPE_ACTIVATE) e2:SetType(EFFECT_TYPE_ACTIVATE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetCode(EVENT_FREE_CHAIN) e2:SetCode(EVENT_FREE_CHAIN)
e2:SetHintTiming(0,0x1c0+TIMING_BATTLE_PHASE) e2:SetHintTiming(0,0x1c0+TIMING_BATTLE_PHASE)
e2:SetCondition(c97997309.condition) e2:SetCondition(c97997309.condition)
...@@ -31,7 +29,6 @@ function c97997309.initial_effect(c) ...@@ -31,7 +29,6 @@ function c97997309.initial_effect(c)
e3:SetDescription(aux.Stringid(97997309,2)) e3:SetDescription(aux.Stringid(97997309,2))
e3:SetCategory(CATEGORY_REMOVE) e3:SetCategory(CATEGORY_REMOVE)
e3:SetType(EFFECT_TYPE_ACTIVATE) e3:SetType(EFFECT_TYPE_ACTIVATE)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetCode(EVENT_FREE_CHAIN) e3:SetCode(EVENT_FREE_CHAIN)
e3:SetHintTiming(0,0x1e0) e3:SetHintTiming(0,0x1e0)
e3:SetCondition(c97997309.condition) e3:SetCondition(c97997309.condition)
...@@ -63,32 +60,31 @@ end ...@@ -63,32 +60,31 @@ end
function c97997309.filter1(c) function c97997309.filter1(c)
return c:IsFacedown() and c:IsAbleToHand() return c:IsFacedown() and c:IsAbleToHand()
end end
function c97997309.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97997309.target1(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_SZONE) and c97997309.filter1(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end
if chk==0 then return Duel.IsExistingTarget(c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,e:GetHandler()) end local g=Duel.GetMatchingGroup(c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,e:GetHandler())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
local g=Duel.SelectTarget(tp,c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0)
end end
function c97997309.activate1(e,tp,eg,ep,ev,re,r,rp) function c97997309.activate1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
if tc:IsFacedown() and tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c97997309.filter1,tp,LOCATION_SZONE,LOCATION_SZONE,1,1,e:GetHandler())
Duel.SendtoHand(tc,nil,REASON_EFFECT) if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
end end
end end
function c97997309.filter2(c) function c97997309.filter2(c)
return not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet() return not c:IsPosition(POS_FACEUP_ATTACK) or c:IsCanTurnSet()
end end
function c97997309.target2(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97997309.target2(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c97997309.filter2(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end local g=Duel.GetMatchingGroup(c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE) Duel.SetOperationInfo(0,CATEGORY_POSITION,g,1,0,0)
local g=Duel.SelectTarget(tp,c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_POSITION,g,g:GetCount(),0,0)
end end
function c97997309.activate2(e,tp,eg,ep,ev,re,r,rp) function c97997309.activate2(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_POSCHANGE)
if tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c97997309.filter2,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
local tc=g:GetFirst()
if tc then
if tc:IsPosition(POS_FACEUP_ATTACK) then if tc:IsPosition(POS_FACEUP_ATTACK) then
Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE) Duel.ChangePosition(tc,POS_FACEDOWN_DEFENCE)
else else
...@@ -100,16 +96,15 @@ end ...@@ -100,16 +96,15 @@ end
function c97997309.filter3(c) function c97997309.filter3(c)
return c:IsAbleToRemove() return c:IsAbleToRemove()
end end
function c97997309.target3(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c97997309.target3(e,tp,eg,ep,ev,re,r,rp,chk)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and c97997309.filter3(chkc) end if chk==0 then return Duel.IsExistingMatchingCard(c97997309.filter3,tp,0,LOCATION_ONFIELD,1,nil) end
if chk==0 then return Duel.IsExistingTarget(c97997309.filter3,tp,0,LOCATION_ONFIELD,1,nil) end local g=Duel.GetMatchingGroup(c97997309.filter3,tp,0,LOCATION_ONFIELD,nil)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE) Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
local g=Duel.SelectTarget(tp,c97997309.filter3,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,g:GetCount(),0,0)
end end
function c97997309.activate3(e,tp,eg,ep,ev,re,r,rp) function c97997309.activate3(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
if tc:IsRelateToEffect(e) then local g=Duel.SelectMatchingCard(tp,c97997309.filter3,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT) if g:GetCount()>0 then
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end end
end end
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