This commit is contained in:
TsubakiLoL 2024-11-15 17:50:30 +08:00
parent bafd52723a
commit 834e5f76fd
20 changed files with 884 additions and 20 deletions

View File

@ -318,16 +318,15 @@ var now_game_data:Dictionary={
#存储的NPC数据(仅包含遇到的NPC用于存储NPC的背包在申请NPCdata时进行写入 #存储的NPC数据(仅包含遇到的NPC用于存储NPC的背包在申请NPCdata时进行写入
"NPC_data":{}, "NPC_data":{},
#任务数据
"mission":[[],[],[]]
#三个分别为进行中任务,已完成任务,失败任务
,
#当前场景ID #当前场景ID
"now_scene":"", "now_scene":"",
"difficulty":0, "difficulty":0,
"gold":1000, "gold":1000,
"health":100, "health":100,
"spirit":999, "spirit":999,
"physical":100,
#体力
"map":"map_01", "map":"map_01",
"move_ability":1, "move_ability":1,
"time_unix":0, "time_unix":0,
@ -339,9 +338,112 @@ var now_game_data:Dictionary={
}, },
#当前可以制作的物品ID配方 #当前可以制作的物品ID配方
"item_could_make":["item_06"] "item_could_make":["item_06"],
#事件flag用来记录某事件条件标志
"flags":{
},
#地区探索度 id:探索值int
"scene_explore":{
},
#定时触发任务
#格式:
# [
# {
# "time”:到期unix事件戳
# "triger":[一般触发器格式]
# }
# ]
"time_clock_event":[]
} }
#添加定时任务
func add_clock_event(time_unix:int,triger:Array):
if now_game_data.has("time_clock_event"):
now_game_data["time_clock_event"].append({
"time":time_unix,
"triger":triger.duplicate(true)
})
else:
now_game_data["time_clock_event"]=[{
"time":time_unix,
"triger":triger.duplicate(true)
}]
#判定并执行定时任务
func judge_clock_event():
if now_game_data.has("time_clock_event"):
var time_clock_event:Array=now_game_data["time_clock_event"]
var i=0
while i <time_clock_event.size():
var dict=time_clock_event[i]
var unix=dict["time"]
var triger:Array=dict["triger"]
if get_time_unix()>=unix:
for j in triger:
call_triger(j["type"],j["data"])
time_clock_event.pop_at(i)
i-=1
i+=1
pass
pass
#获取场景探索度
func get_scene_explore(scene_id:String):
if now_game_data.has("scene_explore"):
var scene_explore_dic=now_game_data["scene_explore"]
if scene_explore_dic.has(scene_id):
return scene_explore_dic[scene_id]
else:
scene_explore_dic[scene_id]=0
return 0
else:
now_game_data["scene_explore"]={
scene_id:0
}
return 0
#设置场景探索度
func set_scene_explore(scene_id:String,value:float):
if now_game_data.has("scene_explore"):
var scene_explore_dic=now_game_data["scene_explore"]
scene_explore_dic[scene_id]=value
else:
now_game_data["scene_explore"]={
scene_id:value
}
scene_explore_changed.emit(scene_id)
#场景探索度改变时发出信号方便更新UI
signal scene_explore_changed(scene_id:String)
#改变场景探索度
func change_scene_explore(scene_id:String,change_value:float):
set_scene_explore(scene_id,get_scene_explore(scene_id)+change_value)
#设置标志
func set_flag(flag_name:String,value):
if now_game_data.has("flags"):
now_game_data["flags"][flag_name]=value
else:
now_game_data["flags"]={
flag_name:value
}
#获取标识,-1为标识不存在
func get_flag(flag_name:String):
if now_game_data.has("flags") and now_game_data["flags"].has(flag_name):
return now_game_data["flags"][flag_name]
else:
return -1
#当前是否应该展示开始事件 #当前是否应该展示开始事件
func should_show_init_event()->bool: func should_show_init_event()->bool:
var now_script_data=now_game_data["script_data"] var now_script_data=now_game_data["script_data"]
@ -398,6 +500,8 @@ func get_currency_game(ind:int):
return now_game_data["gold"] return now_game_data["gold"]
2: 2:
return now_game_data["spirit"] return now_game_data["spirit"]
3:
return now_game_data["physical"]
func set_currency_game(ind:int,value): func set_currency_game(ind:int,value):
match ind: match ind:
0: 0:
@ -406,6 +510,8 @@ func set_currency_game(ind:int,value):
now_game_data["gold"]=value now_game_data["gold"]=value
2: 2:
now_game_data["spirit"]=value now_game_data["spirit"]=value
3:
now_game_data["physical"]=value
game_currency_changed.emit() game_currency_changed.emit()
#更改 #更改
func change_currency_game(ind:int,change): func change_currency_game(ind:int,change):
@ -474,6 +580,7 @@ func get_move_ability():
func get_time_dictionary(): func get_time_dictionary():
var time_unix=int(now_game_data["time_unix"]) var time_unix=int(now_game_data["time_unix"])
return Time.get_datetime_dict_from_unix_time(time_unix) return Time.get_datetime_dict_from_unix_time(time_unix)
#返回当前时间戳
func get_time_unix(): func get_time_unix():
return now_game_data["time_unix"] return now_game_data["time_unix"]
#year、month、day、weekday、hour、minute 和 second #year、month、day、weekday、hour、minute 和 second
@ -527,11 +634,83 @@ var triger:Dictionary={
#角色处理触发器 #角色处理触发器
"character_data_process":func(data):return character_process(data) "character_data_process":func(data):return character_process(data),
#设置事件flag
"set_flag":func(data):set_flag(data["flag_name"],data["value"]),
#使用changevalue更改flag的值可以用来记录事件进度之类的
"change_flag":func (data):set_flag(data["flag_name"],get_flag(data["flag_name"])+data["change_value"]),
#改变地区探索度
"change_scene_explore":func(data):change_scene_explore(data["scene_id"],data["change_value"]),
#带有权重的随机触发器
"rand_triger":func(data):rand_triger(data),
#刷新互动点
"refresh_scene_touch":func(data):now_game_flow.refresh_scene_touch(),
#添加定时任务time limit 为距离当前时间限时
"add_clock_triger":func(data):add_clock_event(get_time_unix()+data["time_limit"],data["triger"]),
#选择触发器
"select_triger":func(data):select_triger(data),
} }
#随机触发器,接收的格式为
#[
# {
# "type":触发器类型,
# "weight":随机权重,
# "data":传入数据
# }....
#]
#意味着在编辑触发器中原本的触发器要写成
#{
# "type":"rand_triger",
# "data":[上面的内容]
func rand_triger(weight_arr:Array):
var sum_wight=weight_arr.reduce(sum_weight,0)
#迭代器
var weight_ind:float=0
var final_res:Dictionary
var rand=randf_range(0,sum_wight)
for i in weight_arr:
weight_ind+=i["weight"]
if weight_ind>=rand:
final_res=i
break
call_triger(final_res["type"],final_res["data"])
#权重迭代器
static func sum_weight(acc:float,new:Dictionary):
return acc+new["weight"]
#条件选择触发器,根据条件触发器结果来决定执行不同的触发器
func select_triger(data:Dictionary):
var condition:Array=data["condition_triger"]
var success_triger:Array=data["success_triger"]
var fail_triger:Array=data["fail_triger"]
var res:bool=true
for i in condition:
print("开始进行选择检定")
res=res and call_condition_triger(i["type"],i["data"])
print("检定结果:"+str(res))
if res:
for i in success_triger:
call_triger(i["type"],i["data"])
else:
for i in fail_triger:
call_triger(i["type"],i["data"])
#使用事件触发器 #使用事件触发器
func call_triger(triger_type:String,data): func call_triger(triger_type:String,data):
print(triger_type)
if triger.has(triger_type): if triger.has(triger_type):
return triger[triger_type].call(data) return triger[triger_type].call(data)
else: else:
@ -579,16 +758,31 @@ var condition_triger:Dictionary={
"is_mission_started":func(data:Dictionary):return data["name"] in get_mission_started(), "is_mission_started":func(data:Dictionary):return data["name"] in get_mission_started(),
"is_missionm_failed":func(data:Dictionary):return data["name"] in get_mission_finished(), "is_missionm_failed":func(data:Dictionary):return data["name"] in get_mission_finished(),
"is_mission_success":func(data:Dictionary):return data["name"] in get_mission_failed(), "is_mission_success":func(data:Dictionary):return data["name"] in get_mission_failed(),
#判断flag是否为指定的值
"is_flag_equal":func(data:Dictionary):return get_flag(data["flag_name"])==data["value"],
#场景探索度大于
"is_scene_explore_more_than":func(data:Dictionary):return get_scene_explore(data["scene_id"])>data["value"],
#场景探索度小于
"is_scene_explore_less_than":func(data:Dictionary):return get_scene_explore(data["scene_id"])<data["value"],
#flag标志显示
"is_flag_more_than":func(data:Dictionary):return get_flag(data["flag_name"])>data["value"],
"is_flag_less_than":func(data:Dictionary):return get_flag(data["flag_name"])<data["value"],
} }
#使用条件触发器 #使用条件触发器
func call_condition_triger(triger_type:String,data): func call_condition_triger(triger_type:String,data):
print(triger_type+":"+str(data))
if condition_triger.has(triger_type): if condition_triger.has(triger_type):
return condition_triger[triger_type].call(data) var res= condition_triger[triger_type].call(data)
print(res)
return res
else: else:
print(false)
return false return false
@ -655,9 +849,15 @@ func get_rand(scene_id:String,touch_name:String,index:String,condition:float)->b
} }
return dic["last_rand_result"] return dic["last_rand_result"]
#显示鉴定界面(用于触发器) #显示鉴定界面(用于触发器)
func show_identification(data:String): func show_identification(data:Dictionary):
if now_game_flow!=null: if now_game_flow!=null:
now_game_flow.show_identification(data) var success_triger=[]
var fail_triger=[]
if data.has("success_triger"):
success_triger=data["success_triger"]
if data.has("fail_triger"):
fail_triger=data["fail_triger"]
now_game_flow.show_identification(data["id"],success_triger,fail_triger)
pass pass
#为随机创建一个新的随机字典 #为随机创建一个新的随机字典
func recreate_rand_dic(condition:float)->Dictionary: func recreate_rand_dic(condition:float)->Dictionary:

