Commit 83780a64 authored by 聖園ミカ's avatar 聖園ミカ 🐟

1+1=3

parent 02558b1c
......@@ -5,7 +5,7 @@ Duel.LoadScript("c81000000.lua")
function cm.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DESTROY)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x11e0)
......@@ -51,25 +51,26 @@ function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return ct>1
end
function cm.target(e,tp,eg,ep,ev,re,r,rp,chk)
local ct=e:GetLabel()
if chk==0 then return ct>1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil)
or ct>2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) end
local rct=0
local gt=e:GetLabel()
if chk==0 then return (gt>1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil))
or (gt>2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil)) end
local rgt=0
local loc=0
if ct>1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then
rct=rct+1
if gt>1 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,nil) then
rgt=rgt+1
loc=loc+LOCATION_ONFIELD+LOCATION_GRAVE
end
if ct>2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) then
rct=rct+1
if gt>2 and Duel.IsExistingMatchingCard(Card.IsAbleToRemove,tp,0,LOCATION_HAND,1,nil) then
rgt=rgt+1
loc=loc+LOCATION_HAND
end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,rct,0,loc)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,rgt,0,loc)
end
function cm.activate(e,tp,eg,ep,ev,re,r,rp)
local ct=cm.get_count(g)
local g=Duel.GetMatchingGroup(cm.cfilter,tp,LOCATION_MZONE,0,nil)
local gt=cm.get_count(g)
local rflag=false
if ct>1 then
if gt>1 then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,Card.IsAbleToRemove,tp,0,LOCATION_ONFIELD+LOCATION_GRAVE,1,1,nil)
if g:GetCount()>0 then
......@@ -78,7 +79,7 @@ function cm.activate(e,tp,eg,ep,ev,re,r,rp)
rflag=true
end
end
if ct>2 then
if gt>2 then
local g=Duel.GetMatchingGroup(Card.IsAbleToRemove,tp,0,LOCATION_HAND,nil)
if g:GetCount()>0 then
if rflag then Duel.BreakEffect() 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