Commit d2ea3068 authored by Fluorohydride's avatar Fluorohydride

'update'

parent 5b961215
...@@ -220,7 +220,6 @@ static const struct luaL_Reg effectlib[] = { ...@@ -220,7 +220,6 @@ static const struct luaL_Reg effectlib[] = {
{ "SetTargetRange", scriptlib::effect_set_target_range }, { "SetTargetRange", scriptlib::effect_set_target_range },
{ "SetAbsoluteRange", scriptlib::effect_set_absolute_range }, { "SetAbsoluteRange", scriptlib::effect_set_absolute_range },
{ "SetCountLimit", scriptlib::effect_set_count_limit }, { "SetCountLimit", scriptlib::effect_set_count_limit },
{ "SetCountCode", scriptlib::effect_set_count_code },
{ "SetReset", scriptlib::effect_set_reset }, { "SetReset", scriptlib::effect_set_reset },
{ "SetType", scriptlib::effect_set_type }, { "SetType", scriptlib::effect_set_type },
{ "SetProperty", scriptlib::effect_set_property }, { "SetProperty", scriptlib::effect_set_property },
......
...@@ -139,18 +139,14 @@ int32 scriptlib::effect_set_count_limit(lua_State *L) { ...@@ -139,18 +139,14 @@ int32 scriptlib::effect_set_count_limit(lua_State *L) {
check_param(L, PARAM_TYPE_EFFECT, 1); check_param(L, PARAM_TYPE_EFFECT, 1);
effect* peffect = *(effect**) lua_touserdata(L, 1); effect* peffect = *(effect**) lua_touserdata(L, 1);
int32 v = lua_tointeger(L, 2); int32 v = lua_tointeger(L, 2);
uint32 code = 0;
if(lua_gettop(L) >= 3)
code = lua_tointeger(L, 3);
if(v == 0) if(v == 0)
v = 1; v = 1;
peffect->flag |= EFFECT_FLAG_COUNT_LIMIT; peffect->flag |= EFFECT_FLAG_COUNT_LIMIT;
peffect->reset_count |= ((v << 12) & 0xf000) | ((v << 8) & 0xf00); peffect->reset_count |= ((v << 12) & 0xf000) | ((v << 8) & 0xf00);
return 0; peffect->count_code = code;
}
int32 scriptlib::effect_set_count_code(lua_State *L) {
check_param_count(L, 2);
check_param(L, PARAM_TYPE_EFFECT, 1);
effect* peffect = *(effect**) lua_touserdata(L, 1);
int32 v = lua_tointeger(L, 2);
peffect->count_code = v;
return 0; return 0;
} }
int32 scriptlib::effect_set_reset(lua_State *L) { int32 scriptlib::effect_set_reset(lua_State *L) {
......
...@@ -220,7 +220,6 @@ public: ...@@ -220,7 +220,6 @@ public:
static int32 effect_set_target_range(lua_State *L); static int32 effect_set_target_range(lua_State *L);
static int32 effect_set_absolute_range(lua_State *L); static int32 effect_set_absolute_range(lua_State *L);
static int32 effect_set_count_limit(lua_State *L); static int32 effect_set_count_limit(lua_State *L);
static int32 effect_set_count_code(lua_State *L);
static int32 effect_set_reset(lua_State *L); static int32 effect_set_reset(lua_State *L);
static int32 effect_set_type(lua_State *L); static int32 effect_set_type(lua_State *L);
static int32 effect_set_property(lua_State *L); static int32 effect_set_property(lua_State *L);
......
...@@ -9,8 +9,7 @@ function c32646477.initial_effect(c) ...@@ -9,8 +9,7 @@ function c32646477.initial_effect(c)
e1:SetCategory(CATEGORY_DAMAGE) e1:SetCategory(CATEGORY_DAMAGE)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCountLimit(1) e1:SetCountLimit(1,32646477)
e1:SetCountCode(32646477)
e1:SetCondition(c32646477.condition) e1:SetCondition(c32646477.condition)
e1:SetCost(c32646477.cost) e1:SetCost(c32646477.cost)
e1:SetTarget(c32646477.target) e1:SetTarget(c32646477.target)
......
...@@ -6,15 +6,14 @@ function c98645731.initial_effect(c) ...@@ -6,15 +6,14 @@ function c98645731.initial_effect(c)
e1:SetType(EFFECT_TYPE_ACTIVATE) e1:SetType(EFFECT_TYPE_ACTIVATE)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET) e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e1:SetCode(EVENT_FREE_CHAIN) e1:SetCode(EVENT_FREE_CHAIN)
e1:SetCountLimit(1) e1:SetCountLimit(1,98645731+EFFECT_COUNT_CODE_OATH)
e1:SetCountCode(98645731+EFFECT_COUNT_CODE_OATH)
e1:SetCost(c98645731.cost) e1:SetCost(c98645731.cost)
e1:SetTarget(c98645731.target) e1:SetTarget(c98645731.target)
e1:SetOperation(c98645731.activate) e1:SetOperation(c98645731.activate)
c:RegisterEffect(e1) c:RegisterEffect(e1)
end end
function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk) function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) and Duel.GetFlagEffect(tp,98645731)==0 end if chk==0 then return not Duel.CheckSpecialSummonActivity(tp) end
--oath effects --oath effects
local e1=Effect.CreateEffect(e:GetHandler()) local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD) e1:SetType(EFFECT_TYPE_FIELD)
...@@ -23,7 +22,6 @@ function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk) ...@@ -23,7 +22,6 @@ function c98645731.cost(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetReset(RESET_PHASE+PHASE_END) e1:SetReset(RESET_PHASE+PHASE_END)
e1:SetTargetRange(1,0) e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp) Duel.RegisterEffect(e1,tp)
Duel.RegisterFlagEffect(tp,98645731,RESET_PHASE+PHASE_END,EFFECT_FLAG_OATH,1)
end end
function c98645731.target(e,tp,eg,ep,ev,re,r,rp,chk) function c98645731.target(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then if chk==0 then
......
...@@ -9,8 +9,7 @@ function c9888196.initial_effect(c) ...@@ -9,8 +9,7 @@ function c9888196.initial_effect(c)
e1:SetCategory(CATEGORY_DESTROY) e1:SetCategory(CATEGORY_DESTROY)
e1:SetProperty(EFFECT_FLAG_CARD_TARGET) e1:SetProperty(EFFECT_FLAG_CARD_TARGET)
e1:SetType(EFFECT_TYPE_IGNITION) e1:SetType(EFFECT_TYPE_IGNITION)
e1:SetCountLimit(1) e1:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e1:SetCountCode(EFFECT_COUNT_CODE_SINGLE)
e1:SetRange(LOCATION_MZONE) e1:SetRange(LOCATION_MZONE)
e1:SetCondition(c9888196.con) e1:SetCondition(c9888196.con)
e1:SetTarget(c9888196.destg1) e1:SetTarget(c9888196.destg1)
...@@ -21,8 +20,7 @@ function c9888196.initial_effect(c) ...@@ -21,8 +20,7 @@ function c9888196.initial_effect(c)
e2:SetDescription(aux.Stringid(9888196,1)) e2:SetDescription(aux.Stringid(9888196,1))
e2:SetCategory(CATEGORY_DESTROY) e2:SetCategory(CATEGORY_DESTROY)
e2:SetType(EFFECT_TYPE_IGNITION) e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetCountLimit(1) e2:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e2:SetCountCode(EFFECT_COUNT_CODE_SINGLE)
e2:SetRange(LOCATION_MZONE) e2:SetRange(LOCATION_MZONE)
e2:SetCondition(c9888196.con) e2:SetCondition(c9888196.con)
e2:SetCost(c9888196.descost2) e2:SetCost(c9888196.descost2)
...@@ -34,8 +32,7 @@ function c9888196.initial_effect(c) ...@@ -34,8 +32,7 @@ function c9888196.initial_effect(c)
e3:SetDescription(aux.Stringid(9888196,2)) e3:SetDescription(aux.Stringid(9888196,2))
e3:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE+CATEGORY_DAMAGE) e3:SetCategory(CATEGORY_HANDES+CATEGORY_TOGRAVE+CATEGORY_DAMAGE)
e3:SetType(EFFECT_TYPE_IGNITION) e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetCountLimit(1) e3:SetCountLimit(1,EFFECT_COUNT_CODE_SINGLE)
e3:SetCountCode(EFFECT_COUNT_CODE_SINGLE)
e3:SetRange(LOCATION_MZONE) e3:SetRange(LOCATION_MZONE)
e3:SetCondition(c9888196.con) e3:SetCondition(c9888196.con)
e3:SetCost(c9888196.hdcost) e3:SetCost(c9888196.hdcost)
......
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