View File

@ -184,7 +184,9 @@
"triger":[ "triger":[
{ {
"type":"show_identifaction", "type":"show_identifaction",
"data":"fish" "data":{
"id":"fish"
}
}, },
{ {
"type":"end_event", "type":"end_event",
@ -324,7 +326,9 @@
"triger":[ "triger":[
{ {
"type":"show_identifaction", "type":"show_identifaction",
"data":"AM_judge" "data":{
"id":"AM_judge"
}
}, },
{ {
"type":"end_event", "type":"end_event",
@ -347,5 +351,272 @@
}] }]
} }
] ]
},
"london_tansuo":{
"name":"探索-伦敦西区",
"texture":"london_tansuo",
"text":"你整顿装备,准备对这座城市进行探索",
"choice":[]
},
"find_cat_start":{
"name":"寻找丢失的猫咪",
"texture":"cat",
"text":"客户需要帮忙寻找走丢的猫咪",
"choice":[
{
"name":"接受任务",
"triger":[
{
"type":"set_flag",
"data":{
"flag_name":"find_cat",
"value":0
}
},
{
"type":"add_clock_triger",
"data":{
"time_limit":60480,
"triger":[
{
"type":"select_triger",
"data":{
"condition_triger":[{
"type":"is_flag_more_than",
"data":{
"flag_name":"find_cat_progress",
"value":7
}
}],
"success_triger":[{
"type":"change_event",
"data":"find_cat_success"
}],
"fail_triger":[{
"type":"change_event",
"data":"find_cat_fail"
}]
}
}
]
}
},
{
"type":"set_flag",
"data":{
"flag_name":"find_cat_progress",
"value":0
}
},{
"type":"end_event",
"data":""
},{
"type":"refresh_scene_touch",
"data":""
}
]
},
{
"name":"拒绝",
"triger":[{
"type":"end_event",
"data":"",
}],
}
],
},
"find_cat_main":{
"name":"寻找丢失的猫咪",
"texture":"cat",
"text":"如何寻找?",
"choice":[
{
"name":"寻找踪迹(感知鉴定,消耗体力10",
"condition":[
{
"type":"currency_more_than",
"data":{
"ind":3,
"value":10
}
}
],
"triger":[{
"type":"show_identifaction",
"data":{
"id":"WIS_judge",
"success_triger":[
{
"type":"change_flag",
"data":{
"flag_name":"find_cat_progress",
"change_value":8
}
}
],
"fail_triger":[
{
"type":"change_flag",
"data":{
"flag_name":"find_cat_progress",
"change_value":8
}
}
]
}
},
{
"type":"add_currency",
"data":{
"ind":3,
"value":-10
}
},
{
"type":"flow_time",
"data":{
"hour":1
}
},
{
"type":"end_event",
"data":"",
}
]
},
{
"name":"询问周边(魅力鉴定),消耗体力10",
"condition":[
{
"type":"currency_more_than",
"data":{
"ind":3,
"value":10
}
}
],
"triger":[
{
"type":"show_identifaction",
"data":{
"id":"AM_judge",
"success_triger":[
{
"type":"change_flag",
"data":{
"flag_name":"find_cat_progress",
"change_value":1
}
}
]
}
},
{
"type":"flow_time",
"data":{
"hour":1
}
},
]
},
{
"name":"花费更多精力消耗30体力",
"condition":[
{
"type":"currency_more_than",
"data":{
"ind":3,
"value":30
}
}
],
"triger":[
{
"type":"flow_time",
"data":{
"hour":3
}
},
]
},
{
"name":"动物的办法",
"triger":[
{
"type":"flow_time",
"data":{
"hour":1
}
},
]
},
{
"name":"退出",
"triger":[
{
"type":"end_event",
"data":"",
}
]
}
]
},
"find_cat_success":{
"name":"寻找丢失的猫咪-成功",
"texture":"cat",
"text":"任务成功",
"choice":[
{
"name":"退出",
"triger":[
{
"type":"end_event",
"data":"",
},
{
"type":"set_flag",
"data":{
"flag_name":"find_cat",
"value":1,
}
},
{
"type":"refresh_scene_touch",
"data":""
}
]
}
]
},
"find_cat_fail":{
"name":"寻找丢失的猫咪-失败",
"texture":"cat",
"text":"任务失败",
"choice":[
{
"name":"退出",
"triger":[
{
"type":"end_event",
"data":"",
},
{
"type":"set_flag",
"data":{
"flag_name":"find_cat",
"value":1,
}
},
{
"type":"refresh_scene_touch",
"data":""
}
]
}
]
} }
} }

