Commit 62627b5b authored by Huangnan's avatar Huangnan

fix

parent 73b02c9f
...@@ -42,8 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -42,8 +42,7 @@ function s.spop(e,tp,eg,ep,ev,re,r,rp)
local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp) local tg=Duel.SelectMatchingCard(tp,s.cfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
local c=e:GetHandler() local c=e:GetHandler()
local tc=tg:GetFirst() local tc=tg:GetFirst()
if tc and Duel.SendtoGrave(tc1,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) if tc and Duel.SendtoGrave(tc,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_GRAVE) then
and c:IsRelateToEffect(e) then
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e) if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and c:IsRelateToEffect(e)
and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsSummonLocation(LOCATION_GRAVE) then and Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)>0 and c:IsSummonLocation(LOCATION_GRAVE) then
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
...@@ -50,7 +50,7 @@ function s.filter(c,tp) ...@@ -50,7 +50,7 @@ function s.filter(c,tp)
end end
end end
end end
return ok and (s.thfilter(c,tp) or s.tgfiler(c,tp)) return ok and (s.thfilter(c,tp) or s.tgfilter(c,tp))
end end
function s.thfilter(c,tp) function s.thfilter(c,tp)
return not c:IsStatus(STATUS_LEAVE_CONFIRMED) and Duel.IsPlayerCanSendtoHand(1-tp,c) return not c:IsStatus(STATUS_LEAVE_CONFIRMED) and Duel.IsPlayerCanSendtoHand(1-tp,c)
......
...@@ -3460,7 +3460,6 @@ function cm.Almondimenatk(atk) ...@@ -3460,7 +3460,6 @@ function cm.Almondimenatk(atk)
local c=e:GetHandler() local c=e:GetHandler()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetCode(EFFECT_UPDATE_ATTACK) e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetValue(atk) e1:SetValue(atk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
......
...@@ -138,7 +138,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -138,7 +138,7 @@ function cm.spop(e,tp,eg,ep,ev,re,r,rp)
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_COPY_INHERIT+EFFECT_FLAG_OWNER_RELATE) e1:SetProperty(EFFECT_FLAG_OWNER_RELATE)
e1:SetReset(RESET_EVENT+RESETS_STANDARD) e1:SetReset(RESET_EVENT+RESETS_STANDARD)
e1:SetValue(cm.eqlimit) e1:SetValue(cm.eqlimit)
tc:RegisterEffect(e1) tc:RegisterEffect(e1)
......
...@@ -71,7 +71,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp) ...@@ -71,7 +71,6 @@ function cm.op(e,tp,eg,ep,ev,re,r,rp)
local atk,def=tc:GetAttack(),c:GetDefense() local atk,def=tc:GetAttack(),c:GetDefense()
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE) e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(-atk) e1:SetValue(-atk)
......
...@@ -80,7 +80,6 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp) ...@@ -80,7 +80,6 @@ function cm.operation2(e,tp,eg,ep,ev,re,r,rp)
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)
e1:SetProperty(EFFECT_FLAG_COPY_INHERIT)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_DISABLE)
e1:SetCode(EFFECT_UPDATE_DEFENSE) e1:SetCode(EFFECT_UPDATE_DEFENSE)
e1:SetValue(300) e1:SetValue(300)
......
...@@ -5,7 +5,7 @@ Duel.LoadScript("yakumonue.lua") ...@@ -5,7 +5,7 @@ Duel.LoadScript("yakumonue.lua")
cm.TC_number=50 cm.TC_number=50
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,81902000) aux.AddCodeList(c,81902000)
c:EnableCounterPermit(0x852) c:EnableCounterPermit(0x854)
--xyz summon --xyz summon
aux.AddXyzProcedure(c,nil,5,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop) aux.AddXyzProcedure(c,nil,5,2,cm.ovfilter,aux.Stringid(m,0),2,cm.xyzop)
c:EnableReviveLimit() c:EnableReviveLimit()
...@@ -65,30 +65,30 @@ function cm.cfilter(c) ...@@ -65,30 +65,30 @@ function cm.cfilter(c)
end end
function cm.acop(e,tp,eg,ep,ev,re,r,rp) function cm.acop(e,tp,eg,ep,ev,re,r,rp)
if eg:IsExists(cm.cfilter,1,e:GetHandler()) then if eg:IsExists(cm.cfilter,1,e:GetHandler()) then
e:GetHandler():AddCounter(0x852,1) e:GetHandler():AddCounter(0x854,1)
end end
end end
--redice --redice
function cm.dicecon(e,tp,eg,ep,ev,re,r,rp) function cm.dicecon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
return c:GetFlagEffect(m)==0 and c:IsCanRemoveCounter(tp,0x852,1,REASON_EFFECT) return c:GetFlagEffect(m)==0 and c:IsCanRemoveCounter(tp,0x854,1,REASON_EFFECT)
end end
function cm.diceop(e,tp,eg,ep,ev,re,r,rp) function cm.diceop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local cc=Duel.GetCurrentChain() local cc=Duel.GetCurrentChain()
local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID) local cid=Duel.GetChainInfo(cc,CHAININFO_CHAIN_ID)
local counter=c:GetCounter(0x852) local counter=c:GetCounter(0x854)
if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then if Duel.SelectYesNo(tp,aux.Stringid(m,1)) then
Duel.Hint(HINT_CARD,0,m) Duel.Hint(HINT_CARD,0,m)
e:GetHandler():RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(m+100,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
Duel.Hint(HINTMSG_SELECT,tp,aux.Stringid(m,3)) Duel.Hint(HINTMSG_SELECT,tp,aux.Stringid(m,3))
if counter>6 then if counter>6 then
local dt=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,6)) local dt=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,6))
e:GetHandler():RemoveCounter(tp,0x852,dt,REASON_EFFECT) e:GetHandler():RemoveCounter(tp,0x854,dt,REASON_EFFECT)
e:SetLabel(dt) e:SetLabel(dt)
else else
local dt=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,counter)) local dt=Duel.AnnounceNumber(tp,table.unpack(aux.idx_table,1,counter))
e:GetHandler():RemoveCounter(tp,0x852,dt,REASON_EFFECT) e:GetHandler():RemoveCounter(tp,0x854,dt,REASON_EFFECT)
e:SetLabel(dt) e:SetLabel(dt)
end end
local dc={Duel.GetDiceResult()} local dc={Duel.GetDiceResult()}
......
...@@ -212,7 +212,7 @@ end ...@@ -212,7 +212,7 @@ end
--immune --immune
function cm.econ(e,tp,eg,ep,ev,re,r,rp) function cm.econ(e,tp,eg,ep,ev,re,r,rp)
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,81902002) and ph<=PHASE_BATTLE_START return e:GetHandler():GetOverlayGroup():IsExists(Card.IsCode,1,nil,81902002) and (ph>=PHASE_STANDBY and ph<=PHASE_BATTLE_START)
end end
function cm.efilter(e,te) function cm.efilter(e,te)
return te:GetOwner()~=e:GetOwner() return te:GetOwner()~=e:GetOwner()
......
...@@ -1987,6 +1987,90 @@ function Auxiliary.STFilter(f,...) ...@@ -1987,6 +1987,90 @@ function Auxiliary.STFilter(f,...)
return target:IsST() and (not f or f(target,table.unpack(ext_params))) return target:IsST() and (not f or f(target,table.unpack(ext_params)))
end end
end end
function Auxiliary.ActivateFilter(f)
return function(c,e,tp)
return (not f or f(c,e,tp)) and c:GetActivateEffect():IsActivatable(tp,true,true)
end
end
function Auxiliary.AttachFilter(f)
return function(c,e,...)
return (not f or f(c,e,...)) and not c:IsType(TYPE_TOKEN) and not c:IsImmuneToEffect(e)
end
end
function Auxiliary.AttachFilter2(f)
return function(c,...)
return (not f or f(c,e,...)) and c:IsType(TYPE_XYZ)
end
end
function Auxiliary.BanishFilter(f,cost,pos)
pos = pos and pos or POS_FACEUP
return function(c,_,tp,...)
return (not f or f(c,...)) and (not cost and c:IsAbleToRemove(tp,pos) or cost and c:IsAbleToRemoveAsCost(pos))
end
end
function Auxiliary.ControlFilter(f)
return function(c,...)
return (not f or f(c,...)) and c:IsControlerCanBeChanged()
end
end
function Auxiliary.DestroyFilter(f)
return function(c,e,...)
return (not f or f(c,e,...)) and (c:IsOnField() or c:IsDestructable(e))
end
end
function Auxiliary.DisableFilter(f)
return function(c,...)
return (not f or f(c,...)) and aux.NegateAnyFilter(c)
end
end
function Auxiliary.DiscardFilter(f,cost)
local r = (not cost) and REASON_EFFECT or REASON_COST
return function(c)
return (not f or f(c)) and c:IsDiscardable(r)
end
end
function Auxiliary.SearchFilter(f)
return function(c,...)
return (not f or f(c,...)) and c:IsAbleToHand()
end
end
function Auxiliary.SSetFilter(f)
return function(c,...)
return (not f or f(c,...)) and c:IsST() and c:IsSSetable()
end
end
function Auxiliary.ToGYFilter(f,cost)
return function(c,...)
return (not f or f(c,...)) and (not cost and c:IsAbleToGrave() or (cost and c:IsAbleToGraveAsCost()))
end
end
function Auxiliary.ToGraveFilter(f,cost)
return aux.ToGYFilter(f,cost)
end
function Auxiliary.ToHandFilter(f,cost)
return function(c,...)
return (not f or f(c,...)) and (not cost and c:IsAbleToHand() or (cost and c:IsAbleToHandAsCost()))
end
end
function Auxiliary.ToDeckFilter(f,cost,loc)
if not cost then
return function(c,...)
return (not f or f(c,...)) and c:IsAbleToDeck()
end
else
local check=Card.IsAbleToDeckOrExtraAsCost
if loc then
if loc==LOCATION_DECK then
check=Card.IsAbleToDeckAsCost
elseif loc==LOCATION_EXTRA then
check=Card.IsAbleToExtraAsCost
end
end
return function(c,...)
return (not f or f(c,...)) and check(c)
end
end
end
--Flag Effects --Flag Effects
function Card.GetFlagEffectWithSpecificLabel(c,flag,label,reset) function Card.GetFlagEffectWithSpecificLabel(c,flag,label,reset)
......
...@@ -1444,6 +1444,7 @@ ...@@ -1444,6 +1444,7 @@
!counter 0x1852 无心傀丝 !counter 0x1852 无心傀丝
!counter 0x853 灾厄指示物 !counter 0x853 灾厄指示物
!counter 0x1855 完美冻结指示物 !counter 0x1855 完美冻结指示物
!counter 0x854 信仰指示物
#屋屋赛高 - 820 0xf50-0xf5f #屋屋赛高 - 820 0xf50-0xf5f
!setname 0x3f55 屋屋 !setname 0x3f55 屋屋
......
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