Commit 0c533a54 authored by nekrozar's avatar nekrozar

fix Danger!

parent 953f3f31
......@@ -6,7 +6,6 @@ function c26302107.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c26302107.spcost)
e1:SetTarget(c26302107.sptg)
e1:SetOperation(c26302107.spop)
......@@ -15,49 +14,45 @@ function c26302107.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(26302107,1))
e2:SetCategory(CATEGORY_ATKCHANGE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_DISCARD)
e2:SetCountLimit(1,26302107)
e2:SetCondition(c26302107.atkcon)
e2:SetTarget(c26302107.atktg)
e2:SetOperation(c26302107.atkop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c26302107.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(26302107)==0 end
c:RegisterFlagEffect(26302107,RESET_CHAIN,0,1)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c26302107.spfilter(c,e,tp)
return c:IsCode(26302107) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c26302107.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c26302107.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c26302107.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c26302107.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
local tc=g:RandomSelect(1-tp,1)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(26302107) then
local tc=g:RandomSelect(1-tp,1):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_DISCARD+REASON_EFFECT)~=0 and not tc:IsCode(26302107)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c26302107.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c26302107.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c26302107.atkcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c26302107.atktg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsFaceup,tp,0,LOCATION_MZONE,1,nil) end
end
......
......@@ -6,7 +6,6 @@ function c52350806.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c52350806.spcost)
e1:SetTarget(c52350806.sptg)
e1:SetOperation(c52350806.spop)
......@@ -15,49 +14,45 @@ function c52350806.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(52350806,1))
e2:SetCategory(CATEGORY_HANDES+CATEGORY_DRAW)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_DISCARD)
e2:SetCountLimit(1,52350806)
e2:SetCondition(c52350806.drcon)
e2:SetTarget(c52350806.drtg)
e2:SetOperation(c52350806.drop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c52350806.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(52350806)==0 end
c:RegisterFlagEffect(52350806,RESET_CHAIN,0,1)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c52350806.spfilter(c,e,tp)
return c:IsCode(52350806) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c52350806.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c52350806.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c52350806.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c52350806.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
local tc=g:RandomSelect(1-tp,1)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(52350806) then
local tc=g:RandomSelect(1-tp,1):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_DISCARD+REASON_EFFECT)~=0 and not tc:IsCode(52350806)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c52350806.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c52350806.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c52350806.drcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c52350806.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) and Duel.IsPlayerCanDraw(1-tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,PLAYER_ALL,1)
......@@ -71,7 +66,7 @@ function c52350806.drop(e,tp,eg,ep,ev,re,r,rp)
Duel.ShuffleHand(tp)
Duel.DiscardHand(tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
if h2>0 then
if h2>0 then
Duel.ShuffleHand(1-tp)
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
......
......@@ -11,11 +11,11 @@ function c83518674.initial_effect(c)
c:RegisterEffect(e1)
--special summon from deck
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TO_GRAVE)
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_DISCARD)
e2:SetCountLimit(1,83518674)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetTarget(c83518674.tgtg)
e2:SetOperation(c83518674.tgop)
c:RegisterEffect(e2)
......
......@@ -6,7 +6,6 @@ function c90807199.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c90807199.spcost)
e1:SetTarget(c90807199.sptg)
e1:SetOperation(c90807199.spop)
......@@ -15,49 +14,45 @@ function c90807199.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(90807199,1))
e2:SetCategory(CATEGORY_DESTROY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_DISCARD)
e2:SetCountLimit(1,90807199)
e2:SetCondition(c90807199.descon)
e2:SetTarget(c90807199.destg)
e2:SetOperation(c90807199.desop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c90807199.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(90807199)==0 end
c:RegisterFlagEffect(90807199,RESET_CHAIN,0,1)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c90807199.spfilter(c,e,tp)
return c:IsCode(90807199) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c90807199.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c90807199.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c90807199.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c90807199.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
local tc=g:RandomSelect(1-tp,1)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(90807199) then
local tc=g:RandomSelect(1-tp,1):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_DISCARD+REASON_EFFECT)~=0 and not tc:IsCode(90807199)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c90807199.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c90807199.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c90807199.descon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c90807199.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) and chkc:IsFacedown() end
if chk==0 then return Duel.IsExistingTarget(Card.IsFacedown,tp,0,LOCATION_ONFIELD,1,nil) end
......
......@@ -6,7 +6,6 @@ function c99745551.initial_effect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON+CATEGORY_HANDES+CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCost(c99745551.spcost)
e1:SetTarget(c99745551.sptg)
e1:SetOperation(c99745551.spop)
......@@ -15,49 +14,45 @@ function c99745551.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(99745551,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCode(EVENT_DISCARD)
e2:SetCountLimit(1,99745551)
e2:SetCondition(c99745551.spcon2)
e2:SetTarget(c99745551.sptg2)
e2:SetOperation(c99745551.spop2)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_REMOVE)
c:RegisterEffect(e3)
end
function c99745551.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return not c:IsPublic() and c:GetFlagEffect(99745551)==0 end
c:RegisterFlagEffect(99745551,RESET_CHAIN,0,1)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function c99745551.spfilter(c,e,tp)
return c:IsCode(99745551) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c99745551.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c99745551.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp) end
and Duel.IsExistingMatchingCard(Card.IsDiscardable,tp,LOCATION_HAND,0,1,nil)
and Duel.IsExistingMatchingCard(c99745551.spfilter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
end
function c99745551.spop(e,tp,eg,ep,ev,re,r,rp)
local g=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
if #g<1 then return end
local tc=g:RandomSelect(1-tp,1)
Duel.BreakEffect()
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_DISCARD)
if not tc:GetFirst():IsCode(99745551) then
local tc=g:RandomSelect(1-tp,1):GetFirst()
if tc and Duel.SendtoGrave(tc,REASON_DISCARD+REASON_EFFECT)~=0 and not tc:IsCode(99745551)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 then
local spg=Duel.GetMatchingGroup(c99745551.spfilter,tp,LOCATION_HAND,0,nil,e,tp)
if spg:GetCount()<=0 then return end
local sg=spg:GetFirst()
if spg:GetCount()~=1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=spg:Select(tp,1,1,nil)
end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local sc=Duel.SelectMatchingCard(tp,c99745551.spfilter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if #sc>0 and Duel.SpecialSummon(sc,0,tp,tp,false,false,POS_FACEUP) then
if Duel.SpecialSummon(sg,0,tp,tp,false,false,POS_FACEUP)~=0 then
Duel.Draw(tp,1,REASON_EFFECT)
end
end
end
function c99745551.spcon2(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetPreviousLocation()==LOCATION_HAND and (r&REASON_DISCARD)~=0
end
function c99745551.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler()
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
......@@ -66,7 +61,7 @@ function c99745551.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
end
function c99745551.spop2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
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