View File

@ -32,10 +32,18 @@
"preview":"fish_preview", "preview":"fish_preview",
}, },
"AM_judge":{ "AM_judge":{
"prview":"fish_preview",
"name":"魅力鉴定", "name":"魅力鉴定",
"type":0, "type":0,
"attribute_name":"AM", "attribute_name":"AM",
"attribute_value":100, "attribute_value":100,
},
"WIS_judge":{
"prview":"fish_preview",
"name":"感知鉴定",
"type":0,
"attribute_name":"WIS",
"attribute_value":0,
} }
} }

View File

@ -153,4 +153,149 @@
} }
}, },
"london_west":{
"name":"伦敦西区",
"texture":"london_west",
"map":"map_01",
"quick_event":[
{
"name":"时间测试",
"event":"event_01"
},
{
"name":"测试场景事件",
"event":"event_02"
},
{
"name":"社交",
"event":"event_socialize"
},
{
"name":"探索",
"event":"london_tansuo"
},
],
"linked_scene":[
{
"name":"前往住宅",
"id":"london_zhuzhai1",
"distance":100
},
{
"name":"集市",
"id":"london_jishi1",
"distance":100
}
],
"touch":{
"测试互动点118点后出现":{
"condition":[
{
"type":"time_limit",
"data":{
"from":{
"hour":18
}
}
}
],
"triger":[],
"position":[100,100],
"event":"event_01"
},
"测试互动点2197012后出现":{
"condition":[
{
"type":"date_limit",
"data":{
"from":{
"year":1970,
"month":1,
"day":2
}
}
}
],
"position":[200,200],
"event":"event_02"
},
"测试互动点3时间变化有50%概率出现)":{
"condition":[
{
"type":"rand",
"data":{
"condition":0.5
}
}
],
"position":[300,300],
"event":"event_02"
},
"寻找丢失的猫咪":{
"condition":[
{
"type":"is_flag_equal",
"data":{
"flag_name":"find_cat",
"value":-1
}
}
],
"position":[600,600],
"triger":[{
"type":"change_event",
"data":"find_cat_start"
}
]
},
"寻找猫咪主事件":{
"condition":[
{
"type":"is_flag_equal",
"data":{
"flag_name":"find_cat",
"value":0
}
}
],
"position":[600,600],
"triger":[{
"type":"change_event",
"data":"find_cat_main"
}
]
}
}
},
"london_zhuzhai1":{
"name":"伦敦-住宅",
"texture":"london_zhuzhai1",
"map":"map_01",
"quick_event":[],
"linked_scene":[{
"name":"伦敦西区",
"id":"london_west",
"distance":100
},
],
},
"london_jishi1":{
"name":"伦敦-集市1",
"texture":"london_jishi1",
"map":"map_01",
"quick_event":[],
"linked_scene":[{
"name":"伦敦西区",
"id":"london_west",
"distance":100
},
],
},
} }

