#module wep_class_kaisuu mem_ID_wep, mem_chara_name_wep, wep_kaisuu_nokori, wep_Fire, wep_Fire_cur, wep_Wind, wep_Wind_cur, wep_Thunder, wep_Thunder_cur, wep_Light, wep_light_cur
#enum WEP_KAISUU_ALL = 18
#enum WEP_KIND_FIRE = 1
#enum WEP_KIND_WIND = 2
#enum WEP_KIND_THUNDER = 3
#enum WEP_KIND_LIGHT = 4
#modfunc set_mem_ID_wep int __p
mem_ID_wep = __p
return
#modcfunc get_mem_ID_wep
return mem_ID_wep
#modfunc set_mem_chara_name_wep str __p_str
mem_chara_name_wep = __p_str
return
#modcfunc get_mem_chara_name_wep
return mem_chara_name_wep
#modinit
mem_ID_wep = -1
mem_chara_name_wep = "name_tmp_player -1"
wep_kaisuu_nokori = 0
wep_Fire = 0
wep_Wind = 0
wep_Thunder = 0
wep_Light = 0
wep_Fire_cur = 0
wep_Wind_cur = 0
wep_Thunder_cur = 0
wep_Light_cur = 0
return
#modfunc delete_chara_wep
logmes "wep delete : " + mem_ID_wep
; mem_ID_wep = -1
; mem_chara_name_wep = "name_tmp_player -1"
wep_kaisuu_nokori = 0
wep_Fire = 0
wep_Wind = 0
wep_Thunder = 0
wep_Light = 0
wep_Fire_cur = 0
wep_Wind_cur = 0
wep_Thunder_cur = 0
wep_Light_cur = 0
return
#modfunc set_wep_kaisuu_first
logmes "set wep kaisuu first : " + mem_ID_wep
wep_kaisuu_nokori = 2
wep_Fire = 4
wep_Wind = 4
wep_Thunder = 4
wep_Light = 4
wep_Fire_cur = 4
wep_Wind_cur = 4
wep_Thunder_cur = 4
wep_Light_cur = 4
return
#modfunc set_wep_kaisuu_nokori int __p
logmes "set wep kaisuu nokori : " + mem_ID_wep
wep_kaisuu_nokori = __p
return
#modcfunc get_wep_kaisuu_nokori
logmes "get wep kaisuu nokori : " + mem_ID_wep
return wep_kaisuu_nokori
#modfunc set_wep_kaisuu int __p, int __p_val
logmes "set wep kaisuu : " + mem_ID_wep
if __p == WEP_KIND_FIRE{
wep_Fire = __p_val
wep_Fire_cur = __p_val
return
}
if __p == WEP_KIND_WIND{
wep_Wind = __p_val
wep_Wind_cur = __p_val
return
}
if __p == WEP_KIND_THUNDER{
wep_Thunder = __p_val
wep_Thunder_cur = __p_val
return
}
if __p == WEP_KIND_LIGHT{
wep_Light = __p_val
wep_Light_cur = __p_val
return
}
dialog "error:wep_class_kaisuu:set_wep_kaisuu:__p " + __p,1
return
#modfunc set_wep_kaisuu_cur int __p, int __p_val
logmes "set wep kaisuu cur : " + mem_ID_wep
logmes ""+__p_val
if __p == WEP_KIND_FIRE{
wep_Fire_cur = __p_val
return
}
if __p == WEP_KIND_WIND{
wep_Wind_cur = __p_val
return
}
if __p == WEP_KIND_THUNDER{
wep_Thunder_cur = __p_val
return
}
if __p == WEP_KIND_LIGHT{
wep_Light_cur = __p_val
return
}
dialog "error:wep_class_kaisuu:set_wep_kaisuu_cur:__p " + __p,1
return
#modcfunc get_wep_kaisuu int __p
logmes "wep wep kaisuu : " + mem_ID_wep
if __p == WEP_KIND_FIRE{
return wep_Fire
}
if __p == WEP_KIND_WIND{
return wep_Wind
}
if __p == WEP_KIND_THUNDER{
return wep_Thunder
}
if __p == WEP_KIND_LIGHT{
return wep_Light
}
dialog "error:wep_class_kaisuu:get_wep_kaisuu:__p " + __p,1
return
#modcfunc get_wep_kaisuu_cur int __p
logmes "get_kaisuu : " + mem_ID_wep + " : " + __p
if __p == WEP_KIND_FIRE{
return wep_Fire_cur
}
if __p == WEP_KIND_WIND{
return wep_Wind_cur
}
if __p == WEP_KIND_THUNDER{
return wep_Thunder_cur
}
if __p == WEP_KIND_LIGHT{
return wep_Light_cur
}
dialog "error:wep_class_kaisuu:get_wep_kaisuu_cur:__p " + __p,1
return
#modfunc kaihuku_wep_kaisuu_cur
logmes "wep kaihuku : " + mem_ID_wep
wep_Fire_cur = wep_Fire
wep_Wind_cur = wep_Wind
wep_Thunder_cur = wep_Thunder
wep_Light_cur = wep_Light
return
#modfunc wep_kaisuu_pp int __p, var __p_error
logmes "kaisuu_pp : " + mem_ID_wep + " : " + __p
__p_error=""
if wep_kaisuu_nokori <= 0{
__p_error = "wep の ++ の 残り可能数がありません"
return
}
if __p == WEP_KIND_FIRE{
wep_Fire++
return
}
if __p == WEP_KIND_WIND{
wep_Wind++
return
}
if __p == WEP_KIND_THUNDER{
wep_Thunder++
return
}
if __p == WEP_KIND_LIGHT{
wep_Light++
return
}
dialog "error:wep_class_kaisuu:set_kaisuu_pp:__p " + __p,1
return
#modfunc wep_kaisuu_mm int __p, var __p_error
logmes "kaisuu_mm : " + mem_ID_wep + " : " + __p
if __p == WEP_KIND_FIRE{
if wep_Fire >= 1{
wep_Fire--
return
}else{
__p_error = "wep_Fireの使用回数はこれ以上下げられません"
return
}
}
if __p == WEP_KIND_WIND{
if wep_Wind >= 1{
wep_Wind--
return
}else{
__p_error = "wep_Windの使用回数はこれ以上下げられません"
return
}
}
if __p == WEP_KIND_THUNDER{
if wep_Thunder >= 1{
wep_Thunder--
return
}else{
__p_error = "wep_Thunderの使用回数はこれ以上下げられません"
return
}
}
if __p == WEP_KIND_LIGHT{
if wep_Light >= 1{
wep_Light--
return
}else{
__p_error = "wep_Lightの使用回数はこれ以上下げられません"
return
}
}
dialog "error:wep_class_kaisuu:set_kaisuu_mm:__p " + __p,1
return
#modcfunc do_wep_magic_use int __p
logmes "wep_use : " + mem_ID_wep + " : " + __p
if __p == WEP_KIND_FIRE{
if wep_Fire_cur >= 1{
return 1
}else{
return 0
}
}
if __p == WEP_KIND_WIND{
if wep_Wind_cur >= 1{
return 1
}else{
return 0
}
}
if __p == WEP_KIND_THUNDER{
if wep_Thunder_cur >= 1{
return 1
}else{
return 0
}
}
if __p == WEP_KIND_LIGHT{
if wep_Light_cur >= 1{
return 1
}else{
return 0
}
}
dialog "error:wep_class_kaisuu:set_kaisuu_mm:__p " + __p,1
return
#modcfunc wep_kaisuu_4use_mm int __p, var __p_error
logmes "wep_use_mm : " + mem_ID_wep + " : " + __p
if __p == WEP_KIND_FIRE{
if wep_Fire_cur >= 1{
wep_Fire_cur--
return 1
}else{
__p_error = "Fireはこれ以上使えません"
return 0
}
}
if __p == WEP_KIND_WIND{
if wep_Wind_cur >= 1{
wep_Wind_cur--
return 1
}else{
__p_error = "Windはこれ以上使えません"
return 0
}
}
if __p == WEP_KIND_THUNDER{
if wep_Thunder_cur >= 1{
wep_Thunder_cur--
return 1
}else{
__p_error = "Thunderはこれ以上使えません"
return 0
}
}
if __p == WEP_KIND_LIGHT{
if wep_Light_cur >= 1{
wep_Light_cur--
return 1
}else{
__p_error = "Lightはこれ以上使えません"
return 0
}
}
dialog "error:wep_class_kaisuu:set_kaisuu_mm:__p " + __p,1
return
#global
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
newmod player_wep,wep_class_kaisuu
set_mem_ID_wep player_wep.0,1
set_mem_ID_wep player_wep.1,2
set_mem_ID_wep player_wep.2,3
set_mem_ID_wep player_wep.3,4
set_mem_ID_wep player_wep.4,5
set_mem_ID_wep player_wep.5,6
set_mem_ID_wep player_wep.6,7
set_mem_ID_wep player_wep.7,8
set_mem_chara_name_wep player_wep.0,"1st pl wep"
set_mem_chara_name_wep player_wep.1,"2nd pl wep"
set_mem_chara_name_wep player_wep.2,"3rd pl wep"
set_mem_chara_name_wep player_wep.3,"4th pl wep"
set_mem_chara_name_wep player_wep.4,"5th pl wep"
set_mem_chara_name_wep player_wep.5,"6th pl wep"
set_mem_chara_name_wep player_wep.6,"7th pl wep"
set_mem_chara_name_wep player_wep.7,"8th pl wep"
#if 0
#include "mod_wep_TEST\\TEST_setter_wep.hsp"
#include "mod_wep_TEST\\TEST_getter_wep.hsp"
#endif