MCPcopy Create free account
hub / github.com/THUDM/AgentTuning / skill_to_json

Function skill_to_json

AgentBench.old/src/tasks/card_game/logic/src/fish.cpp:27–40  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27Json::Value skill_to_json(std::string type, std::vector<Fish*> targets, int player, int value, bool is_skill) {
28 Json::Value json_skill, json_targets;
29 json_skill["type"] = type;
30 json_skill["isSkill"] = is_skill;
31 for(auto i : targets) {
32 Json::Value json_target;
33 json_target["pos"] = i->pos;
34 json_target["player"] = player;
35 json_target["value"] = value;
36 json_targets.append(json_target);
37 }
38 json_skill["targets"] = json_targets;
39 return json_skill;
40}
41
42Json::Value passive_to_json(std::string type, int source, int player, float value, int time) {
43 Json::Value json;

Callers 3

attackMethod · 0.85
skillMethod · 0.85
bonus_attackMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected