Commit ba8315b1 authored by Nemo Ma's avatar Nemo Ma

fix

parent e044bf51
......@@ -43,11 +43,11 @@ function cm.spcon(e,c)
if c==nil then return true end
if c:IsHasEffect(EFFECT_NECRO_VALLEY) then return false end
local tp=c:GetControler()
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,c:GetControler(),LOCATION_GRAVE,0,1,c)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.spfilter,tp,LOCATION_GRAVE,0,1,c)
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_MZONE,0,1,1,c)
local g=Duel.SelectMatchingCard(tp,cm.spfilter,tp,LOCATION_GRAVE,0,1,1,c)
Duel.SendtoDeck(g,nil,2,REASON_COST)
end
function cm.tdfilter1(c)
......
......@@ -29,7 +29,7 @@ function cm.tdfilter(c)
return #tama.tamas_getElements(c)>0 and c:IsAbleToDeck()
end
function cm.thfilter(c,el)
return c:IsAbleToHand() and c:IsSetCard(0x3356) and tamas_isAllElementsNotAbove(tama.tamas_getElements(c),el)
return c:IsAbleToHand() and c:IsSetCard(0x3356) and tama.tamas_isAllElementsNotAbove(tama.tamas_getElements(c),el)
end
function cm.smtg(e,tp,eg,ep,ev,re,r,rp,chk)
--if chk==0 then return Duel.IsExistingTarget(cm.tdfilter,tp,0,LOCATION_GRAVE,1,nil) end
......
local m=15000183
local cm=_G["c"..m]
cm.name="上古星龙"
function cm.initial_effect(c)
c:EnableCounterPermit(0xf3)
--xyz summon
aux.AddXyzProcedure(c,nil,11,3)
c:EnableReviveLimit()
--special summon rule
local e0=Effect.CreateEffect(c)
e0:SetDescription(aux.Stringid(m,0))
e0:SetType(EFFECT_TYPE_FIELD)
e0:SetCode(EFFECT_SPSUMMON_PROC)
e0:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e0:SetCountLimit(1,15000183+EFFECT_COUNT_CODE_DUEL)
e0:SetRange(LOCATION_EXTRA)
e0:SetCondition(cm.RkXyzCondition(cm.sprfilter,nil,cm.sprop))
e0:SetTarget(cm.RkXyzTarget(cm.sprfilter,nil,cm.sprop))
e0:SetOperation(cm.RkXyzOperation(cm.sprfilter,nil,cm.sprop))
e0:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e0)
local e6=Effect.CreateEffect(c)
e6:SetDescription(aux.Stringid(m,0))
e6:SetType(EFFECT_TYPE_FIELD)
e6:SetCode(EFFECT_SPSUMMON_PROC)
e6:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e6:SetCountLimit(1,15000183+EFFECT_COUNT_CODE_DUEL)
e6:SetRange(LOCATION_EXTRA)
e6:SetCondition(cm.RkXyzCondition(cm.sprfilter,nil,cm.sprop))
e6:SetTarget(cm.RkXyzTarget(cm.sprfilter,nil,cm.sprop))
e6:SetOperation(cm.RkXyzOperation(cm.sprfilter,nil,cm.sprop))
e6:SetValue(SUMMON_TYPE_XYZ)
c:RegisterEffect(e6)
--add counter
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_COUNTER)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_MOVE)
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_ADJUST)
e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1)
e1:SetCondition(cm.ctcon)
e1:SetOperation(cm.ctop)
c:RegisterEffect(e1)
local e2=Effect.Clone(e1)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e2:SetCode(EVENT_FLIP)
e2:SetCondition(cm.ct2con)
c:RegisterEffect(e2)
......@@ -133,17 +134,14 @@ function cm.RkXyzOperation(alterf,desc,op)
mg:DeleteGroup()
end
end
function cm.ctcon(e)
local c=e:GetHandler()
return bit.band(c:GetPreviousLocation(),LOCATION_MZONE)==0 and c:IsLocation(LOCATION_MZONE)
function cm.ctcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsLocation(LOCATION_MZONE) and not e:GetHandler():IsPreviousLocation(LOCATION_MZONE)
end
function cm.ct2con(e)
local c=e:GetHandler()
function cm.ct2con(e,tp,eg,ep,ev,re,r,rp)
return true
end
function cm.ctop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tp=c:GetControler()
c:AddCounter(0xf3,12)
end
function cm.defilter(c)
......
......@@ -99,7 +99,7 @@ function c33400435.cccfilter2(c)
end
function c33400435.actcon(e)
local tc=e:GetHandler():GetBattleTarget()
return tc:IsFaceup() and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) and (tc:IsSetCard(0x341) or (Duel.IsExistingMatchingCard(c33400435.cccfilter1,tp,LOCATION_SZONE,0,1,nil) or Duel.IsExistingMatchingCard(c33400435.cccfilter2,tp,LOCATION_MZONE,0,1,nil)))
return tc and tc:IsFaceup() and (Duel.GetAttacker()==e:GetHandler() or Duel.GetAttackTarget()==e:GetHandler()) and (tc:IsSetCard(0x341) or (Duel.IsExistingMatchingCard(c33400435.cccfilter1,tp,LOCATION_SZONE,0,1,nil) or Duel.IsExistingMatchingCard(c33400435.cccfilter2,tp,LOCATION_MZONE,0,1,nil)))
end
function c33400435.eqcon(e)
......
......@@ -214,7 +214,7 @@ function cm.GraveActCostOp(e,tp,eg,ep,ev,re,r,rp)
Duel.MoveToField(e:GetHandler(),tp,tp,LOCATION_SZONE,POS_FACEUP,true)
end
function cm.FanippetTrapSPCondition(e,tp,eg,ep,ev,re,r,rp)
return rp==1-tp or ep==1-tp
return rp==1-tp or ep==1-tp or re:GetHandler():IsCode(53716006)
end
function cm.FanippetTrapSPCost(code)
return
......
......@@ -17,26 +17,19 @@ function c60000038.initial_effect(c)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_TO_GRAVE)
e3:SetCondition(c60000038.thcon)
e3:SetTarget(c60000038.thtg)
e3:SetOperation(c60000038.thop)
c:RegisterEffect(e3)
end
function cm.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetLevel()<=e:GetHandler():GetLevel()
end
function c60000038.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_ONFIELD)
end
function c60000038.thfilter(c)
return c:IsSetCard(0xfc) and not c:IsCode(60000038) and c:IsAbleToHand()
function c60000038.aclimit(e,re,tp)
return re:IsActiveType(TYPE_MONSTER) and re:GetHandler():GetLevel()<=e:GetHandler():GetLevel()
end
function c60000038.filter(c,e,tp)
return c:IsType(TYPE_FUSION) and c:CheckFusionMaterial() and c:IsCanBeSpecialSummoned(e,SUMMON_TYPE_FUSION,tp,false,false) and Duel.GetLocationCountFromEx(tp,tp,nil,c)>0 and c:IsSetCard(0x625)
end
function c60000038.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return ux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c60000038.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp)end
if chk==0 then return aux.MustMaterialCheck(nil,tp,EFFECT_MUST_BE_FMATERIAL)
and Duel.IsExistingMatchingCard(c60000038.filter,tp,LOCATION_EXTRA,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_EXTRA)
end
function c60000038.thop(e,tp,eg,ep,ev,re,r,rp)
......@@ -50,8 +43,3 @@ function c60000038.thop(e,tp,eg,ep,ev,re,r,rp)
tc:CompleteProcedure()
Duel.Hint(HINT_SOUND,0,aux.Stringid(60000038,1))
end
......@@ -25,9 +25,10 @@ function c9910518.initial_effect(c)
e3:SetCategory(CATEGORY_ATKCHANGE+CATEGORY_DISABLE)
e3:SetType(EFFECT_TYPE_QUICK_O)
e3:SetCode(EVENT_FREE_CHAIN)
e3:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e3:SetRange(LOCATION_MZONE)
e3:SetCountLimit(1,9910533)
e3:SetHintTiming(0,TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetHintTiming(TIMING_DAMAGE_STEP,TIMING_DAMAGE_STEP+TIMINGS_CHECK_MONSTER+TIMING_END_PHASE)
e3:SetCondition(c9910518.atkcon)
e3:SetCost(c9910518.atkcost)
e3:SetTarget(c9910518.atktg)
......
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