Commit 6ce8c52c authored by POLYMER's avatar POLYMER

fix

parent 3f354a23
......@@ -38,7 +38,7 @@ function cm.initial_effect(c)
e3:SetRange(QY_mx)
e3:SetCountLimit(1, m + 1)
e3:SetCondition(cm.spcon2)
--e3:SetCost(cm.spcost2)
e3:SetCost(cm.spcost2)
e3:SetTarget(cm.sptg2)
e3:SetOperation(cm.spop2)
c:RegisterEffect(e3)
......@@ -133,7 +133,7 @@ function cm.spop2(e, tp, eg, ep, ev, re, r, rp)
return c:CheckFusionMaterial(mg1, nil, tp) and
c:IsCanBeSpecialSummoned(e, SUMMON_TYPE_FUSION, tp, false, false)
end, tp, LOCATION_EXTRA, 0, 1, nil)
if (cl:GetCount() > 0 or lj:GetCount() > 0 or td:GetCount() > 0 or rh:GetCount() > 0) and Duel.SelectYesNo(tp, aux.Stringid(id, 0)) then
if (cl:GetCount() > 0 or lj:GetCount() > 0 or td:GetCount() > 0 or rh:GetCount() > 0) and Duel.SelectYesNo(tp, aux.Stringid(m, 0)) then
local off = 1
local ops = {}
local opval = {}
......
......@@ -22,12 +22,15 @@ function cm.initial_effect(c)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetRange(LOCATION_HAND + LOCATION_SZONE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET + EFFECT_FLAG_CONTINUOUS_TARGET + EFFECT_FLAG_SET_AVAILABLE)
e1:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return not Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) or
local c = e:GetHandler()
return (c:IsLocation(LOCATION_HAND) and
(not Duel.IsExistingMatchingCard(nil, tp, LOCATION_MZONE, 0, 1, nil) or
Duel.IsExistingMatchingCard(function(c)
return c:IsType(TYPE_EQUIP) and c:IsFaceup()
end, tp, LOCATION_SZONE, 0, 1, nil)
end, tp, LOCATION_SZONE, 0, 1, nil))) or
(not c:IsLocation(LOCATION_HAND) and Duel.IsMainPhase() and Duel.IsTurnPlayer(tp))
end)
e1:SetTarget(function(e, tp, eg, ep, ev, re, r, rp, chk, chkc)
local c = e:GetHandler()
......@@ -63,10 +66,16 @@ function cm.initial_effect(c)
local e2 = Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_EQUIP)
e2:SetCode(EFFECT_DISABLE_EFFECT)
e2:SetValue(RESET_TURN_SET)
-- e2:SetValue(RESET_TURN_SET)
c:RegisterEffect(e2)
-- local e4 = Effect.CreateEffect(c)
-- e4:SetDescription(aux.Stringid(m, 1))
-- e4:SetType(EFFECT_TYPE_SINGLE + EFFECT_TYPE_CONTINUOUS)
-- e4:SetCode(EVENT_DESTROYED)
-- e4:SetCondition(cm.setcon)
-- e4:SetOperation(cm.setop)
-- c:RegisterEffect(e4)
local e11 = Effect.CreateEffect(c)
e11:SetDescription(aux.Stringid(m, 0))
......@@ -80,6 +89,35 @@ function cm.initial_effect(c)
c:RegisterEffect(e11)
end
function cm.setcon(e, tp, eg, ep, ev, re, r, rp)
return e:GetHandler():IsReason(REASON_LOST_TARGET)
and not e:GetHandler():GetPreviousEquipTarget():IsLocation(LOCATION_ONFIELD + LOCATION_OVERLAY)
end
function cm.setop(e, tp, eg, ep, ev, re, r, rp)
local c = e:GetHandler()
-- 创立一个永续效果,下个回合的准备阶段将卡号为m的卡加入手卡
local e = Effect.CreateEffect(c)
e:SetType(EFFECT_TYPE_FIELD + EFFECT_TYPE_CONTINUOUS)
e:SetCode(EVENT_PHASE + PHASE_STANDBY)
e:SetCountLimit(1)
e:SetCondition(function(e, tp, eg, ep, ev, re, r, rp)
return Duel.GetTurnCount() ~= e:GetLabel()
end)
e:SetOperation(function(e, tp, eg, ep, ev, re, r, rp)
local g = Duel.GetMatchingGroup(Card.IsCode, tp, LOCATION_GRAVE + LOCATION_REMOVED, 0, nil, m)
if #g > 0 then
local tc = g:GetFirst()
Duel.SendtoHand(tc, tp, REASON_EFFECT)
Duel.ConfirmCards(1 - tp, tc)
Duel.ShuffleHand(tp)
end
e:Reset()
end)
e:SetLabel(Duel.GetTurnCount())
e:SetReset(RESET_PHASE + PHASE_STANDBY)
Duel.RegisterEffect(e, tp)
end
function cm.filter(c, ec)
return c == ec --c:GetEquipTarget() == ec and c:IsType(TYPE_SPELL + TYPE_TRAP)
......
--存在之间
--V1.0.0.1
--V1.0.1.2
local m = 16670000
it = it or {}
it.diyai = { "AI_Nf.ydk", "AI_TheDreamLand.ydk", "AI_best-friend.ydk", "AI_stars.ydk", "AI_Tianjuelong.ydk",
......
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