Commit 09ff6d75 authored by mercury233's avatar mercury233

update

parent 3ff64819
......@@ -80,7 +80,7 @@ function c101106030.spop(e,tp,eg,ep,ev,re,r,rp)
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_SET)
local sg=g:Select(tp,1,1,nil)
Duel.SSet(tp,sg,tp,false)
Duel.SSet(tp,sg)
local tc=sg:GetFirst()
tc:RegisterFlagEffect(101106030,RESET_EVENT+RESETS_STANDARD,0,1)
local e1=Effect.CreateEffect(c)
......
--迷犬メリー
--
--Script by KillerDJ
function c101106035.initial_effect(c)
--effect
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106035,0))
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e1:SetProperty(EFFECT_FLAG_DELAY)
e1:SetCode(EVENT_TO_GRAVE)
e1:SetCountLimit(101106035)
e1:SetTarget(c101106035.target)
e1:SetOperation(c101106035.operation)
c:RegisterEffect(e1)
end
function c101106035.thfilter(c)
return c:IsCode(11548522) and c:IsAbleToHand()
end
function c101106035.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local b1=e:GetHandler():IsAbleToDeck()
local b2=Duel.IsExistingMatchingCard(c101106035.thfilter,tp,LOCATION_DECK,0,1,nil) and e:GetHandler():IsAbleToDeck()
if chk==0 then return b1 or b2 end
local op=0
if b1 and b2 then op=Duel.SelectOption(tp,aux.Stringid(101106035,1),aux.Stringid(101106035,2))
elseif b1 then op=Duel.SelectOption(tp,aux.Stringid(101106035,1))
else op=Duel.SelectOption(tp,aux.Stringid(101106035,2))+1 end
e:SetLabel(op)
if op==0 then
e:SetCategory(CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
else
e:SetCategory(CATEGORY_SEARCH+CATEGORY_TOHAND+CATEGORY_TODECK)
Duel.SetOperationInfo(0,CATEGORY_TODECK,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
end
function c101106035.operation(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if not c:IsRelateToEffect(e) then return end
if e:GetLabel()==0 then
Duel.SendtoDeck(c,nil,1,REASON_EFFECT)
else
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectMatchingCard(tp,c101106035.thfilter,tp,LOCATION_DECK,0,1,1,nil)
if g:GetCount()>0 and Duel.SendtoHand(g,nil,REASON_EFFECT)~=0 and g:GetFirst():IsLocation(LOCATION_HAND) then
Duel.ConfirmCards(1-tp,g)
Duel.ShuffleDeck(tp)
Duel.SendtoDeck(c,nil,0,REASON_EFFECT)
end
end
end
--超自然警戒区域
--
--Script by KillerDJ
function c101106067.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--destroy
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101106067,0))
e2:SetCategory(CATEGORY_DESTROY+CATEGORY_REMOVE)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetCode(EVENT_SPSUMMON_SUCCESS)
e2:SetRange(LOCATION_SZONE)
e2:SetProperty(EFFECT_FLAG_CARD_TARGET+EFFECT_FLAG_DELAY)
e2:SetCountLimit(1,101106067)
e2:SetCondition(c101106067.descon)
e2:SetTarget(c101106067.destg)
e2:SetOperation(c101106067.desop)
c:RegisterEffect(e2)
--special summon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(101106067,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e3:SetProperty(EFFECT_FLAG_DELAY)
e3:SetCode(EVENT_DESTROYED)
e2:SetCountLimit(1,101106067+100)
e3:SetCondition(c101106067.spcon)
e3:SetTarget(c101106067.sptg)
e3:SetOperation(c101106067.spop)
c:RegisterEffect(e3)
end
function c101106067.cfilter(c)
return c:IsFaceup() and not c:IsType(TYPE_EFFECT)
end
function c101106067.descon(e,tp,eg,ep,ev,re,r,rp)
return eg:IsExists(c101106067.cfilter,1,nil)
end
function c101106067.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsOnField() and chkc:IsControler(1-tp) end
if chk==0 then return Duel.IsExistingTarget(aux.TRUE,tp,0,LOCATION_ONFIELD,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_DESTROY)
local g=Duel.SelectTarget(tp,aux.TRUE,tp,0,LOCATION_ONFIELD,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_DESTROY,g,g:GetCount(),0,0)
end
function c101106067.desop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc and tc:IsRelateToEffect(e) then
Duel.Destroy(tc,REASON_EFFECT)
end
end
function c101106067.spcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_SZONE) and rp==1-tp
end
function c101106067.spfilter(c,e,tp)
return not c:IsType(TYPE_EFFECT) and c:IsCanBeSpecialSummoned(e,0,tp,false,false)
end
function c101106067.sptg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0
and Duel.IsExistingMatchingCard(c101106067.spfilter,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,nil,e,tp) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,nil,1,tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE)
end
function c101106067.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,aux.NecroValleyFilter(c101106067.spfilter),tp,LOCATION_HAND+LOCATION_DECK+LOCATION_GRAVE,0,1,1,nil,e,tp)
if g:GetCount()>0 then
Duel.SpecialSummon(g,0,tp,tp,false,false,POS_FACEUP)
end
end
--夜の逃飛行
--
--Script by KillerDJ
function c101106068.initial_effect(c)
--return
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106068,0))
e1:SetCategory(CATEGORY_TOHAND)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetTarget(c101106068.target)
e1:SetOperation(c101106068.activate)
c:RegisterEffect(e1)
end
function c101106068.filter(c)
return c:IsFaceup() and c:IsAbleToHand()
end
function c101106068.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(tp) and c101106068.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101106068.filter,tp,LOCATION_MZONE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectTarget(tp,c101106068.filter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101106068.activate(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and Duel.SendtoHand(tc,nil,REASON_EFFECT)>0 and tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,1)
e1:SetValue(c101106068.actlimit)
e1:SetLabel(tc:GetCode())
e1:SetReset(RESET_PHASE+PHASE_END)
Duel.RegisterEffect(e1,tp)
end
end
function c101106068.actlimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
......@@ -17,12 +17,12 @@ function c101106069.same_check(c,mc)
if c:GetRace()==mc:GetRace() then flag=flag+1 end
if c:GetAttribute()==mc:GetAttribute() then flag=flag+1 end
if c:GetLevel()==mc:GetLevel() then flag=flag+1 end
if c:GetAttack()==mc:GetAttack() then flag=flag+1 end
if c:GetDefense()==mc:GetDefense() then flag=flag+1 end
if c:GetTextAttack()==mc:GetTextAttack() then flag=flag+1 end
if c:GetTextDefense()==mc:GetTextDefense() then flag=flag+1 end
return flag==1
end
function c101106069.filter1(c,tp)
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemoveAsCost(POS_FACEDOWN) and not c:IsPublic()
return c:IsType(TYPE_MONSTER) and c:IsAbleToRemove(tp,POS_FACEDOWN) and not c:IsPublic()
and Duel.IsExistingMatchingCard(c101106069.filter2,tp,LOCATION_DECK,0,1,nil,tp,c)
end
function c101106069.filter2(c,tp,mc)
......@@ -34,15 +34,14 @@ function c101106069.filter3(c,mc)
end
function c101106069.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c101106069.filter1,tp,LOCATION_HAND,0,1,nil,tp) end
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_HAND)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,1,tp,LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_REMOVE,nil,2,tp,LOCATION_HAND+LOCATION_DECK)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,nil,1,tp,LOCATION_DECK)
end
function c101106069.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g1=Duel.SelectMatchingCard(tp,c101106069.filter1,tp,LOCATION_HAND,0,1,1,nil,tp)
Duel.ConfirmCards(1-tp,g1)
if g1:GetCount()==0 then return end
Duel.ConfirmCards(1-tp,g1)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_CONFIRM)
local g2=Duel.SelectMatchingCard(tp,c101106069.filter2,tp,LOCATION_DECK,0,1,1,nil,tp,g1:GetFirst())
Duel.ConfirmCards(1-tp,g2)
......
--聖邪のステンドグラス
--
--Script by 魔方
function c101106078.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(101106078,0))
e1:SetCategory(CATEGORY_DRAW+CATEGORY_TODECK+CATEGORY_HANDES)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1,101106078)
e1:SetTarget(c101106078.target)
e1:SetOperation(c101106078.activate)
c:RegisterEffect(e1)
end
function c101106078.filter(c,race)
return c:IsRace(race) and c:IsType(TYPE_EFFECT) and c:IsFaceup()
end
function c101106078.target(e,tp,eg,ep,ev,re,r,rp,chk)
local f1=Duel.IsExistingMatchingCard(c101106078.filter,tp,LOCATION_MZONE,0,1,nil,RACE_FAIRY) and Duel.IsPlayerCanDraw(tp,3)
local f2=Duel.IsExistingMatchingCard(c101106078.filter,tp,LOCATION_MZONE,0,1,nil,RACE_FIEND) and Duel.IsPlayerCanDraw(1-tp,1)
if chk==0 then return f1 or f2 end
end
function c101106078.activate(e,tp,eg,ep,ev,re,r,rp)
local f1=Duel.IsExistingMatchingCard(c101106078.filter,tp,LOCATION_MZONE,0,1,nil,RACE_FAIRY) and Duel.IsPlayerCanDraw(tp,3)
local f2=Duel.IsExistingMatchingCard(c101106078.filter,tp,LOCATION_MZONE,0,1,nil,RACE_FIEND) and Duel.IsPlayerCanDraw(1-tp,1)
local res=false
if f1 and (not f2 or Duel.SelectYesNo(tp,aux.Stringid(101106078,1))) and Duel.Draw(tp,3,REASON_EFFECT)==3 then
res=true
local g=Duel.GetMatchingGroup(Card.IsAbleToDeck,tp,LOCATION_HAND,0,nil)
if #g<2 then return end
Duel.BreakEffect()
Duel.Hint(HINT_SELECTMSG,p,HINTMSG_TODECK)
local sg=g:Select(tp,2,2,nil)
Duel.SendtoDeck(sg,nil,0,REASON_EFFECT)
Duel.SortDecktop(tp,tp,2)
for i=1,2 do
local mg=Duel.GetDecktopGroup(tp,1)
Duel.MoveSequence(mg:GetFirst(),1)
end
end
if f2 and (not res or Duel.SelectYesNo(tp,aux.Stringid(101106078,2))) and Duel.Draw(1-tp,1,REASON_EFFECT)==1 then
Duel.ShuffleHand(1-tp)
Duel.BreakEffect()
local g=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #g==0 then return end
local sg=g:RandomSelect(1-tp,1)
Duel.SendtoGrave(sg,REASON_DISCARD+REASON_EFFECT)
local g1=Duel.GetFieldGroup(1-tp,LOCATION_HAND,0)
if #g1==0 then return end
Duel.BreakEffect()
Duel.DiscardHand(1-tp,aux.TRUE,1,1,REASON_EFFECT+REASON_DISCARD)
end
end
--巨星墜とし
--
--Script by starvevenom
function c101106079.initial_effect(c)
--Activate
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetCode(EVENT_FREE_CHAIN)
e1:SetHintTiming(0,TIMINGS_CHECK_MONSTER)
e1:SetTarget(c101106079.target)
e1:SetOperation(c101106079.activate)
c:RegisterEffect(e1)
end
function c101106079.filter(c)
return c:IsFaceup() and c:IsLevel(0)
end
function c101106079.target(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
if chkc then return chkc:IsLocation(LOCATION_MZONE) and chkc:IsControler(1-tp) and c101106079.filter(chkc) end
if chk==0 then return Duel.IsExistingTarget(c101106079.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_FACEUP)
Duel.SelectTarget(tp,c101106079.filter,tp,LOCATION_MZONE,LOCATION_MZONE,1,1,nil)
if e:IsHasType(EFFECT_TYPE_ACTIVATE) then
Duel.SetChainLimit(c101106079.chainlm)
end
end
function c101106079.chainlm(e,rp,tp)
return not (e:GetHandler():IsType(TYPE_MONSTER) and e:GetHandler():IsLevel(0))
end
function c101106079.activate(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
local tc=Duel.GetFirstTarget()
if tc:IsRelateToEffect(e) and tc:IsFaceup() then
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_SET_ATTACK_FINAL)
e1:SetValue(0)
e1:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e1)
local e2=Effect.CreateEffect(c)
e2:SetType(EFFECT_TYPE_SINGLE)
e2:SetCode(EFFECT_CANNOT_TRIGGER)
e2:SetReset(RESET_EVENT+RESETS_STANDARD+RESET_PHASE+PHASE_END)
tc:RegisterEffect(e2)
local e3=e1:Clone()
e3:SetCode(EFFECT_INDESTRUCTABLE_BATTLE)
e3:SetValue(1)
tc:RegisterEffect(e3)
local e4=e2:Clone()
e4:SetCode(EFFECT_CHANGE_BATTLE_DAMAGE)
e4:SetValue(HALF_DAMAGE)
tc:RegisterEffect(e4)
end
end
--ラドリートラップ
--
--Script by starvevenom
function c101106080.initial_effect(c)
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetCode(EVENT_FREE_CHAIN)
c:RegisterEffect(e1)
--Activate
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(101106080,0))
e2:SetCategory(CATEGORY_DECKDES)
e2:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_TRIGGER_O)
e2:SetRange(LOCATION_SZONE)
e2:SetCode(EVENT_SUMMON_SUCCESS)
e2:SetTarget(c101106080.distg)
e2:SetOperation(c101106080.disop)
c:RegisterEffect(e2)
local e3=e2:Clone()
e3:SetCode(EVENT_FLIP_SUMMON_SUCCESS)
c:RegisterEffect(e3)
--to deck
local e4=Effect.CreateEffect(c)
e4:SetDescription(aux.Stringid(101106080,1))
e4:SetCategory(CATEGORY_TOHAND)
e4:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e4:SetCode(EVENT_TO_GRAVE)
e4:SetProperty(EFFECT_FLAG_CARD_TARGET)
e4:SetCountLimit(1,101106080)
e4:SetCondition(c101106080.thcon)
e4:SetTarget(c101106080.thtg)
e4:SetOperation(c101106080.thop)
c:RegisterEffect(e4)
end
function c101106080.distg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return rp==tp end
Duel.SetTargetPlayer(tp)
Duel.SetTargetParam(1)
Duel.SetOperationInfo(0,CATEGORY_DECKDES,nil,0,tp,1)
end
function c101106080.disop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.DiscardDeck(p,d,REASON_EFFECT)
end
function c101106080.thcon(e,tp,eg,ep,ev,re,r,rp)
return e:GetHandler():IsPreviousLocation(LOCATION_DECK) and e:GetHandler():IsReason(REASON_EFFECT)
end
function c101106080.thfilter(c,tid)
return c:GetTurnID()==tid and not c:IsReason(REASON_RETURN) and not c:IsCode(101106080) and c:IsAbleToHand()
end
function c101106080.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
local tid=Duel.GetTurnCount()
if chkc then return chkc:IsLocation(LOCATION_GRAVE) and chkc:IsControler(tp) and c101106080.thfilter(chkc,tid) end
if chk==0 then return Duel.IsExistingTarget(c101106080.thfilter,tp,LOCATION_GRAVE,0,1,nil,tid) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_ATOHAND)
local g=Duel.SelectTarget(tp,c101106080.thfilter,tp,LOCATION_GRAVE,0,1,1,nil,tid)
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,1,0,0)
end
function c101106080.thop(e,tp,eg,ep,ev,re,r,rp)
local tc=Duel.GetFirstTarget()
if not tc then return end
if Duel.SendtoHand(tc,nil,REASON_EFFECT)~=0 and tc:IsLocation(LOCATION_HAND) then
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EFFECT_CANNOT_ACTIVATE)
e1:SetTargetRange(1,0)
e1:SetValue(c101106080.actlimit)
e1:SetLabel(tc:GetCode())
if Duel.GetTurnPlayer()==tp then
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN,2)
else
e1:SetReset(RESET_PHASE+PHASE_END+RESET_SELF_TURN)
end
Duel.RegisterEffect(e1,tp)
end
end
function c101106080.actlimit(e,re,tp)
return re:GetHandler():IsCode(e:GetLabel())
end
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