View File

@ -17,7 +17,7 @@
"month":1, "month":1,
"day":1, "day":1,
}, },
"init_scene":"scene_01", "init_scene":"london_west",
"init_event":"paoxiao1920start", "init_event":"paoxiao1920start",
}, },
"script_002":{ "script_002":{

View File

@ -18,5 +18,10 @@
"fish_fail":"res://test/texture/fish_fail.jpg", "fish_fail":"res://test/texture/fish_fail.jpg",
"rod":"res://test/texture/rod.jpg", "rod":"res://test/texture/rod.jpg",
"paoxiao1920title":"res://test/texture/paoxiao1920_demo_title.jpg", "paoxiao1920title":"res://test/texture/paoxiao1920_demo_title.jpg",
"paoxiao1920gongbinietingzhan":"res://test/texture/paoxiao1920gongbinietingzhan.png" "paoxiao1920gongbinietingzhan":"res://test/texture/paoxiao1920gongbinietingzhan.png",
"london_west":"res://test/texture/lundunxiqu.webp",
"london_zhuzhai1":"res://test/texture/london_zhuzhai1.jpg",
"london_jishi1":"res://test/texture/london_jishi1.jpg",
"london_tansuo":"res://test/texture/london_tansuo.jpg",
"cat":"res://test/texture/find_lost_cat.jpg",
} }

