Commit 3a8580c6 authored by DailyShana's avatar DailyShana

fix

for Trap of Darkness
parent e1bf1b16
......@@ -5,6 +5,7 @@ function c20447641.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c20447641.cost)
e1:SetTarget(c20447641.target)
e1:SetOperation(c20447641.activate)
c:RegisterEffect(e1)
......@@ -24,10 +25,17 @@ function c20447641.initial_effect(c)
e4:SetCode(EFFECT_LIMIT_SET_PROC)
c:RegisterEffect(e4)
end
function c20447641.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c20447641.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,20447641,0xaa,0x21,4,1800,1000,RACE_MACHINE,ATTRIBUTE_EARTH) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c20447641.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -5,6 +5,7 @@ function c51606429.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c51606429.cost)
e1:SetTarget(c51606429.target)
e1:SetOperation(c51606429.activate)
c:RegisterEffect(e1)
......@@ -22,10 +23,17 @@ function c51606429.initial_effect(c)
e2:SetOperation(c51606429.negop)
c:RegisterEffect(e2)
end
function c51606429.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c51606429.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,51606429,0x10db,0x11,3,0,0,RACE_WARRIOR,ATTRIBUTE_DARK) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c51606429.activate(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -6,6 +6,7 @@ function c98827725.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,98827725+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c98827725.cost)
e1:SetTarget(c98827725.target)
e1:SetOperation(c98827725.activate)
c:RegisterEffect(e1)
......@@ -17,10 +18,17 @@ function c98827725.initial_effect(c)
e2:SetCondition(c98827725.actcon)
c:RegisterEffect(e2)
end
function c98827725.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e:SetLabel(1)
return true
end
function c98827725.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:IsHasType(EFFECT_TYPE_ACTIVATE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
if chk==0 then
if e:GetLabel()==0 then return false end
e:SetLabel(0)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsPlayerCanSpecialSummonMonster(tp,98827725,0x10db,0x11,4,0,300,RACE_WARRIOR,ATTRIBUTE_DARK) end
e:SetLabel(0)
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c98827725.activate(e,tp,eg,ep,ev,re,r,rp)
......
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