Commit 5143f8d3 authored by Tachibana's avatar Tachibana

得得得得得

parent d85644d3
Pipeline #12051 passed with stages
in 25 minutes
......@@ -51,9 +51,22 @@ function cm.initial_effect(c)
e4:SetTarget(cm.thtg)
e4:SetOperation(cm.thop)
c:RegisterEffect(e4)
--Activate
local e5=Effect.CreateEffect(c)
e5:SetCategory(CATEGORY_DRAW)
e5:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e5:SetCode(EVENT_SPSUMMON_SUCCESS)
e5:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetCondition(cm.condition)
e5:SetTarget(cm.target)
e5:SetOperation(cm.activate)
c:RegisterEffect(e1)
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsSummonType(SUMMON_TYPE_FUSION)
end
function cm.cfilter(c,fc)
return c:IsAbleToGraveAsCost() and (c:IsControler(fc:GetControler()) or c:IsFaceup())
return c:IsAbleToGraveAsCost()
end
function cm.rectg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
......@@ -112,3 +125,13 @@ function cm.thop(e,tp,eg,ep,ev,re,r,rp)
Duel.SendtoHand(tc,nil,REASON_EFFECT)
end
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(1-tp,5) end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(5)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,1-tp,5)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
end
\ No newline at end of file
......@@ -52,7 +52,7 @@ function c33200506.activate(e,tp,eg,ep,ev,re,r,rp)
local g2=Duel.SelectMatchingCard(tp,aux.NecroValleyFilter(c33200506.spfilter),tp,LOCATION_HAND+LOCATION_GRAVE,0,1,1,nil,e,tp,chk1)
if g1:GetCount()>0 and g2:GetCount()>0 then
Duel.SendtoDeck(g1,nil,2,REASON_EFFECT)
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
Duel.SpecialSummon(g2,0,tp,tp,false,false,POS_FACEUP)
end
end
end
......
......@@ -29,7 +29,7 @@ end
function c33200508.activate(e,tp,eg,ep,ev,re,r,rp)
if not e:GetHandler():IsRelateToEffect(e) then return end
local g=Duel.GetMatchingGroup(c33200508.filter,tp,LOCATION_DECK,0,nil)
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33200508,1)) then
if g:GetCount()>0 and Duel.SelectYesNo(tp,aux.Stringid(33200508,0)) then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local sg=g:Select(tp,1,1,nil)
if Duel.SendtoHand(sg,nil,REASON_EFFECT) then
......
......@@ -81,6 +81,7 @@ function cm.acop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.SelectMatchingCard(tp,cm.acfilter,tp,LOCATION_DECK,0,1,1,nil,tp):GetFirst()
if tc then
Duel.SendtoHand(tc,tp,REASON_EFFECT)
Duel.ConfirmCards(1-tp,tc)
end
Duel.Hint(24,0,aux.Stringid(m,8))
end
\ No newline at end of file
......@@ -53,7 +53,7 @@ function cm.posop(e,tp,eg,ep,ev,re,r,rp)
if #g>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
local atk=g:GetFirst():GetTextAttack()
if atk>0 and tc:IsRelateToEffect(e) and Duel.Recover(tp,atk,REASON_EFFECT)>tc:GetAttack() then
if atk>0 and tc:IsRelateToEffect(e) and Duel.Recover(tp,atk,REASON_EFFECT)>=tc:GetAttack() then
Duel.SendtoGrave(tc,REASON_EFFECT)
end
end
......
......@@ -41,7 +41,7 @@ function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() end
if chk==0 then return Duel.IsExistingTarget(Card.IsSetCard,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil,0xa2c2) and Duel.IsExistingMatchingCard(cm.f,tp,LOCATION_GRAVE,LOCATION_GRAVE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectTarget(tp,nil,tp,LOCATION_ONFIELD,0,1,1,nil)
local g=Duel.SelectTarget(tp,Card.IsSetCard,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil,0xa2c2)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,g,1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
......
......@@ -42,7 +42,7 @@ function cm.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp)
end
function cm.thfilter(c)
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa2c2) and c:IsAbleToHand() and (c:IsLocation(LOCATION_HAND) or c:IsFaceup())
return c:IsType(TYPE_MONSTER) and c:IsSetCard(0xa2c2) and c:IsAbleToHand() and (c:IsLocation(LOCATION_DECK) or c:IsFaceup())
end
function cm.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local th=Duel.GetMatchingGroup(cm.thfilter,tp,LOCATION_DECK+LOCATION_GRAVE+LOCATION_REMOVED,0,nil)
......
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