Commit f6bd5f6f authored by mercury233's avatar mercury233 Committed by GitHub

format (#2350)

* remove not fully implemented for Dinomorphia Reversion

Duel.GetReadyChain was implemented already

* useless comment

* minor format
parent 1aac67ed
...@@ -62,7 +62,7 @@ function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -62,7 +62,7 @@ function c10000030.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp) function c10000030.operation1(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.GetControl(tc,tp,PHASE_END,1) Duel.GetControl(tc,tp,PHASE_END,1)
end end
......
...@@ -56,7 +56,7 @@ function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -56,7 +56,7 @@ function c22339232.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp) function c22339232.tgop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN) Duel.SendtoGrave(tc,REASON_EFFECT+REASON_RETURN)
end end
......
--ダイノルフィア・リヴァージョン --ダイノルフィア・リヴァージョン
--not fully implemented
function c28292031.initial_effect(c) function c28292031.initial_effect(c)
--Activate --Activate
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
......
--三眼の死霊 --三眼の死霊
function c31464658.initial_effect(c) function c31464658.initial_effect(c)
--to hand --to hand
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(31464658,0)) e1:SetDescription(aux.Stringid(31464658,0))
e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND) e1:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
...@@ -10,7 +10,7 @@ function c31464658.initial_effect(c) ...@@ -10,7 +10,7 @@ function c31464658.initial_effect(c)
e1:SetCost(c31464658.cost) e1:SetCost(c31464658.cost)
e1:SetTarget(c31464658.target) e1:SetTarget(c31464658.target)
e1:SetOperation(c31464658.operation) e1:SetOperation(c31464658.operation)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c31464658.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c31464658.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local c=e:GetHandler() local c=e:GetHandler()
......
...@@ -65,7 +65,7 @@ function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -65,7 +65,7 @@ function c40005099.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
function c40005099.operation(e,tp,eg,ep,ev,re,r,rp) function c40005099.operation(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget() local tc=Duel.GetFirstTarget()
if e:GetLabel()==0 then if e:GetLabel()==0 then
if tc:IsRelateToEffect(e) then if tc:IsRelateToEffect(e) then
Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(tc,0,tp,tp,false,false,POS_FACEUP)
end end
......
...@@ -61,7 +61,6 @@ function c42925441.effcost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -61,7 +61,6 @@ function c42925441.effcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():GetFlagEffect(42925441)==0 end if chk==0 then return e:GetHandler():GetFlagEffect(42925441)==0 end
e:GetHandler():RegisterFlagEffect(42925441,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1) e:GetHandler():RegisterFlagEffect(42925441,RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END,0,1)
end end
--option 1
function c42925441.costfilter1(c,e,tp) function c42925441.costfilter1(c,e,tp)
return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c42925441.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c42925441.spfilter1,tp,LOCATION_DECK,0,1,nil,e,tp,c)
...@@ -70,14 +69,12 @@ function c42925441.spfilter1(c,e,tp,cc) ...@@ -70,14 +69,12 @@ function c42925441.spfilter1(c,e,tp,cc)
return c:IsSetCard(0x55) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(cc:GetOriginalCodeRule()) return c:IsSetCard(0x55) and c:IsType(TYPE_MONSTER) and not c:IsOriginalCodeRule(cc:GetOriginalCodeRule())
and c:IsCanBeSpecialSummoned(e,0,tp,false,false) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end end
--option 2
function c42925441.costfilter2(c) function c42925441.costfilter2(c)
return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsSetCard(0x55,0x7b) and c:IsAbleToGraveAsCost()
end end
function c42925441.thfilter(c) function c42925441.thfilter(c)
return c:IsSetCard(0x55) and not c:IsCode(42925441) and c:IsAbleToHand() return c:IsSetCard(0x55) and not c:IsCode(42925441) and c:IsAbleToHand()
end end
--option both
function c42925441.costfilter3(c,e,tp) function c42925441.costfilter3(c,e,tp)
return c:IsFaceup() and c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost() return c:IsFaceup() and c:IsCode(93717133) and Duel.GetMZoneCount(tp,c)>0 and c:IsAbleToGraveAsCost()
and Duel.IsExistingMatchingCard(c42925441.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c) and Duel.IsExistingMatchingCard(c42925441.spfilter2,tp,LOCATION_DECK,0,1,nil,e,tp,c)
......
...@@ -24,8 +24,6 @@ function s.initial_effect(c) ...@@ -24,8 +24,6 @@ function s.initial_effect(c)
e2:SetOperation(s.daop) e2:SetOperation(s.daop)
c:RegisterEffect(e2) c:RegisterEffect(e2)
end end
--special summon
function s.spcon(e,tp,eg,ep,ev,re,r,rp) function s.spcon(e,tp,eg,ep,ev,re,r,rp)
return ep==tp and Duel.GetAttacker():IsControler(1-tp) return ep==tp and Duel.GetAttacker():IsControler(1-tp)
end end
...@@ -53,8 +51,6 @@ end ...@@ -53,8 +51,6 @@ end
function s.skipop(e,tp,eg,ep,ev,re,r,rp) function s.skipop(e,tp,eg,ep,ev,re,r,rp)
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
--damage
function s.dacon(e,tp,eg,ep,ev,re,r,rp) function s.dacon(e,tp,eg,ep,ev,re,r,rp)
if ep~=tp then return false end if ep~=tp then return false end
return r&REASON_EFFECT>0 and rp==1-tp return r&REASON_EFFECT>0 and rp==1-tp
......
...@@ -26,7 +26,6 @@ function c43378048.initial_effect(c) ...@@ -26,7 +26,6 @@ function c43378048.initial_effect(c)
e3:SetValue(c43378048.atkval) e3:SetValue(c43378048.atkval)
c:RegisterEffect(e3) c:RegisterEffect(e3)
end end
function c43378048.splimit(e,se,sp,st) function c43378048.splimit(e,se,sp,st)
return e:GetHandler():GetLocation()~=LOCATION_EXTRA return e:GetHandler():GetLocation()~=LOCATION_EXTRA
end end
......
...@@ -47,4 +47,3 @@ function c53936268.operation(e,tp,eg,ep,ev,re,r,rp) ...@@ -47,4 +47,3 @@ function c53936268.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
...@@ -33,7 +33,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -33,7 +33,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
end end
local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil) local b1=Duel.IsPlayerCanDraw(tp,1) and Duel.IsExistingTarget(c581014.filter1,tp,LOCATION_GRAVE,0,3,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c581014.filter2,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
...@@ -58,7 +58,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc) ...@@ -58,7 +58,7 @@ function c581014.target1(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
end end
end end
function c581014.operation1(e,tp,eg,ep,ev,re,r,rp) function c581014.operation1(e,tp,eg,ep,ev,re,r,rp)
if e:GetLabel()==0 then if e:GetLabel()==0 then
local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS) local tg=Duel.GetChainInfo(0,CHAININFO_TARGET_CARDS)
if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end if not tg or tg:FilterCount(Card.IsRelateToEffect,nil,e)~=3 then return end
Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT) Duel.SendtoDeck(tg,nil,SEQ_DECKSHUFFLE,REASON_EFFECT)
......
...@@ -26,7 +26,7 @@ end ...@@ -26,7 +26,7 @@ end
function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) function c64245689.tgtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c64245689.spfilter(chkc,e,tp) end
local b1=Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil) local b1=Duel.IsExistingMatchingCard(c64245689.tgfilter,tp,LOCATION_DECK,0,1,nil)
local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp) local b2=Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and Duel.IsExistingTarget(c64245689.spfilter,tp,LOCATION_GRAVE,0,1,nil,e,tp)
if chk==0 then return b1 or b2 end if chk==0 then return b1 or b2 end
local op=0 local op=0
if b1 and b2 then if b1 and b2 then
......
--バーニング・ドラゴン --バーニング・ドラゴン
function c8085950.initial_effect(c) function c8085950.initial_effect(c)
--special summon --special summon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_HAND) e1:SetRange(LOCATION_HAND)
...@@ -9,7 +9,7 @@ function c8085950.initial_effect(c) ...@@ -9,7 +9,7 @@ function c8085950.initial_effect(c)
e1:SetCondition(c8085950.spcon) e1:SetCondition(c8085950.spcon)
e1:SetTarget(c8085950.sptg) e1:SetTarget(c8085950.sptg)
e1:SetOperation(c8085950.spop) e1:SetOperation(c8085950.spop)
c:RegisterEffect(e1) c:RegisterEffect(e1)
--destroy --destroy
local e2=Effect.CreateEffect(c) local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
......
...@@ -48,7 +48,6 @@ function c82913020.spop(e,tp,eg,ep,ev,re,r,rp) ...@@ -48,7 +48,6 @@ function c82913020.spop(e,tp,eg,ep,ev,re,r,rp)
if not c:IsRelateToEffect(e) then return end if not c:IsRelateToEffect(e) then return end
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP) Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end end
--Modified from Nemeses Flag
function c82913020.srfilter(c) function c82913020.srfilter(c)
return c:IsSetCard(0x53) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() return c:IsSetCard(0x53) and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand()
end end
...@@ -64,7 +63,6 @@ function c82913020.srop(e,tp,eg,ep,ev,re,r,rp) ...@@ -64,7 +63,6 @@ function c82913020.srop(e,tp,eg,ep,ev,re,r,rp)
Duel.ConfirmCards(1-tp,g) Duel.ConfirmCards(1-tp,g)
end end
end end
--Modified from Gagaga Magician and Supreme King Dragon Clear Wing
function c82913020.mcon(e,tp,eg,ep,ev,re,r,rp) function c82913020.mcon(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler() local c=e:GetHandler()
local bc=c:GetBattleTarget() local bc=c:GetBattleTarget()
......
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