Commit ad1c4589 authored by mercury233's avatar mercury233

fix missing tp

parent 4fb21466
...@@ -17,7 +17,7 @@ function c23536866.filter(c,e,tp) ...@@ -17,7 +17,7 @@ function c23536866.filter(c,e,tp)
return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866) return c:IsLevel(5) and c:IsAttribute(ATTRIBUTE_WATER) and not c:IsCode(23536866)
and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeEffectTarget(e) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c23536866.xyzfilter(c,mg) function c23536866.xyzfilter(c,mg,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 return c:IsAttribute(ATTRIBUTE_WATER) and c:IsXyzSummonable(mg,2,2) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c23536866.mfilter1(c,mg,exg) function c23536866.mfilter1(c,mg,exg)
...@@ -29,7 +29,7 @@ end ...@@ -29,7 +29,7 @@ end
function c23536866.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c23536866.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(c23536866.filter,tp,LOCATION_GRAVE,0,nil,e,tp) local mg=Duel.GetMatchingGroup(c23536866.filter,tp,LOCATION_GRAVE,0,nil,e,tp)
local exg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg) local exg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,mg,tp)
if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2) if chk==0 then return Duel.IsPlayerCanSpecialSummonCount(tp,2)
and not Duel.IsPlayerAffectedByEffect(tp,59822133) and not Duel.IsPlayerAffectedByEffect(tp,59822133)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>1 and Duel.GetLocationCount(tp,LOCATION_MZONE)>1
...@@ -70,7 +70,7 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -70,7 +70,7 @@ function c23536866.operation(e,tp,eg,ep,ev,re,r,rp)
local e4=e3:Clone() local e4=e3:Clone()
tc2:RegisterEffect(e4) tc2:RegisterEffect(e4)
Duel.SpecialSummonComplete() Duel.SpecialSummonComplete()
local xyzg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,g) local xyzg=Duel.GetMatchingGroup(c23536866.xyzfilter,tp,LOCATION_EXTRA,0,nil,g,tp)
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()
......
...@@ -28,7 +28,7 @@ function c25148255.mfilter(c,e,tp,mc) ...@@ -28,7 +28,7 @@ function c25148255.mfilter(c,e,tp,mc)
return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x43) and not c:IsType(TYPE_TUNER) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg) and Duel.IsExistingMatchingCard(c25148255.scfilter,tp,LOCATION_EXTRA,0,1,nil,mg)
end end
function c25148255.scfilter(c,mg) function c25148255.scfilter(c,mg,tp)
return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0 return aux.IsMaterialListSetCard(c,0x1017) and c:IsSynchroSummonable(nil,mg) and Duel.GetLocationCountFromEx(tp,tp,mg,c)>0
end end
function c25148255.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c25148255.sctg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
...@@ -48,7 +48,7 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,7 @@ function c25148255.scop(e,tp,eg,ep,ev,re,r,rp)
if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end if not tc:IsRelateToEffect(e) or Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)==0 then return end
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
local mg=Group.FromCards(c,tc) local mg=Group.FromCards(c,tc)
local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg) local g=Duel.GetMatchingGroup(c25148255.scfilter,tp,LOCATION_EXTRA,0,nil,mg,tp)
if g:GetCount()>0 then if g:GetCount()>0 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sg=g:Select(tp,1,1,nil) local sg=g:Select(tp,1,1,nil)
......
...@@ -56,12 +56,12 @@ function c40227329.initial_effect(c) ...@@ -56,12 +56,12 @@ function c40227329.initial_effect(c)
c:RegisterEffect(e7) c:RegisterEffect(e7)
end end
function c40227329.damcon(e) function c40227329.damcon(e)
return Duel.GetFlagEffect(tp,40227329)==0 return Duel.GetFlagEffect(e:GetHandlerPlayer(),40227329)==0
end end
function c40227329.damval(e,re,val,r,rp,rc) function c40227329.damval(e,re,val,r,rp,rc)
local c=e:GetHandler() local c=e:GetHandler()
if bit.band(r,REASON_EFFECT)~=0 and c:GetFlagEffect(40227329)==0 then if bit.band(r,REASON_EFFECT)~=0 and c:GetFlagEffect(40227329)==0 then
Duel.RegisterFlagEffect(tp,40227329,RESET_PHASE+PHASE_END,0,1) Duel.RegisterFlagEffect(e:GetHandlerPlayer(),40227329,RESET_PHASE+PHASE_END,0,1)
return 0 return 0
end end
return val return val
......
...@@ -24,19 +24,19 @@ function c45943123.initial_effect(c) ...@@ -24,19 +24,19 @@ function c45943123.initial_effect(c)
e2:SetOperation(c45943123.drop) e2:SetOperation(c45943123.drop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
function c45943123.cfilter(c) function c45943123.cfilter(c,tp)
return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT) return c:IsFaceup() and c:IsAttribute(ATTRIBUTE_WATER) and c:IsType(TYPE_XYZ) and c:CheckRemoveOverlayCard(tp,1,REASON_EFFECT)
end end
function c45943123.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c45943123.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND) local b=e:IsHasType(EFFECT_TYPE_ACTIVATE) and e:GetHandler():IsLocation(LOCATION_HAND)
local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0) local ct=Duel.GetFieldGroupCount(tp,LOCATION_HAND,0)
if b then ct=ct-1 end if b then ct=ct-1 end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45943123.cfilter(chkc) end if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c45943123.cfilter(chkc,tp) end
if chk==0 then if chk==0 then
return Duel.IsExistingTarget(c45943123.cfilter,tp,LOCATION_MZONE,0,1,nil) and ct>0 return Duel.IsExistingTarget(c45943123.cfilter,tp,LOCATION_MZONE,0,1,nil,tp) and ct>0
end end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
local g=Duel.SelectTarget(tp,c45943123.cfilter,tp,LOCATION_MZONE,0,1,1,nil) local g=Duel.SelectTarget(tp,c45943123.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,ct*400)
end end
function c45943123.activate(e,tp,eg,ep,ev,re,r,rp) function c45943123.activate(e,tp,eg,ep,ev,re,r,rp)
......
...@@ -21,8 +21,9 @@ end ...@@ -21,8 +21,9 @@ end
function c47128571.desfilter(c,def) function c47128571.desfilter(c,def)
return c:IsFaceup() and c:GetAttack()<=def return c:IsFaceup() and c:GetAttack()<=def
end end
function c47128571.cfilter(c) function c47128571.cfilter(c,tp)
return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK) and c:IsLocation(LOCATION_GRAVE) and Duel.IsExistingMatchingCard(c47128571.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetDefense()) return c:IsType(TYPE_MONSTER) and not c:IsType(TYPE_LINK) and c:IsLocation(LOCATION_GRAVE)
and Duel.IsExistingMatchingCard(c47128571.desfilter,tp,0,LOCATION_MZONE,1,nil,c:GetDefense())
end end
function c47128571.activate(e,tp,eg,ep,ev,re,r,rp) function c47128571.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
...@@ -31,10 +32,10 @@ function c47128571.activate(e,tp,eg,ep,ev,re,r,rp) ...@@ -31,10 +32,10 @@ function c47128571.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.HintSelection(g) Duel.HintSelection(g)
Duel.Destroy(g,REASON_EFFECT) Duel.Destroy(g,REASON_EFFECT)
local sg=Duel.GetOperatedGroup() local sg=Duel.GetOperatedGroup()
if sg:GetCount()>0 and Duel.NegateAttack() and sg:IsExists(c47128571.cfilter,1,nil) then if sg:GetCount()>0 and Duel.NegateAttack() and sg:IsExists(c47128571.cfilter,1,nil,tp) then
Duel.BreakEffect() Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47128571,0)) Duel.Hint(HINT_SELECTMSG,tp,aux.Stringid(47128571,0))
local cg=sg:FilterSelect(tp,c47128571.cfilter,1,1,nil) local cg=sg:FilterSelect(tp,c47128571.cfilter,1,1,nil,tp)
Duel.HintSelection(cg) Duel.HintSelection(cg)
local dg=Duel.GetMatchingGroup(c47128571.desfilter,tp,0,LOCATION_MZONE,nil,cg:GetFirst():GetDefense()) local dg=Duel.GetMatchingGroup(c47128571.desfilter,tp,0,LOCATION_MZONE,nil,cg:GetFirst():GetDefense())
if Duel.Destroy(dg,REASON_EFFECT)~=0 then if Duel.Destroy(dg,REASON_EFFECT)~=0 then
......
...@@ -10,7 +10,7 @@ function c81223446.initial_effect(c) ...@@ -10,7 +10,7 @@ function c81223446.initial_effect(c)
e1:SetOperation(c81223446.activate) e1:SetOperation(c81223446.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c81223446.filter1(c) function c81223446.filter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove(tp,POS_FACEDOWN) return c:IsType(TYPE_MONSTER) and c:IsCanBeFusionMaterial() and c:IsAbleToRemove(tp,POS_FACEDOWN)
end end
function c81223446.filter2(c,e,tp,m,f,chkf) function c81223446.filter2(c,e,tp,m,f,chkf)
...@@ -20,7 +20,7 @@ end ...@@ -20,7 +20,7 @@ end
function c81223446.target(e,tp,eg,ep,ev,re,r,rp,chk) function c81223446.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
local chkf=tp local chkf=tp
local mg1=Duel.GetMatchingGroup(c81223446.filter1,tp,LOCATION_GRAVE,0,nil) local mg1=Duel.GetMatchingGroup(c81223446.filter1,tp,LOCATION_GRAVE,0,nil,tp)
local res=Duel.IsExistingMatchingCard(c81223446.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf) local res=Duel.IsExistingMatchingCard(c81223446.filter2,tp,LOCATION_EXTRA,0,1,nil,e,tp,mg1,nil,chkf)
if not res then if not res then
local ce=Duel.GetChainMaterial(tp) local ce=Duel.GetChainMaterial(tp)
...@@ -38,7 +38,7 @@ function c81223446.target(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -38,7 +38,7 @@ function c81223446.target(e,tp,eg,ep,ev,re,r,rp,chk)
end end
function c81223446.activate(e,tp,eg,ep,ev,re,r,rp) function c81223446.activate(e,tp,eg,ep,ev,re,r,rp)
local chkf=tp local chkf=tp
local mg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c81223446.filter1),tp,LOCATION_GRAVE,0,nil) local mg1=Duel.GetMatchingGroup(aux.NecroValleyFilter(c81223446.filter1),tp,LOCATION_GRAVE,0,nil,tp)
local sg1=Duel.GetMatchingGroup(c81223446.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf) local sg1=Duel.GetMatchingGroup(c81223446.filter2,tp,LOCATION_EXTRA,0,nil,e,tp,mg1,nil,chkf)
local mg2=nil local mg2=nil
local sg2=nil local sg2=nil
......
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