View File

@ -18,6 +18,7 @@ const GAME_FLOW_EVENT = preload("res://scene/game_flow_event.tscn")
const GAME_FLOW_PLACE = preload("res://scene/game_flow_place.tscn") const GAME_FLOW_PLACE = preload("res://scene/game_flow_place.tscn")
var scene_data:Dictionary var scene_data:Dictionary
func _ready() -> void: func _ready() -> void:
Global.scene_explore_changed.connect(explore_update)
#get_window().size=Vector2i(2560,1440) #get_window().size=Vector2i(2560,1440)
if Global.is_script_finish(): if Global.is_script_finish():
%points_settlement.show() %points_settlement.show()
@ -60,6 +61,9 @@ func set_scene(id:String):
touch_data[i]["name"]=i touch_data[i]["name"]=i
new_touch.set_data(touch_data[i]) new_touch.set_data(touch_data[i])
new_touch.judge() new_touch.judge()
#更新探索度
explore_update(id)
#判断是否判断进入事件
try_init_event() try_init_event()
func judge_touch(): func judge_touch():
@ -74,6 +78,7 @@ func touch_click(data:Dictionary):
pass pass
func update_date(): func update_date():
Global.judge_clock_event()
var time_dic=Global.get_time_dictionary() var time_dic=Global.get_time_dictionary()
date.text=str(time_dic["year"])+"/"+str(time_dic["month"])+"/"+str(time_dic["day"]) date.text=str(time_dic["year"])+"/"+str(time_dic["month"])+"/"+str(time_dic["day"])
judge_touch() judge_touch()
@ -135,10 +140,12 @@ func _on_save_pressed() -> void:
func _on_load_pressed() -> void: func _on_load_pressed() -> void:
pass # Replace with function body. pass # Replace with function body.
#显示对应id的鉴定事件 #显示对应id的鉴定事件
func show_identification(id:String): func show_identification(id:String,success_triger:Array=[],fail_triger:Array=[]):
%identification.show() %identification.show()
var indetification=Database.get_identifation_data(id) var indetification=Database.get_identifation_data(id)
%identification.set_data(indetification) %identification.set_data(indetification)
%identification.judge_success_triger=success_triger
%identification.judge_fail_trigtr=fail_triger
pass pass
func show_auction(npc_id_array:Array,item_id_array:Array): func show_auction(npc_id_array:Array,item_id_array:Array):
@ -177,3 +184,16 @@ func try_init_event():
var init_event=Global.get_init_event() var init_event=Global.get_init_event()
show_event(init_event) show_event(init_event)
Global.shown_init_event() Global.shown_init_event()
#探索度改变触发,用来连接信号,更新UI
func explore_update(scene_id:String):
%explore_percent.text=str(Global.get_scene_explore(scene_data["id"]))+"%"
pass
#刷新互动点条件
func refresh_scene_touch():
for i in touch_add_pos.get_children():
i.judge()
pass

