Commit e2fbe139 authored by VanillaSalt's avatar VanillaSalt

fix

parent 694b49b3
......@@ -52,7 +52,7 @@ end
function c19502505.negcon(e,tp,eg,ep,ev,re,r,rp)
if not re:IsHasProperty(EFFECT_FLAG_CARD_TARGET) then return false end
local g=Duel.GetChainInfo(ev,CHAININFO_TARGET_CARDS)
return g and g:GetCount()==1 and g:IsExists(Card.IsType,1,nil,TYPE_MONSTER)
return g and g:GetCount()==1 and g:GetFirst():IsControler(tp) and g:GetFirst():IsLocation(LOCATION_MZONE)
and re:IsActiveType(TYPE_SPELL) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
and not e:GetHandler():IsStatus(STATUS_BATTLE_DESTROYED) and Duel.IsChainNegatable(ev)
end
......
......@@ -22,7 +22,7 @@ function c30786387.initial_effect(c)
e2:SetOperation(c30786387.thop)
c:RegisterEffect(e2)
end
function c30786387.filter(c,e,tp)
function c30786387.filter(c)
return c:IsSetCard(0xe6) and c:IsType(TYPE_MONSTER)
end
function c30786387.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -28,7 +28,7 @@ function c33833230.distg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and aux.disfilter1(chkc) end
if chk==0 then return Duel.IsExistingTarget(aux.disfilter1,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
local g=Duel.SelectTarget(tp,aux.disfilter1,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
end
function c33833230.disop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -28,7 +28,7 @@ function c41209827.initial_effect(c)
--destroy
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(41209827,3))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetCategory(CATEGORY_DESTROY)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
......
......@@ -42,7 +42,7 @@ function c42921475.chcon(e,tp,eg,ep,ev,re,r,rp)
local rc=re:GetHandler()
return rp==1-tp and (rc:GetType()==TYPE_SPELL or rc:GetType()==TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE)
end
function c42921475.costfilter(c)
function c42921475.cfilter(c)
return not c:IsStatus(STATUS_BATTLE_DESTROYED)
end
function c42921475.chcost(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -46,7 +46,7 @@ function c52176579.activate(e,tp,eg,ep,ev,re,r,rp)
if sg1:IsExists(Card.IsHasEffect,1,nil,EFFECT_NECRO_VALLEY) then return end
Duel.SpecialSummon(sg1,0,tp,tp,false,false,POS_FACEUP)
end
function c52176579.lvfilter(c)
function c52176579.lvfilter(c,tp)
local lv=c:GetLevel()
return lv>0 and c:IsFaceup() and c:IsSetCard(0xea) and Duel.IsExistingMatchingCard(c52176579.tgfilter,tp,LOCATION_DECK,0,1,nil,lv)
end
......@@ -58,10 +58,10 @@ function c52176579.lvcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
end
function c52176579.lvtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52176579.lvfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c52176579.lvfilter,tp,LOCATION_MZONE,0,1,nil) end
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c52176579.lvfilter(chkc,tp) end
if chk==0 then return Duel.IsExistingTarget(c52176579.lvfilter,tp,LOCATION_MZONE,0,1,nil,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c52176579.lvfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SelectTarget(tp,c52176579.lvfilter,tp,LOCATION_MZONE,0,1,1,nil,tp)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c52176579.lvop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -2,6 +2,7 @@
function c63992027.initial_effect(c)
--spsummon
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
......@@ -24,7 +25,7 @@ function c63992027.spfilter(c,e,tp,ec)
return c:IsCode(ec:GetCode()) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c63992027.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return c:IsControler(tp) and c:IsLocation(LOCATION_MZONE) and c63992027.filter(chkc,nil,nil) end
if chkc then return chkc:IsControler(tp) and chkc:IsLocation(LOCATION_MZONE) and c63992027.filter(chkc,nil,nil) end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c63992027.filter,tp,LOCATION_MZONE,0,1,nil,e,tp) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TARGET)
......
......@@ -11,12 +11,11 @@ function c64414267.initial_effect(c)
e1:SetTargetRange(LOCATION_MZONE,LOCATION_MZONE)
e1:SetValue(ATTRIBUTE_DARK)
c:RegisterEffect(e1)
--pos
--spsummon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(64414267,0))
e2:SetCategory(CATEGORY_POSITION)
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCondition(c64414267.spcon1)
......
......@@ -26,7 +26,7 @@ end
function c76471944.descon(e,tp,eg,ep,ev,re,r,rp)
return not Duel.IsExistingMatchingCard(Card.IsType,tp,LOCATION_GRAVE,0,1,nil,TYPE_SPELL+TYPE_TRAP)
end
function c76471944.desfilter(c,tp)
function c76471944.desfilter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end
function c76471944.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -69,6 +69,7 @@ function c82321037.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetMatchingGroup(c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,nil)
if g1:FilterCount(Card.IsAttribute,nil,ATTRIBUTE_WATER)==2 and g:GetCount()>0
and Duel.SelectYesNo(tp,aux.Stringid(82321037,1)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c82321037.rmfilter,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,2,nil)
Duel.HintSelection(g)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
......
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