Skip to content
This repository has been archived by the owner on Jun 22, 2018. It is now read-only.

Add check for Sephylon for Time Maiden and Empress's Crown #473

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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
90 changes: 45 additions & 45 deletions script/c100000010.lua
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
--時械巫女
function c100000010.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100000010.spcon)
c:RegisterEffect(e1)
--SEARCH
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100000010.cost)
e2:SetTarget(c100000010.target)
e2:SetOperation(c100000010.activate)
c:RegisterEffect(e2)
end
function c100000010.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c100000010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c100000010.filter(c)
return (c:IsSetCard(0x4a) or c:IsCode(74530899)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100000010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100000010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100000010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100000010.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
--時械巫女
function c100000010.initial_effect(c)
c:EnableReviveLimit()
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c100000010.spcon)
c:RegisterEffect(e1)
--SEARCH
local e2=Effect.CreateEffect(c)
e2:SetCategory(CATEGORY_TOHAND+CATEGORY_SEARCH)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetRange(LOCATION_MZONE)
e2:SetCost(c100000010.cost)
e2:SetTarget(c100000010.target)
e2:SetOperation(c100000010.activate)
c:RegisterEffect(e2)
end
function c100000010.spcon(e,c)
if c==nil then return true end
return Duel.GetFieldGroupCount(c:GetControler(),LOCATION_MZONE,0)==0
and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0
end
function c100000010.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return e:GetHandler():IsReleasable() end
Duel.Release(e:GetHandler(),REASON_COST)
end
function c100000010.filter(c)
return (c:IsSetCard(0x4a) or c:IsCode(74530899) or c:IsCode(8967776)) and c:IsType(TYPE_MONSTER) and c:IsAbleToHand()
end
function c100000010.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c100000010.filter,tp,LOCATION_DECK,0,1,nil) end
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c100000010.activate(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c100000010.filter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 then
Duel.SendtoHand(g,nil,REASON_EFFECT)
Duel.ConfirmCards(1-tp,g)
end
end
106 changes: 53 additions & 53 deletions script/c511000030.lua
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
--Crown of the Empress
function c511000030.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:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c511000030.condition)
e1:SetTarget(c511000030.target)
e1:SetOperation(c511000030.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c511000030.actcon)
c:RegisterEffect(e2)
end
function c511000030.cfilter2(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsControler(1-tp)
end
function c511000030.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x4a) or c:IsCode(74530899))
end
function c511000030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c511000030.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c511000030.gfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c511000030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(c511000030.gfilter,tp,0,LOCATION_MZONE,nil)*2
return ct>0 and Duel.IsPlayerCanDraw(tp,ct)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c511000030.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c511000030.gfilter,tp,0,LOCATION_MZONE,nil)*2
Duel.Draw(p,ct,REASON_EFFECT)
end
function c511000030.actcon(e)
local tp=e:GetHandlerPlayer()
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
if res then
return teg:IsExists(c511000030.cfilter2,1,nil,tp)
end
end
--Crown of the Empress
function c511000030.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:SetHintTiming(0,TIMING_END_PHASE)
e1:SetCondition(c511000030.condition)
e1:SetTarget(c511000030.target)
e1:SetOperation(c511000030.activate)
c:RegisterEffect(e1)
--
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_TRAP_ACT_IN_HAND)
e2:SetCondition(c511000030.actcon)
c:RegisterEffect(e2)
end
function c511000030.cfilter2(c,tp)
return c:IsType(TYPE_SYNCHRO) and c:IsControler(1-tp)
end
function c511000030.cfilter(c)
return c:IsFaceup() and (c:IsSetCard(0x4a) or c:IsCode(74530899) or c:IsCode(8967776))
end
function c511000030.condition(e,tp,eg,ep,ev,re,r,rp)
return Duel.IsExistingMatchingCard(c511000030.cfilter,tp,LOCATION_MZONE,0,1,nil)
end
function c511000030.gfilter(c)
return c:IsFaceup() and c:IsType(TYPE_SYNCHRO)
end
function c511000030.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then
local ct=Duel.GetMatchingGroupCount(c511000030.gfilter,tp,0,LOCATION_MZONE,nil)*2
return ct>0 and Duel.IsPlayerCanDraw(tp,ct)
end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(ct)
Duel.SetOperationInfo(0,CATEGORY_DRAW,nil,0,tp,ct)
end
function c511000030.activate(e,tp,eg,ep,ev,re,r,rp)
local p=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER)
local ct=Duel.GetMatchingGroupCount(c511000030.gfilter,tp,0,LOCATION_MZONE,nil)*2
Duel.Draw(p,ct,REASON_EFFECT)
end
function c511000030.actcon(e)
local tp=e:GetHandlerPlayer()
local res,teg,tep,tev,tre,tr,trp=Duel.CheckEvent(EVENT_SPSUMMON_SUCCESS,true)
if res then
return teg:IsExists(c511000030.cfilter2,1,nil,tp)
end
end