Commit 075a6d4c authored by salix5's avatar salix5

fix フォーチュン・インハーリット

■自分の手札に「フォーチュンレディ」と名のついたモンスターが存在しない場合でも、「フォーチュン・インハーリット」のカードの発動を行う事はできます。(次の自分のスタンバイフェイズに、自分の手札に「フォーチュンレディ」と名のついたモンスターが存在しない場合、『手札から「フォーチュンレディ」と名のついたモンスターを2体まで特殊召喚する事ができる』効果を発動する事はできません。)
parent c2aaabd6
...@@ -43,46 +43,40 @@ function c20057949.condition(e,tp,eg,ep,ev,re,r,rp) ...@@ -43,46 +43,40 @@ function c20057949.condition(e,tp,eg,ep,ev,re,r,rp)
end end
function c20057949.activate(e,tp,eg,ep,ev,re,r,rp) function c20057949.activate(e,tp,eg,ep,ev,re,r,rp)
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY) e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1) e1:SetCountLimit(1)
e1:SetLabel(Duel.GetTurnCount()) e1:SetLabel(Duel.GetTurnCount())
e1:SetCondition(c20057949.spcon1) if Duel.GetTurnPlayer()==tp and Duel.GetCurrentPhase()<PHASE_STANDBY then
e1:SetOperation(c20057949.spop1) e1:SetCondition(c20057949.spcon1)
if Duel.GetTurnPlayer()==tp then e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
elseif Duel.GetTurnPlayer()==tp then
e1:SetCondition(c20057949.spcon2)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else else
e1:SetCondition(c20057949.spcon2)
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1) e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,1)
end end
e1:SetTarget(c20057949.sptg1)
e1:SetOperation(c20057949.spop1)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
end end
function c20057949.spcon1(e,tp,eg,ep,ev,re,r,rp) function c20057949.spcon1(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()==e:GetLabel() and Duel.GetTurnPlayer()==tp
end
function c20057949.spcon2(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp return Duel.GetTurnCount()~=e:GetLabel() and Duel.GetTurnPlayer()==tp
end end
function c20057949.filter(c,e,tp) function c20057949.filter(c,e,tp)
return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false) return c:IsSetCard(0x31) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
function c20057949.spop1(e,tp,eg,ep,ev,re,r,rp) function c20057949.sptg1(e,tp,eg,ep,ev,re,r,rp,chk)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c20057949.filter,tp,LOCATION_HAND,0,1,nil,e,tp) and Duel.IsExistingMatchingCard(c20057949.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
and Duel.SelectYesNo(tp,aux.Stringid(20057949,0)) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetDescription(aux.Stringid(20057949,1))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetTarget(c20057949.sptg2)
e1:SetOperation(c20057949.spop2)
e1:SetReset(RESET_PHASE+PHASE_STANDBY)
Duel.RegisterEffect(e1,tp)
end
end
function c20057949.sptg2(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end end
function c20057949.spop2(e,tp,eg,ep,ev,re,r,rp) function c20057949.spop1(e,tp,eg,ep,ev,re,r,rp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE) local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft<=0 then return end if ft<=0 then return end
if ft>2 then ft=2 end if ft>2 then ft=2 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