View File

@ -316,7 +316,8 @@ theme_override_font_sizes/font_size = 22
text = "侦察进度:" text = "侦察进度:"
vertical_alignment = 1 vertical_alignment = 1
[node name="Label2" type="Label" parent="hbox/HBoxContainer/TextureRect/HBoxContainer"] [node name="explore_percent" type="Label" parent="hbox/HBoxContainer/TextureRect/HBoxContainer"]
unique_name_in_owner = true
layout_mode = 2 layout_mode = 2
size_flags_horizontal = 8 size_flags_horizontal = 8
size_flags_vertical = 1 size_flags_vertical = 1

View File

@ -35,8 +35,8 @@ func judge():
func _on_tool_button_pressed() -> void: func _on_tool_button_pressed() -> void:
if data.has("triger"): if data.has("triger"):
for i in data["triger"]: for i in data["triger"]:
var type=data["triger"]["type"] var type=i["type"]
var data=data["triger"]["data"] var data=i["data"]
Global.call_triger(type,data) Global.call_triger(type,data)
pass pass
pass # Replace with function body. pass # Replace with function body.

View File

@ -2,6 +2,20 @@ extends Control
var data:Dictionary var data:Dictionary
const SINGLE_IDENTIFICATION_CARD = preload("res://scene/single_identification_card.tscn") const SINGLE_IDENTIFICATION_CARD = preload("res://scene/single_identification_card.tscn")
var character_data:Dictionary var character_data:Dictionary
#单次鉴定的属性名字
var single_judge_name:String=""
#单次鉴定的属性鉴定值
var single_judge_value:float=0
#单次鉴定的成功触发器
var judge_success_triger:Array=[]
#单次鉴定的失败触发器
var judge_fail_trigtr:Array=[]
func _ready() -> void: func _ready() -> void:
#获取装备加成后的角色数据 #获取装备加成后的角色数据
character_data=CharacterTool.get_character_with_equip_value(Global.get_now_character_data()) character_data=CharacterTool.get_character_with_equip_value(Global.get_now_character_data())
@ -18,7 +32,9 @@ func set_data(_data:Dictionary):
%multi_pre.hide() %multi_pre.hide()
%single.show() %single.show()
%single_name.text=data["name"] %single_name.text=data["name"]
%indetification_value.text=CharacterTool.get_name_by_attribute_key(data["attribute_name"])+":"+str(data["attribute_value"]) single_judge_name=CharacterTool.get_name_by_attribute_key(data["attribute_name"])
single_judge_value=data["attribute_value"]
%indetification_value.text=single_judge_name+":"+str(single_judge_value)
var apped_item_data:Array=[] var apped_item_data:Array=[]
#从背包中寻找可用item #从背包中寻找可用item
func search_bag(): func search_bag():
@ -65,10 +81,38 @@ func _on_refuse_pressed() -> void:
func _on_single_start_pressed() -> void: func _on_single_start_pressed() -> void:
var character_dt=CharacterTool.get_character_use_identification_card(character_data,apped_item_data)
var res=judge_single_identification(character_dt)
if res:
for i in judge_success_triger:
Global.call_triger(i["type"],i["data"])
else:
for i in judge_fail_trigtr:
Global.call_triger(i["type"],i["data"])
#清空触发器
judge_success_triger=[]
judge_fail_trigtr=[]
print("鉴定结果"+str(res))
hide()
pass # Replace with function body. pass # Replace with function body.
func judge_single_identification(character_dt:Dictionary)->bool:
var attribute_value=CharacterTool.get_character_attribute(character_dt,single_judge_name)
if attribute_value is float:
var percent=(attribute_value-single_judge_value)/30
var rand=randf()
if rand<percent:
return true
else:
return false
else:
return false
pass
func _on_multi_start_pressed() -> void: func _on_multi_start_pressed() -> void:
%multi_indetification.character_data=CharacterTool.get_character_use_identification_card(character_data,apped_item_data) %multi_indetification.character_data=CharacterTool.get_character_use_identification_card(character_data,apped_item_data)
%multi_indetification.set_data(data) %multi_indetification.set_data(data)

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://q8j84gup4qf7"
path="res://.godot/imported/find_lost_cat.jpg-725af2f26807c853c497b16664d33498.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://test/texture/find_lost_cat.jpg"
dest_files=["res://.godot/imported/find_lost_cat.jpg-725af2f26807c853c497b16664d33498.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c4057ie2brbfm"
path="res://.godot/imported/london_jishi1.jpg-e92a325184c1ea5ff967ed6e31b18b36.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://test/texture/london_jishi1.jpg"
dest_files=["res://.godot/imported/london_jishi1.jpg-e92a325184c1ea5ff967ed6e31b18b36.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 188 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c6yyw2it83iry"
path="res://.godot/imported/london_tansuo.jpg-3e5618e6f3ad052a6bcf5025c7c406c9.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://test/texture/london_tansuo.jpg"
dest_files=["res://.godot/imported/london_tansuo.jpg-3e5618e6f3ad052a6bcf5025c7c406c9.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 331 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cchsbmhn306r8"
path="res://.godot/imported/london_zhuzhai1.jpg-3d95ec1f497e81c578371dcf3b184b54.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://test/texture/london_zhuzhai1.jpg"
dest_files=["res://.godot/imported/london_zhuzhai1.jpg-3d95ec1f497e81c578371dcf3b184b54.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

After

Width:  |  Height:  |  Size: 234 KiB

View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b0xijp2kq5srl"
path="res://.godot/imported/lundunxiqu.webp-eaa976947479e26977060c2191ca0d9f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://test/texture/lundunxiqu.webp"
dest_files=["res://.godot/imported/lundunxiqu.webp-eaa976947479e26977060c2191ca0d9f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1