Commit 1a165388 authored by argon.sun's avatar argon.sun

fix

parent 79dc2d3b
...@@ -481,6 +481,8 @@ uint32 card::get_ritual_level(card* pcard) { ...@@ -481,6 +481,8 @@ uint32 card::get_ritual_level(card* pcard) {
uint32 card::get_attribute() { uint32 card::get_attribute() {
if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE))) if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE)))
return data.attribute; return data.attribute;
if((current.location == LOCATION_GRAVE) && (data.type & (TYPE_SPELL + TYPE_TRAP)))
return data.attribute;
if (temp.attribute != 0xffffffff) if (temp.attribute != 0xffffffff)
return temp.attribute; return temp.attribute;
effect_set effects; effect_set effects;
...@@ -504,6 +506,8 @@ uint32 card::get_attribute() { ...@@ -504,6 +506,8 @@ uint32 card::get_attribute() {
uint32 card::get_race() { uint32 card::get_race() {
if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE))) if(!(current.location & (LOCATION_MZONE + LOCATION_GRAVE)))
return data.race; return data.race;
if((current.location == LOCATION_GRAVE) && (data.type & (TYPE_SPELL + TYPE_TRAP)))
return data.race;
if (temp.race != 0xffffffff) if (temp.race != 0xffffffff)
return temp.race; return temp.race;
effect_set effects; effect_set effects;
......
This diff is collapsed.
...@@ -21,7 +21,7 @@ function c11596936.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -21,7 +21,7 @@ function c11596936.cost(e,tp,eg,ep,ev,re,r,rp,chk)
Duel.ShuffleHand(tp) Duel.ShuffleHand(tp)
end end
function c11596936.filter(c) function c11596936.filter(c)
return c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable() return c:IsFacedown() and c:IsType(TYPE_SPELL+TYPE_TRAP) and c:IsDestructable()
end end
function c11596936.target(e,tp,eg,ep,ev,re,r,rp,chk) function c11596936.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c11596936.filter,tp,0,LOCATION_ONFIELD,1,nil) end if chk==0 then return Duel.IsExistingMatchingCard(c11596936.filter,tp,0,LOCATION_ONFIELD,1,nil) end
......
...@@ -17,14 +17,26 @@ function c14785765.costfilter(c) ...@@ -17,14 +17,26 @@ function c14785765.costfilter(c)
return c:IsFaceup() and c:IsAbleToHandAsCost() return c:IsFaceup() and c:IsAbleToHandAsCost()
end end
function c14785765.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c14785765.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return c14785765[tp] and Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,nil) end if chk==0 then
if not c14785765[tp] then return false end
if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then
return Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_MZONE,0,1,nil)
else
return Duel.IsExistingMatchingCard(c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,nil)
end
end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND) Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RTOHAND)
local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil) if Duel.GetLocationCount(tp,LOCATION_MZONE)==0 then
Duel.SendtoHand(g,nil,REASON_COST) local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_MZONE,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
else
local g=Duel.SelectMatchingCard(tp,c14785765.costfilter,tp,LOCATION_ONFIELD,0,1,1,nil)
Duel.SendtoHand(g,nil,REASON_COST)
end
c14785765[tp]=false c14785765[tp]=false
end end
function c14785765.target(e,tp,eg,ep,ev,re,r,rp,chk) function c14785765.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetLocationCount(tp,LOCATION_MZONE)>0 and e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end if chk==0 then return e:GetHandler():IsCanBeSpecialSummoned(e,0,tp,false,false) end
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0) Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,400) Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,tp,400)
end end
......
...@@ -3,7 +3,7 @@ function c41639001.initial_effect(c) ...@@ -3,7 +3,7 @@ function c41639001.initial_effect(c)
--spsummon --spsummon
local e1=Effect.CreateEffect(c) local e1=Effect.CreateEffect(c)
e1:SetDescription(aux.Stringid(41639001,0)) e1:SetDescription(aux.Stringid(41639001,0))
e1:SetType(EFFECT_TYPE_QUICK_F) e1:SetType(EFFECT_TYPE_QUICK_O)
e1:SetCategory(CATEGORY_SPECIAL_SUMMON) e1:SetCategory(CATEGORY_SPECIAL_SUMMON)
e1:SetCode(EVENT_BECOME_TARGET) e1:SetCode(EVENT_BECOME_TARGET)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
......
--`ɡ֥쥤`
function c51047350.initial_effect(c)
--special summon
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_SPSUMMON_PROC)
e1:SetProperty(EFFECT_FLAG_SPSUM_PARAM)
e1:SetTargetRange(POS_FACEUP_ATTACK,0)
e1:SetProperty(EFFECT_FLAG_UNCOPYABLE)
e1:SetRange(LOCATION_HAND)
e1:SetCondition(c51047350.spcon)
e1:SetOperation(c51047350.spop)
c:RegisterEffect(e1)
end
function c51047350.filter(c)
return c:GetSequence()~=5 and c:IsAbleToGraveAsCost()
end
function c51047350.spcon(e,c)
if c==nil then return true end
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>0 and
Duel.IsExistingMatchingCard(c51047350.filter,c:GetControler(),LOCATION_SZONE,0,1,nil)
end
function c51047350.spop(e,tp,eg,ep,ev,re,r,rp,c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TOGRAVE)
local g=Duel.SelectMatchingCard(tp,c51047350.filter,tp,LOCATION_SZONE,0,1,1,nil)
Duel.SendtoGrave(g,REASON_COST)
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