From 09de53f5231caa477f2248bb8b38f0d79becaefb Mon Sep 17 00:00:00 2001 From: TsubakiLoL <2789646812@qq.com> Date: Mon, 18 Nov 2024 18:48:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8E=A2=E7=B4=A2=E4=BA=8B=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autoload/global/script/global.gd | 55 ++++++++++++++++++++++++++++++++ json/event.json | 24 ++++++++++++-- json/indetification.json | 23 ++++++++++++- scene/game_flow.gd | 6 ++-- scene/game_flow.tscn | 16 +++++++++- scene/multi_indetification.gd | 5 ++- 6 files changed, 122 insertions(+), 7 deletions(-) diff --git a/autoload/global/script/global.gd b/autoload/global/script/global.gd index c4fc705..6552be9 100644 --- a/autoload/global/script/global.gd +++ b/autoload/global/script/global.gd @@ -877,6 +877,7 @@ func show_auction(data:Dictionary): var identfication_round_triger_dic:Dictionary={ "fish_round": fish_round, + "explore_round":explore_round, } func call_round_triger(triger_type:String,character_data:Dictionary,round_dic:Dictionary,choice:String): if identfication_round_triger_dic.has(triger_type): @@ -913,6 +914,7 @@ func fish_get_difficulty(character_data:Dictionary,round_dic:Dictionary): #用来判断鉴定是否结束的函数 var identification_is_finish_triger:Dictionary={ "normal":normal_is_finish, + "explore_is_finish":explore_is_finish, } func call_is_finish_triger(triger_type:String,character_data:Dictionary,round_dic:Dictionary): if identification_is_finish_triger.has(triger_type): @@ -928,6 +930,7 @@ func normal_is_finish(character_data:Dictionary,round_dic:Dictionary)->bool: #鉴定结束触发的函数(用于获得奖励一类的) var identification_finish_triger:Dictionary={ "fish":fish_finish, + "explore_finish":explore_finish, } func call_finish_triger(triger_type:String,character_data:Dictionary,round_dic:Dictionary): if identification_finish_triger.has(triger_type): @@ -976,3 +979,55 @@ func _ready() -> void: load_config() load_system_game_data() load_save_data() + + + + + + +#探索鉴定 + + + +func explore_round(character_data:Dictionary,round_dic:Dictionary,choice:String)->bool: + if choice=="退出探索": + round_dic["is_finish"]=true + return false + flow_time({ + "minute":5 + }) + Toast.popup(choice) + #Toast.popup("角色鉴定属性名:"+single_judge_name) + #获取感知属性 + var attribute_value=CharacterTool.get_character_attribute(character_data,"WIS") + #Toast.popup("角色值:"+str(attribute_value)) + if attribute_value is float: + + var percent=(attribute_value-50)/50 + var rand=randf() + #Toast.popup("鉴定概率:"+str(percent*100)+"%") + if rand