Commit 7aa4c375 authored by mercury233's avatar mercury233

fix

parent 56a68406
......@@ -35,8 +35,8 @@ function c100238005.initial_effect(c)
e3:SetOperation(c100238005.spop)
c:RegisterEffect(e3)
end
function c100238005.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetMatchingGroupCount(Card.IsType,tp,LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP)==0
function c100238005.condition(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_SPELL+TYPE_TRAP)==0
end
function c100238005.cfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsDiscardable()
......
......@@ -44,7 +44,7 @@ function c100238006.immtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end
function c100238006.immop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
if tc:IsRelateToEffect(e) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
......
......@@ -44,7 +44,17 @@ function c100239004.atkfilter(c)
end
function c100239004.atkval(e,c)
local g=Duel.GetMatchingGroup(c100239004.atkfilter,c:GetControler(),LOCATION_MZONE,0,nil)
local ct=g:GetClassCount(Card.GetAttribute)
local att=0
local tc=g:GetFirst()
while tc do
att=bit.bor(att,tc:GetAttribute())
tc=g:GetNext()
end
local ct=0
while att~=0 do
if bit.band(att,0x1)~=0 then ct=ct+1 end
att=bit.rshift(att,1)
end
return ct*300
end
function c100239004.target(e,c)
......
......@@ -26,10 +26,9 @@ function c101008019.initial_effect(c)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e3:SetCode(EVENT_CHAIN_SOLVING)
e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c101008019.discon)
e3:SetOperation(c101008019.disop)
c:RegisterEffect(e3)
Duel.RegisterEffect(e3,0)
--to hand
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101008019,1))
......@@ -67,10 +66,13 @@ end
function c101008019.flipop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(101008019,RESET_EVENT+RESETS_STANDARD,0,1)
end
function c101008019.disfilter(c)
return c:IsFaceup() and c:GetFlagEffect(101008019)>0 and not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c101008019.discon(e,tp,eg,ep,ev,re,r,rp)
if e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) or e:GetHandler():GetFlagEffect(101008019)==0 then return false end
local p,loc=Duel.GetChainInfo(ev,CHAININFO_TRIGGERING_CONTROLER,CHAININFO_TRIGGERING_LOCATION)
return re:IsActiveType(TYPE_MONSTER) and p==1-tp and loc==LOCATION_MZONE
return re:IsActiveType(TYPE_MONSTER) and loc==LOCATION_MZONE
and Duel.IsExistingMatchingCard(c101008019.disfilter,p,0,LOCATION_MZONE,1,nil)
end
function c101008019.disop(e,tp,eg,ep,ev,re,r,rp)
Duel.NegateEffect(ev)
......
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