Commit 43069627 authored by Fluorohydride's avatar Fluorohydride

Merge pull request #536 from luffySAMA/master

fix
parents 24c216be ace23ada
......@@ -25,6 +25,7 @@ function c20368763.initial_effect(c)
e4:SetDescription(aux.Stringid(20368763,0))
e4:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_TOKEN)
e4:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e4:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL)
e4:SetCode(EVENT_RELEASE)
e4:SetRange(LOCATION_MZONE)
e4:SetCountLimit(1)
......@@ -57,10 +58,10 @@ function c20368763.indcon(e)
return Duel.IsExistingMatchingCard(Card.IsType,e:GetHandlerPlayer(),LOCATION_MZONE,0,1,nil,TYPE_TOKEN)
end
function c20368763.cfilter(c,tp)
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp
return c:IsPreviousLocation(LOCATION_MZONE) and c:GetPreviousControler()==tp and c:IsReason(REASON_COST)
end
function c20368763.spcon(e,tp,eg,ep,ev,re,r,rp)
return re and re:GetHandler()~=e:GetHandler() and eg:IsExists(c20368763.cfilter,1,nil,tp)
return re and re:GetHandler()~=e:GetHandler() and re:IsHasType(0x7f0) and eg:IsExists(c20368763.cfilter,1,nil,tp)
end
function c20368763.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsRelateToEffect(e) end
......
......@@ -6,6 +6,7 @@ function c20781762.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCost(c20781762.cost)
e1:SetTarget(c20781762.target)
e1:SetOperation(c20781762.operation)
......
......@@ -10,11 +10,14 @@ function c36468556.initial_effect(c)
e1:SetOperation(c36468556.activate)
c:RegisterEffect(e1)
end
function c36468556.tgfilter(c)
return (c:IsFaceup() and c:IsType(TYPE_EFFECT)) or c:IsFacedown()
end
function c36468556.filter(c)
return c:IsFaceup() and c:IsType(TYPE_EFFECT)
end
function c36468556.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c36468556.tgfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
local dam=Duel.GetMatchingGroupCount(c36468556.filter,tp,LOCATION_MZONE,LOCATION_MZONE,nil)*500
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(dam)
......
......@@ -18,10 +18,10 @@ function c40390147.spfilter(c,e,tp)
return c:IsCode(93717133) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c40390147.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
local b1=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp)
local b2=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp)
local b1=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)
local b2=Duel.IsExistingMatchingCard(c40390147.spfilter,tp,LOCATION_DECK,0,1,nil,e,tp) and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and ((b1 and e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST)) or (b2 and e:GetHandler():CheckRemoveOverlayCard(tp,2,REASON_COST))) end
and (b1 or b2) end
if b1 and b2 then
local opt=Duel.SelectOption(tp,aux.Stringid(40390147,1),aux.Stringid(40390147,2))
e:SetLabel(opt)
......
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