Skip to content
This repository was archived by the owner on Jun 22, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions script/c1475311.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--闇の誘惑
function c1475311.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c1475311.target)
e1:SetOperation(c1475311.activate)
c:RegisterEffect(e1)
end
function c1475311.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c1475311.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsAttribute,p,LOCATION_HAND,0,1,1,nil,ATTRIBUTE_DARK)
local tg=g:GetFirst()
if tg then
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
35 changes: 35 additions & 0 deletions script/c40465719.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
--凡人の施し
function c40465719.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_DRAW)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c40465719.target)
e1:SetOperation(c40465719.activate)
c:RegisterEffect(e1)
end
function c40465719.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE) and Duel.IsPlayerCanDraw(tp,2) end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(2)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,2)
end
function c40465719.activate(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Draw(p,d,REASON_EFFECT)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(p,Card.IsType,p,LOCATION_HAND,0,1,1,nil,TYPE_NORMAL)
local tg=g:GetFirst()
if tg then
if Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)==0 then
Duel.ConfirmCards(1-p,tg)
Duel.ShuffleHand(p)
end
else
local sg=Duel.GetFieldGroup(p,LOCATION_HAND,0)
Duel.SendtoGrave(sg,REASON_EFFECT)
end
end
58 changes: 58 additions & 0 deletions script/c51858306.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
--エクリプス・ワイバーン
function c51858306.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(51858306,0))
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetTarget(c51858306.target)
e1:SetOperation(c51858306.operation)
c:RegisterEffect(e1)
--remove
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(51858306,1))
e2:SetCategory(CATEGORY_TOHAND)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DELAY+EFFECT_FLAG_DAMAGE_STEP)
e2:SetCode(EVENT_REMOVE)
e2:SetCondition(c51858306.thcon)
e2:SetTarget(c51858306.thtg)
e2:SetOperation(c51858306.thop)
e2:SetLabelObject(e1)
c:RegisterEffect(e2)
end
function c51858306.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
end
function c51858306.filter(c)
return c:IsLevelAbove(7) and c:IsRace(RACE_DRAGON) and c:IsAttribute(ATTRIBUTE_LIGHT+ATTRIBUTE_DARK)
and c:IsAbleToRemove()
end
function c51858306.operation(e,tp,eg,ep,ev,re,r,rp)
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE) then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c51858306.filter,tp,LOCATION_DECK,0,1,1,nil)
local tc=g:GetFirst()
if tc then
Duel.Remove(tc,POS_FACEUP,REASON_EFFECT)
e:SetLabelObject(tc)
e:GetHandler():RegisterFlagEffect(51858306,RESET_EVENT+0x1e60000,0,1)
tc:RegisterFlagEffect(51858306,RESET_EVENT+0x1fe0000,0,1)
end
end
function c51858306.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsFaceup() and e:GetHandler():GetFlagEffect(51858306)~=0
end
function c51858306.thtg(e,tp,eg,ep,ev,re,r,rp,chk)
local tc=e:GetLabelObject():GetLabelObject()
if chk==0 then return tc and tc:GetFlagEffect(51858306)~=0 and tc:IsAbleToHand() end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,tc,1,0,0)
end
function c51858306.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=e:GetLabelObject():GetLabelObject()
if tc:GetFlagEffect(51858306)~=0 and Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 then
Duel.ConfirmCards(1-tp,tc)
end
end
44 changes: 44 additions & 0 deletions script/c62015408.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
--浮幽さくら
function c62015408.initial_effect(c)
--remove
local e1=Effect.CreateEffect(c)
e1:SetCategory(CATEGORY_REMOVE)
e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,0x1c0)
e1:SetCountLimit(1,62015408)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c62015408.condition)
e1:SetCost(c62015408.cost)
e1:SetTarget(c62015408.target)
e1:SetOperation(c62015408.operation)
c:RegisterEffect(e1)
end
function c62015408.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_MZONE,0)<Duel.GetFieldGroupCount(tp,0,LOCATION_MZONE)
and Duel.IsExistingMatchingCard(aux.TRUE,tp,LOCATION_EXTRA,0,1,nil)
end
function c62015408.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsDiscardable() end
Duel.SendtoGrave(e:GetHandler(),REASON_COST+REASON_DISCARD)
end
function c62015408.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE)
and Duel.GetFieldGroupCount(tp,LOCATION_EXTRA,0)>0
and Duel.GetFieldGroupCount(tp,0,LOCATION_EXTRA)>0 end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,1-tp,LOCATION_EXTRA)
end
function c62015408.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local sg=Duel.SelectMatchingCard(tp,aux.TRUE,tp,LOCATION_EXTRA,0,1,1,nil)
if sg:GetCount()>0 then
Duel.ConfirmCards(1-tp,sg)
Duel.BreakEffect()
local g=Duel.GetFieldGroup(tp,0,LOCATION_EXTRA)
Duel.ConfirmCards(tp,g)
local tg=g:Filter(Card.IsCode,nil,sg:GetFirst():GetCode())
if tg:GetCount()>0 then
Duel.Remove(tg,POS_FACEUP,REASON_EFFECT)
end
end
end
101 changes: 101 additions & 0 deletions script/c66171432.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
--超こいこい
function c66171432.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(66171432,0))
e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,66171432+EFFECT_COUNT_CODE_OATH)
e1:SetTarget(c66171432.target)
e1:SetOperation(c66171432.activate)
c:RegisterEffect(e1)
--special summon
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(66171432,1))
e2:SetCategory(CATEGORY_SPECIAL_SUMMON)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_GRAVE)
e2:SetCost(c66171432.spcost)
e2:SetTarget(c66171432.sptg)
e2:SetOperation(c66171432.spop)
c:RegisterEffect(e2)
end
function c66171432.filter(c,e,tp)
return c:IsSetCard(0xe6) and c:IsCanBeSpecialSummoned(e,0,tp,true,false)
end
function c66171432.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE)
and Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_DECK,0,1,nil,e,tp) end
end
function c66171432.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if Duel.IsPlayerAffectedByEffect(tp,EFFECT_CANNOT_REMOVE) then return end
Duel.ConfirmDecktop(tp,3)
local g=Duel.GetDecktopGroup(tp,3)
local sg=g:Filter(c66171432.filter,nil,e,tp)
local ft=Duel.GetLocationCount(tp,LOCATION_MZONE)
if ft>1 and Duel.IsPlayerAffectedByEffect(tp,59822133) then ft=1 end
if g:GetCount()>0 then
Duel.DisableShuffleCheck()
if sg:GetCount()>0 and ft>0 then
if sg:GetCount()>ft then
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
sg=sg:Select(tp,ft,ft,nil)
end
g:Sub(sg)
local tc=sg:GetFirst()
while tc do
if Duel.SpecialSummonStep(tc,0,tp,tp,true,false,POS_FACEUP) then
if tc:GetLevel()>0 then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_CHANGE_LEVEL)
e1:SetValue(2)
e1:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e1)
end
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_DISABLE)
e2:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e2)
local e3=Effect.CreateEffect(c)
e3:SetType(EFFECT_TYPE_SINGLE)
e3:SetCode(EFFECT_DISABLE_EFFECT)
e3:SetReset(RESET_EVENT+0x1fe0000)
tc:RegisterEffect(e3)
end
tc=sg:GetNext()
end
Duel.SpecialSummonComplete()
end
Duel.Remove(g,POS_FACEDOWN,REASON_EFFECT)
local og=Duel.GetOperatedGroup()
local ct=og:FilterCount(Card.IsLocation,nil,LOCATION_REMOVED)
if ct>0 then
Duel.SetLP(tp,Duel.GetLP(tp)-ct*1000)
end
end
end
function c66171432.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsAbleToRemoveAsCost()
and Duel.CheckReleaseGroup(tp,nil,1,nil) end
Duel.Remove(e:GetHandler(),POS_FACEUP,REASON_COST)
local g=Duel.SelectReleaseGroup(tp,nil,1,1,nil)
Duel.Release(g,REASON_COST)
end
function c66171432.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.IsExistingMatchingCard(c66171432.filter,tp,LOCATION_HAND,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND)
end
function c66171432.spop(e,tp,eg,ep,ev,re,r,rp)
if Duel.GetLocationCount(tp,LOCATION_MZONE)<=0 then return end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SPSUMMON)
local g=Duel.SelectMatchingCard(tp,c66171432.filter,tp,LOCATION_HAND,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,true,false,POS_FACEUP)
end
end