Commit 262473de authored by salix5's avatar salix5

msg

parent 13782cbd
......@@ -26,6 +26,7 @@ function c48063985.initial_effect(c)
e3:SetProperty(EFFECT_FLAG_CARD_TARGET)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1)
e3:SetCost(aux.msgcost)
e3:SetTarget(c48063985.thtg)
e3:SetOperation(c48063985.thop)
c:RegisterEffect(e3)
......@@ -94,6 +95,7 @@ end
function c48063985.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToExtraAsCost() end
Duel.SendtoDeck(e:GetHandler(),nil,0,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c48063985.filter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x10b5) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
......
......@@ -7,6 +7,7 @@ function c69750546.initial_effect(c)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCondition(c69750546.condition)
e1:SetCost(aux.msgcost)
e1:SetTarget(c69750546.target)
e1:SetOperation(c69750546.operation)
c:RegisterEffect(e1)
......@@ -47,6 +48,7 @@ function c69750546.descost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.GetMatchingGroup(c69750546.costfilter,tp,LOCATION_DECK+LOCATION_HAND,0,nil)
Duel.SendtoGrave(g,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c69750546.destg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(Card.IsDestructable,tp,0,LOCATION_MZONE,1,nil) end
......
......@@ -8,6 +8,7 @@ function c83236601.initial_effect(c)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1,83236601)
e1:SetCondition(c83236601.tgcon)
e1:SetCost(aux.msgcost)
e1:SetTarget(c83236601.tgtg)
e1:SetOperation(c83236601.tgop)
c:RegisterEffect(e1)
......@@ -24,6 +25,7 @@ function c83236601.initial_effect(c)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,83236602)
e3:SetCondition(c83236601.thcon)
e3:SetCost(aux.msgcost)
e3:SetTarget(c83236601.thtg)
e3:SetOperation(c83236601.thop)
c:RegisterEffect(e3)
......@@ -42,7 +44,7 @@ end
function c83236601.checkop(e,tp,eg,ep,ev,re,r,rp)
local tc=eg:GetFirst()
while tc do
tc:RegisterFlagEffect(83236601,RESET_EVENT+0x1fc0000+RESET_PHASE+PHASE_END,0,1)
tc:RegisterFlagEffect(83236601,RESET_EVENT+0x1ec0000+RESET_PHASE+PHASE_END,0,1)
tc=eg:GetNext()
end
end
......@@ -64,10 +66,10 @@ function c83236601.tgop(e,tp,eg,ep,ev,re,r,rp)
end
end
function c83236601.regop(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(83236601,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
e:GetHandler():RegisterFlagEffect(83236602,RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_END,0,1)
end
function c83236601.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():GetFlagEffect(83236601)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2
return e:GetHandler():GetFlagEffect(83236602)>0 and Duel.GetCurrentPhase()==PHASE_MAIN2
end
function c83236601.filter(c)
return c:IsSetCard(0x95) and c:GetType()==TYPE_SPELL+TYPE_QUICKPLAY and c:IsAbleToHand()
......
......@@ -27,6 +27,7 @@ function c84401683.initial_effect(c)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1)
e2:SetCost(aux.msgcost)
e2:SetTarget(c84401683.destg)
e2:SetOperation(c84401683.desop)
c:RegisterEffect(e2)
......@@ -37,6 +38,7 @@ end
function c84401683.negcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():CheckRemoveOverlayCard(tp,1,REASON_COST) end
e:GetHandler():RemoveOverlayCard(tp,1,1,REASON_COST)
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
end
function c84401683.filter(c)
return c:IsFaceup() and c:GetAttack()>0
......
......@@ -1117,3 +1117,8 @@ function Auxiliary.chainreg(e,tp,eg,ep,ev,re,r,rp)
e:GetHandler():RegisterFlagEffect(1,RESET_EVENT+0x1fc0000+RESET_CHAIN,0,1)
end
end
--cost function for message sending
function Auxiliary.msgcost(e,tp,eg,ep,ev,re,r,rp)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
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