Commit 91a005c6 authored by salix5's avatar salix5

Merge remote-tracking branch 'upstream/master' into patch2

parents acb48d40 285caef9
......@@ -3073,10 +3073,10 @@ int32 scriptlib::duel_get_activity_count(lua_State *L) {
lua_pushinteger(L, pduel->game_field->core.normalsummon_state_count[playerid]);
break;
case 3:
lua_pushinteger(L, pduel->game_field->core.flipsummon_state_count[playerid]);
lua_pushinteger(L, pduel->game_field->core.spsummon_state_count[playerid]);
break;
case 4:
lua_pushinteger(L, pduel->game_field->core.spsummon_state_count[playerid]);
lua_pushinteger(L, pduel->game_field->core.flipsummon_state_count[playerid]);
break;
case 5:
lua_pushinteger(L, pduel->game_field->core.attack_state_count[playerid]);
......
......@@ -3590,7 +3590,7 @@ int32 field::change_position(uint16 step, group * targets, effect * reason_effec
pcard->refresh_disable_status();
}
if(pcard->current.location == LOCATION_MZONE) {
raise_single_event(*cvit, 0, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0);
raise_single_event(pcard, 0, EVENT_CHANGE_POS, reason_effect, 0, reason_player, 0, 0);
pos_changed.insert(pcard);
}
bool trapmonster = false;
......
......@@ -48,6 +48,7 @@ function c12670770.target1(e,tp,eg,ep,ev,re,r,rp,chk)
e1:SetRange(LOCATION_SZONE)
e1:SetCode(EVENT_PHASE+PHASE_STANDBY)
e1:SetCountLimit(1)
e1:SetCondition(c12670770.sdescon)
e1:SetOperation(c12670770.sdesop)
e1:SetReset(RESET_EVENT+0x1fe0000+RESET_PHASE+PHASE_STANDBY+RESET_SELF_TURN,3)
c:RegisterEffect(e1)
......@@ -74,8 +75,10 @@ function c12670770.operation(e,tp,eg,ep,ev,re,r,rp)
Duel.Remove(g,POS_FACEUP,REASON_EFFECT)
end
end
function c12670770.sdescon(e,tp,eg,ep,ev,re,r,rp)
return tp==Duel.GetTurnPlayer()
end
function c12670770.sdesop(e,tp,eg,ep,ev,re,r,rp)
if tp~=Duel.GetTurnPlayer() then return end
local c=e:GetHandler()
local ct=c:GetTurnCounter()
ct=ct+1
......
......@@ -29,8 +29,8 @@ function c35014241.cost(e,tp,eg,ep,ev,re,r,rp,chk)
local g1=Duel.SelectMatchingCard(tp,c35014241.cfilter1,tp,LOCATION_MZONE,0,1,1,nil,e,tp)
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_TODECK)
local g2=Duel.SelectMatchingCard(tp,c35014241.cfilter2,tp,LOCATION_MZONE,0,1,1,nil,e,tp,g1:GetFirst())
g1:Merge(g2)
e:SetLabel(g1:GetFirst():GetLevel()+g2:GetFirst():GetLevel())
g1:Merge(g2)
Duel.SendtoDeck(g1,nil,0,REASON_COST)
end
function c35014241.target(e,tp,eg,ep,ev,re,r,rp,chk)
......
......@@ -17,7 +17,7 @@ function c96594609.initial_effect(c)
e2:SetDescription(aux.Stringid(96594609,1))
e2:SetCategory(CATEGORY_TOGRAVE)
e2:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_TRIGGER_O)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP)
e2:SetProperty(EFFECT_FLAG_DAMAGE_STEP+EFFECT_FLAG_DELAY)
e2:SetCode(EVENT_TO_GRAVE)
e2:SetCondition(c96594609.tgcon)
e2:SetTarget(c96594609.tgtg)
......
--HSR魔剣ダーマ
function c97007933.initial_effect(c)
--synchro summon
aux.AddSynchroProcedure(c,nil,aux.NonTuner(nil),1)
c:EnableReviveLimit()
--pierce
local e1=Effect.CreateEffect(c)
e1:SetType(EFFECT_TYPE_SINGLE)
e1:SetCode(EFFECT_PIERCE)
c:RegisterEffect(e1)
--damage
local e2=Effect.CreateEffect(c)
e2:SetDescription(aux.Stringid(97007933,0))
e2:SetCategory(CATEGORY_DAMAGE)
e2:SetType(EFFECT_TYPE_IGNITION)
e2:SetProperty(EFFECT_FLAG_PLAYER_TARGET)
e2:SetRange(LOCATION_MZONE)
e2:SetCountLimit(1,97007933)
e2:SetCost(c97007933.damcost)
e2:SetTarget(c97007933.damtg)
e2:SetOperation(c97007933.damop)
c:RegisterEffect(e2)
--spsummon
local e3=Effect.CreateEffect(c)
e3:SetDescription(aux.Stringid(97007933,1))
e3:SetCategory(CATEGORY_SPECIAL_SUMMON)
e3:SetType(EFFECT_TYPE_IGNITION)
e3:SetRange(LOCATION_GRAVE)
e3:SetCountLimit(1,97007934)
e3:SetCondition(c97007933.spcon)
e3:SetCost(c97007933.spcost)
e3:SetTarget(c97007933.sptg)
e3:SetOperation(c97007933.spop)
c:RegisterEffect(e3)
end
function c97007933.cfilter(c)
return c:IsRace(RACE_MACHINE) and c:IsAbleToRemoveAsCost()
end
function c97007933.damcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.IsExistingMatchingCard(c97007933.cfilter,tp,LOCATION_GRAVE,0,1,nil) end
Duel.Hint(HINT_SELECTMSG,tp,HINTMSG_REMOVE)
local g=Duel.SelectMatchingCard(tp,c97007933.cfilter,tp,LOCATION_GRAVE,0,1,1,nil)
Duel.Remove(g,POS_FACEUP,REASON_COST)
end
function c97007933.damtg(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return true end
Duel.SetTargetPlayer(1-tp)
Duel.SetTargetParam(500)
Duel.SetOperationInfo(0,CATEGORY_DAMAGE,nil,0,1-tp,500)
end
function c97007933.damop(e,tp,eg,ep,ev,re,r,rp)
local p,d=Duel.GetChainInfo(0,CHAININFO_TARGET_PLAYER,CHAININFO_TARGET_PARAM)
Duel.Damage(p,d,REASON_EFFECT)
end
function c97007933.spcon(e,tp,eg,ep,ev,re,r,rp)
return Duel.GetFieldGroupCount(tp,LOCATION_ONFIELD,0)==0
end
function c97007933.spcost(e,tp,eg,ep,ev,re,r,rp,chk)
if chk==0 then return Duel.GetActivityCount(tp,ACTIVITY_NORMALSUMMON)==0 end
local e1=Effect.CreateEffect(e:GetHandler())
e1:SetType(EFFECT_TYPE_FIELD)
e1:SetCode(EFFECT_CANNOT_SUMMON)
e1:SetProperty(EFFECT_FLAG_PLAYER_TARGET+EFFECT_FLAG_OATH)
e1:SetReset(RESET_PHASE+RESET_END)
e1:SetTargetRange(1,0)
Duel.RegisterEffect(e1,tp)
local e2=e1:Clone()
e2:SetCode(EFFECT_CANNOT_MSET)
Duel.RegisterEffect(e2,tp)
end
function c97007933.sptg(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
Duel.SetOperationInfo(0,CATEGORY_SPECIAL_SUMMON,e:GetHandler(),1,0,0)
end
function c97007933.spop(e,tp,eg,ep,ev,re,r,rp)
local c=e:GetHandler()
if c:IsRelateToEffect(e) then
Duel.SpecialSummon(c,0,tp,tp,false,false,POS_FACEUP)
end
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