-
Notifications
You must be signed in to change notification settings - Fork 598
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from Fluorohydride/master
fix
- Loading branch information
Showing
7 changed files
with
97 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--スターシップ・スパイ・プレーン | ||
function c15458892.initial_effect(c) | ||
--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(c15458892.spcon) | ||
c:RegisterEffect(e1) | ||
--return to hand | ||
local e2=Effect.CreateEffect(c) | ||
e2:SetDescription(aux.Stringid(15458892,0)) | ||
e2:SetCategory(CATEGORY_TOHAND) | ||
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_F) | ||
e2:SetProperty(EFFECT_FLAG_CARD_TARGET) | ||
e2:SetCode(EVENT_SPSUMMON_SUCCESS) | ||
e2:SetCondition(c15458892.thcon) | ||
e2:SetTarget(c15458892.thtg) | ||
e2:SetOperation(c15458892.thop) | ||
c:RegisterEffect(e2) | ||
end | ||
function c15458892.cfilter(c) | ||
return c:IsFaceup() and c:IsType(TYPE_XYZ) | ||
end | ||
function c15458892.spcon(e,c) | ||
if c==nil then return true end | ||
local tp=c:GetControler() | ||
return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 | ||
and Duel.IsExistingMatchingCard(c15458892.cfilter,tp,0,LOCATION_MZONE,1,nil) | ||
end | ||
function c15458892.thcon(e,tp,eg,ep,ev,re,r,rp) | ||
return e:GetHandler():IsPreviousLocation(LOCATION_HAND) | ||
end | ||
function c15458892.thfilter(c) | ||
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsAbleToHand() | ||
end | ||
function c15458892.thtg(e,tp,eg,ep,ev,re,r,rp,chk,chkc) | ||
if chkc then return chkc:IsControler(1-tp) and chkc:IsOnField() and c15458892.thfilter(chkc) end | ||
if chk==0 then return true end | ||
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOHAND) | ||
local g=Duel.SelectTarget(tp,c15458892.thfilter,tp,0,LOCATION_ONFIELD,1,1,nil) | ||
Duel.SetOperationInfo(0,CATEGORY_TOHAND,g,g:GetCount(),0,0) | ||
end | ||
function c15458892.thop(e,tp,eg,ep,ev,re,r,rp) | ||
local tc=Duel.GetFirstTarget() | ||
if tc and tc:IsRelateToEffect(e) then | ||
Duel.SendtoHand(tc,nil,REASON_EFFECT) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--薔薇の聖弓手 | ||
function c51852507.initial_effect(c) | ||
--Negate | ||
local e1=Effect.CreateEffect(c) | ||
e1:SetDescription(aux.Stringid(51852507,0)) | ||
e1:SetCategory(CATEGORY_NEGATE+CATEGORY_DESTROY) | ||
e1:SetType(EFFECT_TYPE_FIELD+EFFECT_TYPE_QUICK_O) | ||
e1:SetCode(EVENT_CHAINING) | ||
e1:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DAMAGE_CAL) | ||
e1:SetRange(LOCATION_HAND) | ||
e1:SetCondition(c51852507.discon) | ||
e1:SetCost(c51852507.discost) | ||
e1:SetTarget(c51852507.distg) | ||
e1:SetOperation(c51852507.disop) | ||
c:RegisterEffect(e1) | ||
end | ||
function c51852507.cfilter(c) | ||
return c:IsFaceup() and c:IsRace(RACE_PLANT) | ||
end | ||
function c51852507.discon(e,tp,eg,ep,ev,re,r,rp) | ||
return ep~=tp and re:IsActiveType(TYPE_TRAP) and re:IsHasType(EFFECT_TYPE_ACTIVATE) and Duel.IsChainNegatable(ev) | ||
and Duel.IsExistingMatchingCard(c51852507.cfilter,tp,LOCATION_MZONE,0,1,nil) | ||
end | ||
function c51852507.discost(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return e:GetHandler():IsAbleToGraveAsCost() end | ||
Duel.SendtoGrave(e:GetHandler(),REASON_COST) | ||
end | ||
function c51852507.distg(e,tp,eg,ep,ev,re,r,rp,chk) | ||
if chk==0 then return true end | ||
Duel.SetOperationInfo(0,CATEGORY_NEGATE,eg,1,0,0) | ||
if re:GetHandler():IsDestructable() and re:GetHandler():IsRelateToEffect(re) then | ||
Duel.SetOperationInfo(0,CATEGORY_DESTROY,eg,1,0,0) | ||
end | ||
end | ||
function c51852507.disop(e,tp,eg,ep,ev,re,r,rp) | ||
Duel.NegateActivation(ev) | ||
if re:GetHandler():IsRelateToEffect(re) then | ||
Duel.Destroy(eg,REASON_EFFECT) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters