Commit 47ca82eb authored by POLYMER's avatar POLYMER

fix

parent 759d5d5e
No preview for this file type
No preview for this file type
...@@ -86,7 +86,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -86,7 +86,7 @@ function cm.operation(e,tp,eg,ep,ev,re,r,rp)
if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then if r and not e:GetHandler():IsLocation(LOCATION_GRAVE) and not e:GetHandler():IsLocation(LOCATION_REMOVED) then
Duel.BreakEffect() Duel.BreakEffect()
local ph=Duel.GetCurrentPhase() local ph=Duel.GetCurrentPhase()
if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)~=0 and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then if Duel.SendtoGrave(e:GetHandler(),REASON_EFFECT)~=0 and e:GetHandler():IsLocation(LOCATION_GRAVE) and ph>=PHASE_BATTLE_START and ph<=PHASE_BATTLE then
Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1) Duel.SkipPhase(Duel.GetTurnPlayer(),PHASE_BATTLE,RESET_PHASE+PHASE_BATTLE_STEP,1)
end end
end end
......
--abyss of dragon palace --abyss of dragon palace
local m=11451424 local cm,m=GetID()
local cm=_G["c"..m]
function cm.initial_effect(c) function cm.initial_effect(c)
--spsummon --spsummon
local e3=Effect.CreateEffect(c) local e3=Effect.CreateEffect(c)
...@@ -77,6 +76,7 @@ function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -77,6 +76,7 @@ function cm.detg(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2) e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,2)
c:SetTurnCounter(0) c:SetTurnCounter(0)
c:RegisterEffect(e1) c:RegisterEffect(e1)
e:SetCategory(0)
if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then if Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingMatchingCard(cm.filter,tp,LOCATION_HAND+LOCATION_GRAVE,0,1,nil,e,tp) and Duel.SelectYesNo(tp,aux.Stringid(m,6)) then
e:SetCategory(CATEGORY_SPECIAL_SUMMON) e:SetCategory(CATEGORY_SPECIAL_SUMMON)
e:GetLabelObject():UseCountLimit(tp) e:GetLabelObject():UseCountLimit(tp)
......
...@@ -2,10 +2,8 @@ ...@@ -2,10 +2,8 @@
local cm,m=GetID() local cm,m=GetID()
cm.named_with_Arknight=1 cm.named_with_Arknight=1
function cm.initial_effect(c) function cm.initial_effect(c)
aux.AddCodeList(c,29065500)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(m,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND+LOCATION_GRAVE) e1:SetRange(LOCATION_HAND+LOCATION_GRAVE)
...@@ -51,6 +49,9 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -51,6 +49,9 @@ function cm.destg(e,tp,eg,ep,ev,re,r,rp,chk)
local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0xe000e0) local fd=Duel.SelectDisableField(tp,1,LOCATION_MZONE,LOCATION_MZONE,0xe000e0)
Duel.SetTargetParam(fd) Duel.SetTargetParam(fd)
Duel.Hint(HINT_ZONE,tp,fd) Duel.Hint(HINT_ZONE,tp,fd)
local fd2=fd
if fd>=1<<16 then fd2=fd>>16 else fd2=fd<<16 end
Duel.Hint(HINT_ZONE,1-tp,fd2)
end end
function cm.desop(e,tp,eg,ep,ev,re,r,rp) function cm.desop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
...@@ -86,7 +87,7 @@ function cm.GetCardsInZone(tp,fd) ...@@ -86,7 +87,7 @@ function cm.GetCardsInZone(tp,fd)
loc=LOCATION_SZONE loc=LOCATION_SZONE
seq=seq-8 seq=seq-8
end end
return Duel.GetFieldCard(p,loc,seq) return Duel.GetFieldCard(p,loc,math.floor(seq+0.5))
end end
function cm.descon(e,tp,eg,ep,ev,re,r,rp) function cm.descon(e,tp,eg,ep,ev,re,r,rp)
local fd,tid=e:GetLabel() local fd,tid=e:GetLabel()
......
--彷徨之狱龙
local m=40010892
local cm=_G["c"..m]
function cm.initial_effect(c)
c:EnableReviveLimit()
--special summon condition
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e1:SetCode(EFFECT_SPSUMMON_CONDITION)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_FIELD)
e2:SetProperty(EFFECT_FLAG_CANNOT_DISABLE+EFFECT_FLAG_UNCOPYABLE)
e2:SetCode(EFFECT_SPSUMMON_PROC)
e2:SetRange(LOCATION_GRAVE)
e2:SetCountLimit(1,m+EFFECT_COUNT_CODE_OATH)
e2:SetCondition(cm.spcon)
e2:SetTarget(cm.sptg)
e2:SetOperation(cm.spop)
c:RegisterEffect(e2)
--recover
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(m,0))
e3:SetCategory(CATEGORY_DRAW+CATEGORY_HANDES)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_HAND)
e3:SetCondition(cm.condition)
e3:SetCost(cm.cost)
e3:SetTarget(cm.drtg)
e3:SetOperation(cm.drop)
c:RegisterEffect(e3)
--to grave
local e5=Effect.CreateEffect(c)
e5:SetDescription(aux.Stringid(m,1))
e5:SetCategory(CATEGORY_TOGRAVE)
e5:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_F)
e5:SetRange(LOCATION_MZONE)
e5:SetCountLimit(1)
e5:SetCode(EVENT_PHASE+PHASE_END)
e5:SetTarget(cm.tgtg)
e5:SetOperation(cm.tgop)
c:RegisterEffect(e5)
end
function cm.spcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
return Duel.IsPlayerCanDiscardDeck(tp,1)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():GetFlagEffect(m)<1
end
function cm.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDiscardDeck(tp,1) end
local g=Duel.GetDecktopGroup(tp,1)
local tc=g:GetFirst()
if tc:IsType(TYPE_MONSTER) then
return true
else
Duel.DiscardDeck(tp,1,REASON_EFFECT+REASON_COST)
e:GetHandler():RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
return false
end
end
function cm.spop(e,tp,eg,ep,ev,re,r,rp,c)
local c=e:GetHandler()
Duel.DiscardDeck(tp,1,REASON_EFFECT+REASON_COST)
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
local fid=e:GetHandler():GetFieldID()
c:RegisterFlagEffect(m,RESET_EVENT+RESETS_STANDARD,0,1,fid)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_UPDATE_ATTACK)
e1:SetProperty(EFFECT_FLAG_SINGLE_RANGE)
e1:SetRange(LOCATION_MZONE)
e1:SetValue(cm.atkct)
e1:SetReset(RESET_EVENT+0xff0000)
c:RegisterEffect(e1)
c:CompleteProcedure()
end
function cm.atkct(e)
return Duel.GetMatchingGroupCount(Card.IsType,e:GetHandlerPlayer(),LOCATION_GRAVE,0,nil,TYPE_MONSTER)*500
end
function cm.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetCurrentPhase()==PHASE_MAIN1 and not Duel.CheckPhaseActivity()
end
function cm.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end
end
function cm.drtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsPlayerCanDraw(tp,1) end
Duel.SetOperationInfo(0,CATEGORY_HANDES,nil,0,tp,1)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,1)
end
function cm.drop(e,tp,eg,ep,ev,re,r,rp)
if Duel.Draw(tp,1,REASON_EFFECT)~=0 then
Duel.ShuffleHand(tp)
Duel.BreakEffect()
Duel.DiscardHand(tp,nil,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
function cm.tgtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_TOGRAVE,e:GetHandler(),1,0,0)
end
function cm.tgop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) and c:IsFaceup() then
Duel.SendtoGrave(c,REASON_EFFECT)
end
end
...@@ -75,8 +75,15 @@ end ...@@ -75,8 +75,15 @@ end
function cm.thcon(e,tp,eg,ep,ev,re,r,rp) function cm.thcon(e,tp,eg,ep,ev,re,r,rp)
return re:GetHandler()~=e:GetHandler() return re:GetHandler()~=e:GetHandler()
end end
function cm.cfilter(c)
return cm.MagicCombineDemon(c) and c:IsAbleToGraveAsCost()
end
function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk) function cm.thcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not e:GetHandler():IsPublic() end if chk==0 then return Duel.IsExistingMatchingCard(cm.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,nil) and not e:GetHandler():IsPublic() end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,cm.cfilter,tp,LOCATION_DECK+LOCATION_EXTRA,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
end end
function cm.thfilter(c) function cm.thfilter(c)
return cm.MagicCombineMagic(c) and c:IsAbleToHand() return cm.MagicCombineMagic(c) and c:IsAbleToHand()
......
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