Commit ec3b62b1 authored by salix5's avatar salix5

msg

parent 3998fb1a
......@@ -26,7 +26,6 @@ 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)
......@@ -75,6 +74,7 @@ function c48063985.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_REMOVED) and chkc:IsControler(tp) and c48063985.tgfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,nil)
and Duel.IsExistingMatchingCard(c48063985.thfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectTarget(tp,c48063985.tgfilter,tp,LOCATION_REMOVED,0,2,2,nil)
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,g,2,0,0)
......@@ -95,7 +95,6 @@ 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)
......@@ -108,6 +107,7 @@ function c48063985.sptg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return false end
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingTarget(c48063985.filter1,tp,LOCATION_REMOVED,0,1,nil,e,tp) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g1=Duel.SelectTarget(tp,c48063985.filter1,tp,LOCATION_REMOVED,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
......
......@@ -7,7 +7,6 @@ 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)
......@@ -29,6 +28,7 @@ function c69750546.condition(e,tp,eg,ep,ev,re,r,rp)
end
function c69750546.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
......@@ -48,10 +48,10 @@ 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
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
local g=Duel.GetMatchingGroup(Card.IsDestructable,tp,0,LOCATION_MZONE,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
......
......@@ -8,7 +8,6 @@ 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)
......@@ -25,7 +24,6 @@ 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)
......@@ -56,6 +54,7 @@ function c83236601.tgfilter(c)
end
function c83236601.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c83236601.tgfilter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,nil,1,tp,LOCATION_DECK)
end
function c83236601.tgop(e,tp,eg,ep,ev,re,r,rp)
......@@ -76,6 +75,7 @@ function c83236601.filter(c)
end
function c83236601.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c83236601.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c83236601.thop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -27,7 +27,6 @@ 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)
......@@ -46,6 +45,7 @@ end
function c84401683.negtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsControler(1-tp) and chkc:IsLocation(LOCATION_MZONE) and c84401683.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c84401683.filter,tp,0,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
local g=Duel.SelectTarget(tp,c84401683.filter,tp,0,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DISABLE,g,1,0,0)
......@@ -80,6 +80,7 @@ end
function c84401683.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and c84401683.desfilter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c84401683.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_OPSELECTED,1-tp,e:GetDescription())
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,c84401683.desfilter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,1,0,0)
......
......@@ -1117,8 +1117,3 @@ 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,chk)
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