Commit 30d61a92 authored by VanillaSalt's avatar VanillaSalt

fix

parent c7c79ebf
......@@ -1176,13 +1176,15 @@ int32 field::check_release_list(uint8 playerid, int32 count, int32 use_con, int3
}
return FALSE;
}
int32 field::get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum) {
int32 field::get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum, group* mg) {
uint8 p = target->current.controler;
card* pcard;
uint32 rcount = 0;
for(int i = 0; i < 5; ++i) {
pcard = player[p].list_mzone[i];
if(pcard && pcard->is_releasable_by_summon(p, target)) {
if(mg && !mg->has_card(pcard))
continue;
if(release_list)
release_list->insert(pcard);
if(pcard->is_affected_by_effect(EFFECT_DOUBLE_TRIBUTE, target))
......@@ -1197,6 +1199,8 @@ int32 field::get_summon_release_list(card* target, card_set* release_list, card_
pcard = player[1 - p].list_mzone[i];
if(!(pcard && pcard->is_releasable_by_summon(p, target)))
continue;
if(mg && !mg->has_card(pcard))
continue;
if(pcard->is_affected_by_effect(EFFECT_EXTRA_RELEASE)) {
if(ex_list)
ex_list->insert(pcard);
......
......@@ -338,7 +338,7 @@ public:
int32 get_release_list(uint8 playerid, card_set* release_list, card_set* ex_list, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp);
int32 check_release_list(uint8 playerid, int32 count, int32 use_con, int32 use_hand, int32 fun, int32 exarg, card* exp);
int32 get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum);
int32 get_summon_release_list(card* target, card_set* release_list, card_set* ex_list, card_set* ex_list_sum, group* mg = 0);
int32 get_summon_count_limit(uint8 playerid);
int32 get_draw_count(uint8 playerid);
void get_ritual_material(uint8 playerid, effect* peffect, card_set* material);
......
......@@ -1896,8 +1896,13 @@ int32 scriptlib::duel_get_tribute_count(lua_State *L) {
check_param_count(L, 1);
check_param(L, PARAM_TYPE_CARD, 1);
card* target = *(card**) lua_touserdata(L, 1);
group* mg = 0;
if(lua_gettop(L) >= 2 && !lua_isnil(L, 2)) {
check_param(L, PARAM_TYPE_GROUP, 2);
mg = *(group**) lua_touserdata(L, 2);
}
duel* pduel = interpreter::get_duel_info(L);
lua_pushinteger(L, pduel->game_field->get_summon_release_list(target, 0, 0, 0));
lua_pushinteger(L, pduel->game_field->get_summon_release_list(target, 0, 0, 0, mg));
return 1;
}
int32 scriptlib::duel_select_tribute(lua_State *L) {
......@@ -1910,11 +1915,16 @@ int32 scriptlib::duel_select_tribute(lua_State *L) {
card* target = *(card**) lua_touserdata(L, 2);
uint32 min = lua_tointeger(L, 3);
uint32 max = lua_tointeger(L, 4);
group* mg = 0;
if(lua_gettop(L) >= 5 && !lua_isnil(L, 5)) {
check_param(L, PARAM_TYPE_GROUP, 5);
mg = *(group**) lua_touserdata(L, 5);
}
duel* pduel = interpreter::get_duel_info(L);
pduel->game_field->core.release_cards.clear();
pduel->game_field->core.release_cards_ex.clear();
pduel->game_field->core.release_cards_ex_sum.clear();
pduel->game_field->get_summon_release_list(target, &pduel->game_field->core.release_cards, &pduel->game_field->core.release_cards_ex, &pduel->game_field->core.release_cards_ex_sum);
pduel->game_field->get_summon_release_list(target, &pduel->game_field->core.release_cards, &pduel->game_field->core.release_cards_ex, &pduel->game_field->core.release_cards_ex_sum, mg);
pduel->game_field->add_process(PROCESSOR_SELECT_TRIBUTE_S, 0, 0, 0, playerid, (max << 16) + min);
return lua_yield(L, 0);
}
......
......@@ -22,24 +22,24 @@ function c10026986.initial_effect(c)
e2:SetOperation(c10026986.desop)
c:RegisterEffect(e2)
end
function c10026986.cfilter(c)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)
function c10026986.cfilter(c,tp)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup())
end
function c10026986.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(c10026986.cfilter,1,nil)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c10026986.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c10026986.cfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c10026986.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
function c10026986.descost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.CheckReleaseGroup(tp,c10026986.cfilter,1,nil) end
local sg=Duel.SelectReleaseGroup(tp,c10026986.cfilter,1,1,nil)
if chk==0 then return Duel.CheckReleaseGroup(tp,c10026986.cfilter,1,nil,tp) end
local sg=Duel.SelectReleaseGroup(tp,c10026986.cfilter,1,1,nil,tp)
Duel.Release(sg,REASON_COST)
end
function c10026986.destg(e,tp,eg,ep,ev,re,r,rp,chk,chkc)
......
......@@ -67,15 +67,18 @@ function c10060427.ccost(e,tp)
Duel.Destroy(e:GetHandler(),REASON_RULE)
end
end
function c10060427.otfilter(c,tp)
return c:IsSetCard(0x1d) and (c:IsControler(tp) or c:IsFaceup())
end
function c10060427.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x1d)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c10060427.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x1d)
local mg=Duel.GetMatchingGroup(c10060427.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -36,14 +36,13 @@ function c15545291.otfilter(c)
end
function c15545291.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c15545291.otfilter,1,nil)
and Duel.GetTributeCount(c,mg)>0
end
function c15545291.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c15545291.otfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c15545291.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -23,15 +23,18 @@ function c15605085.initial_effect(c)
e2:SetOperation(c15605085.damop)
c:RegisterEffect(e2)
end
function c15605085.otfilter(c,tp)
return c:IsSetCard(0x2) and (c:IsControler(tp) or c:IsFaceup())
end
function c15605085.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x2)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c15605085.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x2)
local mg=Duel.GetMatchingGroup(c15605085.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -52,15 +52,18 @@ end
function c20003527.sdcon(e)
return e:GetHandler():IsPosition(POS_FACEUP_DEFENCE)
end
function c20003527.cfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_WATER) and (c:IsControler(tp) or c:IsFaceup())
end
function c20003527.sumcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>4 and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_WATER)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>4 and Duel.GetTributeCount(c,mg)>0
end
function c20003527.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsAttribute,1,10,nil,ATTRIBUTE_WATER)
local mg=Duel.GetMatchingGroup(c20003527.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,10,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -22,23 +22,25 @@ function c23309606.initial_effect(c)
e3:SetValue(c23309606.val)
c:RegisterEffect(e3)
end
function c23309606.otfilter(c,tp)
return c:IsAttackAbove(2000) and (c:IsControler(tp) or c:IsFaceup())
end
function c23309606.otcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
hg:RemoveCard(c)
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c23309606.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return hg:GetCount()>0 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and g:IsExists(Card.IsAttackAbove,1,nil,2000)
and Duel.GetTributeCount(c,mg)>0
and hg:FilterCount(Card.IsAbleToGraveAsCost,nil)==hg:GetCount()
end
function c23309606.otop(e,tp,eg,ep,ev,re,r,rp,c)
local hg=Duel.GetFieldGroup(tp,LOCATION_HAND,0)
hg:RemoveCard(c)
Duel.SendtoGrave(hg,REASON_COST+REASON_DISCARD)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsAttackAbove,1,1,nil,2000)
local mg=Duel.GetMatchingGroup(c23309606.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -36,14 +36,13 @@ function c23689697.otfilter(c)
end
function c23689697.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c23689697.otfilter,1,nil)
and Duel.GetTributeCount(c,mg)>0
end
function c23689697.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c23689697.otfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c23689697.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -48,16 +48,19 @@ function c25524823.ttop(e,tp,eg,ep,ev,re,r,rp,c)
c:SetMaterial(g)
Duel.Release(g,REASON_SUMMON+REASON_MATERIAL)
end
function c25524823.otfilter(c,tp)
return c:IsSetCard(0x2e) and (c:IsControler(tp) or c:IsFaceup())
end
function c25524823.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsSetCard,1,nil,0x2e)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c25524823.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x2e)
local mg=Duel.GetMatchingGroup(c25524823.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -17,15 +17,18 @@ function c28348537.initial_effect(c)
e2:SetOperation(c28348537.actlimit)
c:RegisterEffect(e2)
end
function c28348537.otfilter(c,tp)
return c:IsRace(RACE_SPELLCASTER) and (c:IsControler(tp) or c:IsFaceup())
end
function c28348537.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsRace,1,nil,RACE_SPELLCASTER)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c28348537.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c28348537.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_SPELLCASTER)
local mg=Duel.GetMatchingGroup(c28348537.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -27,16 +27,19 @@ function c3825890.initial_effect(c)
e3:SetTarget(c3825890.desreptg)
c:RegisterEffect(e3)
end
function c3825890.otfilter(c,tp)
return c:IsSetCard(0x2e) and (c:IsControler(tp) or c:IsFaceup())
end
function c3825890.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsSetCard,1,nil,0x2e)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c3825890.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c3825890.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x2e)
local mg=Duel.GetMatchingGroup(c3825890.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -21,18 +21,21 @@ function c38589847.initial_effect(c)
e3:SetCode(EFFECT_SET_PROC)
c:RegisterEffect(e3)
end
function c38589847.otfilter(c,tp)
return c:IsLevelAbove(5) and (c:IsControler(tp) or c:IsFaceup())
end
function c38589847.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return g:IsExists(Card.IsLevelAbove,1,nil,5)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c38589847.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return Duel.GetTributeCount(c,mg)>0
end
function c38589847.ottg(e,c)
return c:IsLevelAbove(7)
end
function c38589847.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsLevelAbove,1,1,nil,5)
local mg=Duel.GetMatchingGroup(c38589847.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......@@ -29,15 +29,18 @@ function c40189917.initial_effect(c)
e3:SetOperation(c40189917.damop)
c:RegisterEffect(e3)
end
function c40189917.mfilter(c,tp)
return c:IsSetCard(0x2c) and (c:IsControler(tp) or c:IsFaceup())
end
function c40189917.sumcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1 and g:IsExists(Card.IsSetCard,1,nil,0x2c)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c40189917.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return Duel.GetLocationCount(tp,LOCATION_MZONE)>-1 and Duel.GetTributeCount(c,mg)>0
end
function c40189917.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x2c)
local mg=Duel.GetMatchingGroup(c40189917.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -33,18 +33,20 @@ function c40921744.initial_effect(c)
e3:SetOperation(c40921744.sdesop)
c:RegisterEffect(e3)
end
function c40921744.mfilter(c,tp)
return c:IsAttribute(ATTRIBUTE_DARK) and (c:IsControler(tp) or c:IsFaceup())
end
function c40921744.sumcon(e,c)
if c==nil then return true end
local tp=c:GetControler()
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c40921744.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local ag=Duel.GetMatchingGroup(Card.IsAttribute,tp,LOCATION_GRAVE,0,nil,ATTRIBUTE_DARK)
return c:IsLevelAbove(7) and g:IsExists(Card.IsAttribute,1,nil,ATTRIBUTE_DARK)
return c:IsLevelAbove(7) and Duel.GetTributeCount(c,mg)>0
and ag:GetClassCount(Card.GetCode)>=4
end
function c40921744.sumop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsAttribute,1,1,nil,ATTRIBUTE_DARK)
local mg=Duel.GetMatchingGroup(c40921744.mfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -44,16 +44,19 @@ function c41753322.initial_effect(c)
e5:SetOperation(c41753322.dop)
c:RegisterEffect(e5)
end
function c41753322.otfilter(c,tp)
return c:IsRace(RACE_DINOSAUR) and (c:IsControler(tp) or c:IsFaceup())
end
function c41753322.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsRace,1,nil,RACE_DINOSAUR)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c41753322.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c41753322.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_DINOSAUR)
local mg=Duel.GetMatchingGroup(c41753322.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -30,17 +30,17 @@ function c51192573.initial_effect(c)
c:RegisterEffect(e3)
end
function c51192573.otfilter(c,tp)
return c:IsControler(tp) and c:GetOwner()~=tp
return c:GetOwner()==tp
end
function c51192573.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(c51192573.otfilter,1,nil,c:GetControler())
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c51192573.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c51192573.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c51192573.otfilter,1,1,nil,c:GetControler())
local mg=Duel.GetMatchingGroup(c51192573.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,1-tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -21,16 +21,19 @@ function c5186893.initial_effect(c)
e2:SetOperation(c5186893.spop)
c:RegisterEffect(e2)
end
function c5186893.otfilter(c,tp)
return c:IsRace(RACE_ZOMBIE) and (c:IsControler(tp) or c:IsFaceup())
end
function c5186893.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsRace,1,nil,RACE_ZOMBIE)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c5186893.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c5186893.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_ZOMBIE)
local mg=Duel.GetMatchingGroup(c5186893.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -28,15 +28,18 @@ function c53199020.initial_effect(c)
e3:SetOperation(c53199020.chop2)
c:RegisterEffect(e3)
end
function c53199020.otfilter(c,tp)
return c:IsSetCard(0x35) and (c:IsControler(tp) or c:IsFaceup())
end
function c53199020.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x35)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c53199020.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c53199020.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x35)
local mg=Duel.GetMatchingGroup(c53199020.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -32,15 +32,18 @@ function c55690251.initial_effect(c)
e4:SetOperation(c55690251.operation)
c:RegisterEffect(e4)
end
function c55690251.otfilter(c,tp)
return c:IsRace(RACE_FAIRY) and (c:IsControler(tp) or c:IsFaceup())
end
function c55690251.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsRace,1,nil,RACE_FAIRY)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c55690251.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c55690251.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_FAIRY)
local mg=Duel.GetMatchingGroup(c55690251.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg, REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -29,15 +29,18 @@ function c58494728.initial_effect(c)
e3:SetLabelObject(e2)
c:RegisterEffect(e3)
end
function c58494728.otfilter(c,tp)
return c:IsSetCard(0x100a) and (c:IsControler(tp) or c:IsFaceup())
end
function c58494728.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x100a)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c58494728.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c58494728.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x100a)
local mg=Duel.GetMatchingGroup(c58494728.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -22,15 +22,18 @@ function c6849042.initial_effect(c)
e2:SetOperation(c6849042.drop)
c:RegisterEffect(e2)
end
function c6849042.otfilter(c,tp)
return c:IsRace(RACE_DINOSAUR) and (c:IsControler(tp) or c:IsFaceup())
end
function c6849042.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsRace,1,nil,RACE_DINOSAUR)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c6849042.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c6849042.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_DINOSAUR)
local mg=Duel.GetMatchingGroup(c6849042.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -35,14 +35,13 @@ function c69230391.otfilter(c)
end
function c69230391.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c69230391.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c69230391.otfilter,1,nil)
and Duel.GetTributeCount(c,mg)>0
end
function c69230391.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c69230391.otfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c69230391.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -36,14 +36,13 @@ function c69327790.otfilter(c)
end
function c69327790.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c69327790.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c69327790.otfilter,1,nil)
and Duel.GetTributeCount(c,mg)>0
end
function c69327790.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c69327790.otfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c69327790.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -32,15 +32,18 @@ function c70969517.initial_effect(c)
e2:SetOperation(c70969517.damop)
c:RegisterEffect(e2)
end
function c70969517.otfilter(c,tp)
return c:IsSetCard(0x1b) and (c:IsControler(tp) or c:IsFaceup())
end
function c70969517.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and g:IsExists(Card.IsSetCard,1,nil,0x1b)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c70969517.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetTributeCount(c,mg)>0
end
function c70969517.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x1b)
local mg=Duel.GetMatchingGroup(c70969517.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -53,16 +53,19 @@ function c72258771.ccost(e,tp)
Duel.Destroy(e:GetHandler(),REASON_COST)
end
end
function c72258771.otfilter(c,tp)
return c:IsSetCard(0x1b) and (c:IsControler(tp) or c:IsFaceup())
end
function c72258771.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c72258771.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsSetCard,1,nil,0x1d)
and Duel.GetTributeCount(c,mg)>0
end
function c72258771.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsSetCard,1,1,nil,0x1d)
local mg=Duel.GetMatchingGroup(c72258771.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -22,19 +22,19 @@ function c81254059.initial_effect(c)
e2:SetOperation(c81254059.spop)
c:RegisterEffect(e2)
end
function c81254059.cfilter(c)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE)
function c81254059.cfilter(c,tp)
return c:IsSetCard(0x3e) and c:IsRace(RACE_REPTILE) and (c:IsControler(tp) or c:IsFaceup())
end
function c81254059.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c81254059.cfilter,1,nil)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c81254059.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c81254059.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c81254059.cfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c81254059.cfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -36,14 +36,13 @@ function c87602890.otfilter(c)
end
function c87602890.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
local mg=Duel.GetMatchingGroup(c87602890.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(c87602890.otfilter,1,nil)
and Duel.GetTributeCount(c,mg)>0
end
function c87602890.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,c87602890.otfilter,1,1,nil)
local mg=Duel.GetMatchingGroup(c87602890.otfilter,0,LOCATION_MZONE,LOCATION_MZONE,nil)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
end
......
......@@ -24,16 +24,19 @@ function c96470883.initial_effect(c)
e2:SetOperation(c96470883.desop)
c:RegisterEffect(e2)
end
function c96470883.otfilter(c,tp)
return c:IsRace(RACE_PLANT) and (c:IsControler(tp) or c:IsFaceup())
end
function c96470883.otcon(e,c)
if c==nil then return true end
local g=Duel.GetTributeGroup(c)
return c:GetLevel()>6 and Duel.GetLocationCount(c:GetControler(),LOCATION_MZONE)>-1
and g:IsExists(Card.IsRace,1,nil,RACE_PLANT)
local tp=c:GetControler()
local mg=Duel.GetMatchingGroup(c96470883.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
return c:GetLevel()>6 and Duel.GetLocationCount(tp,LOCATION_MZONE)>-1
and Duel.GetTributeCount(c,mg)>0
end
function c96470883.otop(e,tp,eg,ep,ev,re,r,rp,c)
local g=Duel.GetTributeGroup(c)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_RELEASE)
local sg=g:FilterSelect(tp,Card.IsRace,1,1,nil,RACE_PLANT)
local mg=Duel.GetMatchingGroup(c96470883.otfilter,tp,LOCATION_MZONE,LOCATION_MZONE,nil,tp)
local sg=Duel.SelectTribute(tp,c,1,1,mg)
c:SetMaterial(sg)
Duel.Release(sg,REASON_SUMMON+REASON_MATERIAL)
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