Commit 2ed2e8e1 authored by HidarimeYume's avatar HidarimeYume

23.7.9 yume upd

parent c6f03e36
No preview for this file type
......@@ -24,7 +24,7 @@ function c71401001.initial_effect(c)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,71501001)
e2:SetCost(c71401001.cost2)
e2:SetCost(yume.ButterflyLimitCost)
e2:SetTarget(c71401001.tg2)
e2:SetOperation(c71401001.op2)
c:RegisterEffect(e2)
......@@ -63,10 +63,6 @@ end
function c71401001.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
end
function c71401001.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401001.filter2(c,e,tp,check)
return c:IsRace(RACE_SPELLCASTER) and c:IsLevel(4)
and (c:IsAbleToHand() or check and c:IsCanBeSpecialSummoned(e,0,tp,false,false))
......@@ -132,7 +128,7 @@ function yume.AddButterflySpell(c,id)
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id)
e1:SetCost(yume.ButterflyPlaceCost)
e1:SetCost(yume.ButterflyLimitCost)
e1:SetTarget(yume.ButterflyPlaceTg)
e1:SetOperation(yume.ButterflySpellOp)
c:RegisterEffect(e1)
......@@ -140,7 +136,7 @@ end
function yume.ButterflyPlaceTg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_SZONE)>0 and e:GetHandler():CheckUniqueOnField(tp) end
end
function yume.ButterflyPlaceCost(e,tp,eg,ep,ev,re,r,rp,chk)
function yume.ButterflyLimitCost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
......@@ -163,7 +159,7 @@ function yume.AddButterflyTrap(c,id)
e1:SetRange(LOCATION_HAND)
e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1,id)
e1:SetCost(yume.ButterflyPlaceCost)
e1:SetCost(yume.ButterflyLimitCost)
e1:SetTarget(yume.ButterflyPlaceTg)
e1:SetOperation(yume.ButterflyTrapOp)
c:RegisterEffect(e1)
......
......@@ -6,7 +6,7 @@ function c71401002.initial_effect(c)
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(71401002,0))
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_CHAINING)
e2:SetRange(LOCATION_SZONE)
......
......@@ -31,11 +31,11 @@ function c71401003.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.Remove(g,POS_FACEUP,REASON_COST)
yume.RegButterflyCostLimit(e,tp)
end
function c71401003.filter2(c)
function c71401003.filter2(c,tp)
return c:IsRace(RACE_SPELLCASTER) and c:IsAttribute(ATTRIBUTE_LIGHT) and (c:IsLocation(LOCATION_GRAVE) or c:IsFaceup()) and (c:IsAbleToHand() or not c:IsForbidden() and c:CheckUniqueOnField(tp))
end
function c71401003.tg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil) end
if chk==0 then return Duel.IsExistingMatchingCard(c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_GRAVE+LOCATION_REMOVED)
end
function c71401003.filter2a(c)
......@@ -43,7 +43,7 @@ function c71401003.filter2a(c)
end
function c71401003.op2(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_OPERATECARD)
local g=Duel.SelectMatchingCard(tp,c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil)
local g=Duel.SelectMatchingCard(tp,c71401003.filter2,tp,LOCATION_GRAVE+LOCATION_REMOVED,0,1,1,nil,tp)
local tc=g:GetFirst()
if tc then
local b1=tc:IsAbleToHand()
......
......@@ -37,7 +37,7 @@ function c71401004.initial_effect(c)
e2:SetCode(EVENT_LEAVE_FIELD)
e2:SetCountLimit(1,71501004)
e2:SetCondition(c71401004.con2)
e2:SetCost(c71401004.cost2)
e2:SetCost(yume.ButterflyLimitCost)
e2:SetTarget(c71401004.tg2)
e2:SetOperation(c71401004.op2)
c:RegisterEffect(e2)
......@@ -71,10 +71,6 @@ function c71401004.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71401004.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401004.con2(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
return c:IsPreviousPosition(POS_FACEUP)
......
......@@ -23,7 +23,7 @@ function c71401007.initial_effect(c)
e2:SetCode(EVENT_REMOVE)
e2:SetProperty(EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,71501007)
e2:SetCost(c71401007.cost2)
e2:SetCost(yume.ButterflyLimitCost)
e2:SetTarget(c71401007.tg2)
e2:SetOperation(c71401007.op2)
c:RegisterEffect(e2)
......@@ -49,10 +49,6 @@ function c71401007.op1(e,tp,eg,ep,ev,re,r,rp)
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
end
function c71401007.cost2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetCustomActivityCount(71401001,tp,ACTIVITY_CHAIN)==0 end
yume.RegButterflyCostLimit(e,tp)
end
function c71401007.filter2ext(c)
return c:IsFaceup() and c:IsType(TYPE_CONTINUOUS)
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