Commit e446781e authored by POLYMER's avatar POLYMER

fix

parent cf2b8c63
No preview for this file type
......@@ -36,9 +36,7 @@ function s.cpcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function s.costfilter(c)
if not (s.listfilter(c) and bit.band(c:GetType(),0x82)==c:GetType() and c:IsAbleToGraveAsCost()) then return end
local ae=c:CheckActivateEffect(true,true,false)
return ae and (not ae:IsHasCategory(CATEGORY_SPECIAL_SUMMON) or Duel.IsPlayerCanSpecialSummonCount(tp,2))
if not (s.listfilter(c) and bit.band(c:GetType(),0x82)==c:GetType() and c:IsAbleToGraveAsCost()) and c:CheckActivateEffect(true,true,false) end
end
function s.cpcost1(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(s.costfilter,tp,LOCATION_DECK,0,1,nil) end
......
......@@ -11,7 +11,7 @@ function c22020960.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EFFECT_SELF_DESTROY)
e2:SetCondition(c22020960.descon)
e2:SetCondition(c22020960.sdcon)
c:RegisterEffect(e2)
--activate from hand
local e3=Effect.CreateEffect(c)
......@@ -25,9 +25,9 @@ function c22020960.initial_effect(c)
e4:SetCode(EFFECT_TRAP_ACT_IN_HAND)
c:RegisterEffect(e4)
end
function c22020960.filter(c)
function c22020960.sdfilter(c)
return c:IsFaceup() and c:IsSetCard(0xff1) and c:IsRace(RACE_SPELLCASTER)
end
function c22020960.descon(e)
return not Duel.IsExistingMatchingCard(c22020960.filter,0,LOCATION_MZONE,0,1,nil)
function c22020960.sdcon(e)
return not Duel.IsExistingMatchingCard(c22020960.sdfilter,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil)
end
\ No newline at end of file
......@@ -26,7 +26,7 @@ function c28315944.sprcon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)>8000 and Duel.GetMZoneCount(tp)>0 and (c:IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsAttribute),0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH))
end
function c28315944.gspop(e,tp,eg,ep,ev,re,r,rp,c)
function c28315944.sprop(e,tp,eg,ep,ev,re,r,rp,c)
if c:IsLocation(LOCATION_HAND) then return end
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-2000)
......
......@@ -26,7 +26,7 @@ function c28316347.sprcon(e,c)
local tp=e:GetHandlerPlayer()
return Duel.GetLP(tp)>8000 and Duel.GetMZoneCount(tp)>0 and (c:IsLocation(LOCATION_HAND) or Duel.IsExistingMatchingCard(aux.AND(Card.IsFaceup,Card.IsAttribute),0,LOCATION_MZONE,LOCATION_MZONE,1,nil,ATTRIBUTE_EARTH))
end
function c28316347.gspop(e,tp,eg,ep,ev,re,r,rp,c)
function c28316347.sprop(e,tp,eg,ep,ev,re,r,rp,c)
if c:IsLocation(LOCATION_HAND) then return end
local lp=Duel.GetLP(tp)
Duel.SetLP(tp,lp-2000)
......
......@@ -78,18 +78,26 @@ function c3679215.adjustop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c3679215.filter,0,0xff,0xff,nil)
cregister=Card.RegisterEffect
esetrange=Effect.SetRange
table_effect={}
table_range={}
eclone=Effect.Clone
Naturia_table_effect={}
Naturia_table_range={}
Effect.SetRange=function(effect,range)
table_range[effect]=range
Naturia_table_range[effect]=range
return esetrange(effect,range)
end
end
c3679215.GetRange=function(effect)
if table_range[effect] then
return table_range[effect]
if Naturia_table_range[effect] then
return Naturia_table_range[effect]
end
return nil
end
Effect.Clone=function(effect)
local clone_effect=eclone(effect)
if c3679215.GetRange(effect) then
Naturia_table_range[clone_effect]=c3679215.GetRange(effect)
end
return clone_effect
end
--for i,f in pairs(Effect) do Debug.Message(i) end
Card.RegisterEffect=function(card,effect,flag)
if effect then
......@@ -98,20 +106,21 @@ function c3679215.adjustop(e,tp,eg,ep,ev,re,r,rp)
eff:SetValue(3679215)
esetrange(eff,LOCATION_HAND+LOCATION_MZONE)
end
table.insert(table_effect,eff)
table.insert(Naturia_table_effect,eff)
end
return
end
for tc in aux.Next(g) do
table_effect={}
Naturia_table_effect={}
tc:ReplaceEffect(3679215,0)
Duel.CreateToken(0,tc:GetOriginalCode())
for key,eff in ipairs(table_effect) do
for key,eff in ipairs(Naturia_table_effect) do
cregister(tc,eff)
end
end
Card.RegisterEffect=cregister
Effect.SetRange=esetrange
Effect.Clone=eclone
end
e:Reset()
end
......@@ -137,9 +137,9 @@ function cm.regop(e,tp,eg,ep,ev,re,r,rp)
if #g==0 then return end
local sg=Group.FromCards()
if e:GetLabel()==4 then sg=e:GetLabelObject() else sg=e:GetLabelObject():GetLabelObject() end
if c:GetFlagEffect(m)==0 then
if c:GetFlagEffect(m+99)==0 then
sg:Clear()
c:RegisterFlagEffect(m,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
c:RegisterFlagEffect(m+99,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
local e6=Effect.CreateEffect(c)
e6:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e6:SetCode(EVENT_PHASE+PHASE_END)
......@@ -157,7 +157,7 @@ function cm.mtfilter(c,rc)
end
function cm.mtop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetOwner()
if c:GetFlagEffect(m)==0 then return end
if c:GetFlagEffect(m+99)==0 then return end
local g=e:GetLabelObject():GetLabelObject():Filter(cm.mtfilter,nil,c)
if #g>0 then Duel.Overlay(c,g) end
end
......@@ -71,6 +71,7 @@ function c65010517.op(e,tp,eg,ep,ev,re,r,rp)
e2:SetTargetRange(0,1)
e2:SetLabelObject(c)
e2:SetReset(RESET_PHASE+PHASE_END)
e2:SetCondition(c65010517.costcon)
e2:SetCost(c65010517.costchk)
e2:SetOperation(c65010517.costop)
Duel.RegisterEffect(e2,tp)
......@@ -83,11 +84,15 @@ function c65010517.op(e,tp,eg,ep,ev,re,r,rp)
e7:SetTargetRange(0,1)
Duel.RegisterEffect(e7,tp)
end
function c65010517.costcon(e)
local tc=e:GetLabelObject()
return tc:GetFlagEffect(65010517)~=0 and tc:IsLocation(LOCATION_MZONE)
end
function c65010517.costchk(e,te_or_c,tp)
local tc=e:GetLabelObject()
local ct=Duel.GetFlagEffect(tp,65010517)
local g=Duel.GetDecktopGroup(tp,ct*4)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==ct*4 and tc:GetFlagEffect(65010517)~=0 and tc:IsLocation(LOCATION_MZONE)
return g:FilterCount(Card.IsAbleToRemoveAsCost,nil)==ct*4
end
function c65010517.costop(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_CARD,0,65010517)
......
......@@ -58,8 +58,8 @@ function s.actarget(e,te,tp)
end
function s.adjustop(e,tp,eg,ep,ev,re,r,rp)
--
if not s.globle_check then
s.globle_check=true
if not s.globle_effect_check then
s.globle_effect_check=true
local g=Duel.GetMatchingGroup(s.filter,0,0xff,0xff,nil)
cregister=Card.RegisterEffect
esetrange=Effect.SetRange
......
......@@ -183,5 +183,5 @@ function s.thfilter1(c,att)
return c:IsSetCard(0x400d) and c:GetAttribute()==att and c:IsAbleToHand()
end
function s.tgfilter(c,att)
return c:IsSetCard(0x113) and c:GetAttribute()==att and c:IsAbleToHand()
return c:GetAttribute()==att and c:IsAbleToGrave()
end
......@@ -173,7 +173,7 @@ end
function s.setfilter(c,e,tp,ec)
local rc=c:GetReasonCard()
local re=c:GetReasonEffect()
return ((rc and rc==ec) or (re and re:GetHandler()==ec)) and ((c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(1-tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,1-tp)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(1-tp,LOCATION_SZONE)>0)
return ((rc and rc==ec) or (re and re:GetHandler()==ec)) and ((c:IsType(TYPE_MONSTER) and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsCanBeSpecialSummoned(e,0,tp,false,false,POS_FACEUP+POS_FACEDOWN_DEFENSE,tp)) or (c:IsType(TYPE_SPELL+TYPE_TRAP) and (c:IsType(TYPE_FIELD) or Duel.GetLocationCount(tp,LOCATION_SZONE)>0)
and c:IsSSetable(true)))
end
function s.settg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
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