Commit 0e55d03e by 周君强

1.推理项目第二版

parent d4c7ebca
...@@ -8,12 +8,14 @@ ...@@ -8,12 +8,14 @@
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" /> <sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" /> <outputRelativeToContentRoot value="true" />
<module name="InferenceGame" /> <module name="InferenceGame" />
<module name="InferenceGame-0.0.2" />
</profile> </profile>
</annotationProcessing> </annotationProcessing>
</component> </component>
<component name="JavacSettings"> <component name="JavacSettings">
<option name="ADDITIONAL_OPTIONS_OVERRIDE"> <option name="ADDITIONAL_OPTIONS_OVERRIDE">
<module name="InferenceGame" options="-parameters" /> <module name="InferenceGame" options="-parameters" />
<module name="InferenceGame-0.0.2" options="-parameters" />
</option> </option>
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.qiwu.inference.common; ...@@ -2,6 +2,7 @@ package com.qiwu.inference.common;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference; import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.PersistenceUtil; import com.qiwu.inference.common.utils.PersistenceUtil;
import com.qiwu.inference.common.utils.SpeechUtil; import com.qiwu.inference.common.utils.SpeechUtil;
import com.qiwu.inference.dao.*; import com.qiwu.inference.dao.*;
...@@ -25,6 +26,8 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -25,6 +26,8 @@ import java.util.concurrent.ConcurrentHashMap;
public class InitSysServlet implements InitializingBean { public class InitSysServlet implements InitializingBean {
Logger log = LoggerFactory.getLogger(InitSysServlet.class); Logger log = LoggerFactory.getLogger(InitSysServlet.class);
@Value("${offlineTime}")
private String offlineTime;
@Value("${userFilePath}") @Value("${userFilePath}")
private String userFilePath; private String userFilePath;
@Value("${configFilePath}") @Value("${configFilePath}")
...@@ -69,29 +72,6 @@ public class InitSysServlet implements InitializingBean { ...@@ -69,29 +72,6 @@ public class InitSysServlet implements InitializingBean {
log.info("关卡攻略数据缓存完成"); log.info("关卡攻略数据缓存完成");
} }
//--------------------------加载玩家数据----------------------
log.info("开始加载玩家数据");
//从yml配置文件中取出存放玩家数据的地址
File file = new File(userFilePath);
File[] files = file.listFiles();
if (files == null) {
log.info("路径" + userFilePath+ "下没有文件");
return;
}
Map<String, Player> playerMap = new ConcurrentHashMap<>();
for (File f : files) {
if (f.isFile()) {
String s = PersistenceUtil.getDataFromFile(String.valueOf(f));
//JSON转map对象
Player player = JSON.parseObject(s, new TypeReference<Player>(){});
String fileName = f.getName().replace(".json", "");
playerMap.put(fileName, player);
TimingAcquisition.playerMap.putAll(playerMap);
}
}
log.info("玩家数据缓存完成");
//--------------------加载话术----------------- //--------------------加载话术-----------------
TimingAcquisition.speechLoading(speechFilePath); TimingAcquisition.speechLoading(speechFilePath);
//--------------------加载闲聊话术的excel表---------------- //--------------------加载闲聊话术的excel表----------------
...@@ -124,6 +104,18 @@ public class InitSysServlet implements InitializingBean { ...@@ -124,6 +104,18 @@ public class InitSysServlet implements InitializingBean {
TimingAcquisition.personSpeechMap.putAll(personSpeechMap); TimingAcquisition.personSpeechMap.putAll(personSpeechMap);
log.info("人物见面话术加载完成"); log.info("人物见面话术加载完成");
//--------------------加载操作提示话术的excel表----------------
log.info("加载操作提示话术");
Map<Integer, OperateSpeech> operateSpeechMap = SpeechUtil.getOperateSpeechModel(speechFilePath);
TimingAcquisition.operateSpeechMap.putAll(operateSpeechMap);
log.info("操作提示话术加载完成");
//--------------------加载线索前因话术的excel表----------------
// log.info("加载线索前因话术");
// Map<Integer, List<PreReasonSpeech>> preReasonSpeechMap = SpeechUtil.getPreReasonSpeechModel(speechFilePath);
// TimingAcquisition.preReasonSpeechMap.putAll(preReasonSpeechMap);
// log.info("线索前因话术加载完成");
//-----------------缓存场所信息------------------ //-----------------缓存场所信息------------------
Map<String, Location> locationMap = new ConcurrentHashMap<>(); Map<String, Location> locationMap = new ConcurrentHashMap<>();
...@@ -180,12 +172,38 @@ public class InitSysServlet implements InitializingBean { ...@@ -180,12 +172,38 @@ public class InitSysServlet implements InitializingBean {
log.info("系统配置信息缓存完成"); log.info("系统配置信息缓存完成");
//-----------------缓存结局目标配置信息------------------ //-----------------缓存结局目标配置信息------------------
Map<Integer, EndGoal> endGoalMap = new ConcurrentHashMap<>(); // Map<Integer, EndGoal> endGoalMap = new ConcurrentHashMap<>();
List<EndGoal> endGoalList = endGoalMapper.findAll(); // List<EndGoal> endGoalList = endGoalMapper.findAll();
for (EndGoal endGoal : endGoalList) { // for (EndGoal endGoal : endGoalList) {
endGoalMap.put(endGoal.getId(), endGoal); // endGoalMap.put(endGoal.getId(), endGoal);
// }
// TimingAcquisition.endGoalMap.putAll(endGoalMap);
// log.info("结局目标配置信息缓存完成");
//--------------------------加载玩家数据----------------------
log.info("开始加载玩家数据");
//从yml配置文件中取出存放玩家数据的地址
File file = new File(userFilePath);
File[] files = file.listFiles();
if (files == null) {
log.info("路径" + userFilePath+ "下没有文件");
return;
} }
TimingAcquisition.endGoalMap.putAll(endGoalMap); // Map<String, Player> playerMap = new ConcurrentHashMap<>();
log.info("结局目标配置信息缓存完成"); for (File f : files) {
if (f.isFile()) {
// String s = PersistenceUtil.getDataFromFile(String.valueOf(f));
//JSON转map对象
// Player player = JSON.parseObject(s, new TypeReference<Player>(){});
String fileName = f.getName().replace(".json", "");
// playerMap.put(fileName, player);
// TimingAcquisition.playerMap.putAll(playerMap);
TimingAcquisition.uidList.add(fileName); //保存所有玩家的uid
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = fileName + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
}
}
log.info("玩家数据缓存完成");
} }
} }
...@@ -33,6 +33,10 @@ public class TimingAcquisition { ...@@ -33,6 +33,10 @@ public class TimingAcquisition {
* 玩家信息,Map<sid, Player> * 玩家信息,Map<sid, Player>
*/ */
public volatile static Map<String, Player> playerMap = new ConcurrentHashMap<>(); public volatile static Map<String, Player> playerMap = new ConcurrentHashMap<>();
/**
* 所有在线玩家的uid数组。用于是否加载玩家数据的判断
*/
public volatile static List<String> uidList = new ArrayList<>();
/** /**
* 场所配置信息 * 场所配置信息
...@@ -99,6 +103,14 @@ public class TimingAcquisition { ...@@ -99,6 +103,14 @@ public class TimingAcquisition {
* 人物见面话术,Map<人物名称, List<话术配置>> * 人物见面话术,Map<人物名称, List<话术配置>>
*/ */
public volatile static Map<String, List<PersonSpeech>> personSpeechMap = new ConcurrentHashMap<>(); public volatile static Map<String, List<PersonSpeech>> personSpeechMap = new ConcurrentHashMap<>();
/**
* 操作提示话术,Map<人物名称, List<话术配置>>
*/
public volatile static Map<Integer, OperateSpeech> operateSpeechMap = new ConcurrentHashMap<>();
/**
* 线索前因话术,Map<人物名称, List<话术配置>>
*/
public volatile static Map<Integer, List<PreReasonSpeech>> preReasonSpeechMap = new ConcurrentHashMap<>();
/** /**
* 通过yaml文件加载所有话术到缓存中 * 通过yaml文件加载所有话术到缓存中
......
...@@ -9,6 +9,7 @@ import com.qiwu.inference.dto.Player; ...@@ -9,6 +9,7 @@ import com.qiwu.inference.dto.Player;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;
import java.util.Map; import java.util.Map;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
...@@ -20,8 +21,12 @@ import java.util.concurrent.TimeUnit; ...@@ -20,8 +21,12 @@ import java.util.concurrent.TimeUnit;
@EnableAsync @EnableAsync
@Component @Component
public class ExpireThread implements Runnable{ public class ExpireThread implements Runnable{
//动态词组更新秘钥
public static String userFilePath;
@Value("${userFilePath}") @Value("${userFilePath}")
private String userFilePath; public void setUserFilePath(String userFilePath) {
ExpireThread.userFilePath = userFilePath;
}
@Override @Override
public void run() { public void run() {
...@@ -49,15 +54,16 @@ public class ExpireThread implements Runnable{ ...@@ -49,15 +54,16 @@ public class ExpireThread implements Runnable{
if (key.contains("%#%online%#%")) { if (key.contains("%#%online%#%")) {
String uid = key.replace("%#%online%#%", ""); String uid = key.replace("%#%online%#%", "");
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
//更新玩家为离线状态 if (!StringUtils.isEmpty(player)) {
player.setStatus(Constants.OFFLINE); //更新玩家为离线状态
//修改下线时间 player.setStatus(Constants.OFFLINE);
player.setOfflineTime(DateUtil.getCurrentTime()); //修改下线时间
//--------------持久化该园丁信息--------------- player.setOfflineTime(DateUtil.getCurrentTime());
Map<String, Player> playerMap = new ConcurrentHashMap<>(); //--------------持久化该园丁信息---------------
playerMap.put(uid, TimingAcquisition.playerMap.get(uid)); PersistenceUtil.saveDataToFile(userFilePath, uid, JSON.toJSONString(player));
String playerStr = JSON.toJSONString(playerMap); //-----------------清除该玩家的数据缓存-----------------
PersistenceUtil.saveDataToFile(userFilePath, uid, playerStr); TimingAcquisition.playerMap.remove(uid);
}
} }
//清除过期缓存 //清除过期缓存
CacheGlobal.concurrentMap.remove(key); CacheGlobal.concurrentMap.remove(key);
......
...@@ -22,7 +22,7 @@ public class CacheUtil { ...@@ -22,7 +22,7 @@ public class CacheUtil {
MyCache myCache = CacheGlobal.concurrentMap.get(key); MyCache myCache = CacheGlobal.concurrentMap.get(key);
myCache.setHitCount(myCache.getHitCount() + 1); myCache.setHitCount(myCache.getHitCount() + 1);
myCache.setLastTime(System.currentTimeMillis()); myCache.setLastTime(System.currentTimeMillis());
myCache.setExpireTime(System.currentTimeMillis()); myCache.setExpireTime(expire);
myCache.setValue(value); myCache.setValue(value);
} else { } else {
MyCache myCache = new MyCache(); MyCache myCache = new MyCache();
......
...@@ -90,10 +90,13 @@ public class DataTrimUtil { ...@@ -90,10 +90,13 @@ public class DataTrimUtil {
"]"; "]";
//需要给玩家提示任务线索 //需要给玩家提示任务线索
// if (TimingAcquisition.playerMap.get(uid).isTipFlag()) { // if (TimingAcquisition.playerMap.get(uid).isTipFlag()) {
// //搭档名称
// String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
// String addText = PlayerUtil.getClueFromTaskKey(uid); // String addText = PlayerUtil.getClueFromTaskKey(uid);
// addText = SpeechUtil.addHeader(addText, partnerName);
// if (!StringUtils.isEmpty(addText)) { // if (!StringUtils.isEmpty(addText)) {
// TimingAcquisition.playerMap.get(uid).setTipFlag(false); // TimingAcquisition.playerMap.get(uid).setTipFlag(false);
// data.getVars().set反馈文本(data.getVars().get反馈文本() + "【寒烟@正常】" + addText); // data.getVars().set反馈文本(data.getVars().get反馈文本() + addText);
// } // }
// } // }
log.info(feedContent); log.info(feedContent);
......
...@@ -102,6 +102,35 @@ public class PersistenceUtil { ...@@ -102,6 +102,35 @@ public class PersistenceUtil {
} }
/** /**
* 读取json文件数据
* @param path json文件路径
* @param fileName
* @return 字符串
*/
public static String readJson(String path, String fileName) {
String jsonPath = path + fileName;
File jsonFile = new File(jsonPath);
try {
FileReader fileReader = new FileReader(jsonFile);
BufferedReader reader = new BufferedReader(fileReader);
StringBuilder sb = new StringBuilder();
while (true) {
int ch = reader.read();
if (ch != -1) {
sb.append((char) ch);
} else {
break;
}
}
fileReader.close();
reader.close();
return sb.toString();
} catch (IOException e) {
return "";
}
}
/**
* 将话术转成map格式 * 将话术转成map格式
* @param * @param
* @return Map<String, Map<String, List<String>>> * @return Map<String, Map<String, List<String>>>
...@@ -117,4 +146,36 @@ public class PersistenceUtil { ...@@ -117,4 +146,36 @@ public class PersistenceUtil {
} }
return speechMap; return speechMap;
} }
/**
* 读取玩家json文件的数据
* @param path json文件路径
* @param uid
* @return 字符串
*/
public static String loadPlayerData(String path, String uid) {
BufferedReader reader = null;
String fileName = uid + ".json";
String lastStr = "";
try {
FileInputStream fileInputStream = new FileInputStream(path + fileName);
InputStreamReader inputStreamReader = new InputStreamReader(fileInputStream, "UTF-8");
reader = new BufferedReader(inputStreamReader);
String stringTmp = null;
while ((stringTmp = reader.readLine()) != null) {
lastStr += stringTmp;
}
} catch (Exception e) {
e.printStackTrace();
} finally {
try {
if (reader != null) {
reader.close();
}
} catch (Exception e) {
e.printStackTrace();
}
}
return lastStr;
}
} }
...@@ -2,15 +2,24 @@ package com.qiwu.inference.common.utils; ...@@ -2,15 +2,24 @@ package com.qiwu.inference.common.utils;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.cache.ExpireThread;
import com.qiwu.inference.dto.*; import com.qiwu.inference.dto.*;
import com.qiwu.inference.pojo.Location; import com.qiwu.inference.pojo.Location;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.io.*; import java.io.*;
import java.util.*; import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
@Component
public class PlayerUtil { public class PlayerUtil {
public static String expireTime;
@Value("${expireTime}")
public void setExpireTime(String expireTime) {
PlayerUtil.expireTime = expireTime;
}
/** /**
* 通过角色身份找到对应的人物名称 * 通过角色身份找到对应的人物名称
* @param name * @param name
...@@ -74,6 +83,52 @@ public class PlayerUtil { ...@@ -74,6 +83,52 @@ public class PlayerUtil {
} }
/** /**
* 判断是否符合阈值需求
* @param demandTask
* @param subject
* @return
*/
public static boolean checkThreshold(DemandTaskDto demandTask, Person subject){
boolean flag = false;
//任务无需解锁或者任务已解锁
if (demandTask.getClueSwitch() != 1) {
if(demandTask.getTrustStart() >=0 && demandTask.getTrustEnd() > 0) {
if(NumberUtil.inNumRange(subject.getTrustDegree(),"["+demandTask.getTrustStart()+","+demandTask.getTrustEnd()+"]")) {
flag = true;
}
}
if(demandTask.getDeterrenceStart() >= 0 && demandTask.getDeterrenceEnd() > 0) {
if(NumberUtil.inNumRange(subject.getDeterrenceDegree(),"["+demandTask.getDeterrenceStart()+","+demandTask.getDeterrenceEnd()+"]")) {
flag = true;
}
}
}
return flag;
}
/**
* 判断是否符合阈值需求,不判断是否解锁
* @param demandTask
* @param subject
* @return
*/
public static boolean checkThresholdNoSwitch(DemandTaskDto demandTask, Person subject){
boolean flag = false;
//任务无需解锁或者任务已解锁
if(demandTask.getTrustStart() >=0 && demandTask.getTrustEnd() > 0) {
if(NumberUtil.inNumRange(subject.getTrustDegree(),"["+demandTask.getTrustStart()+","+demandTask.getTrustEnd()+"]")) {
flag = true;
}
}
if(demandTask.getDeterrenceStart() >= 0 && demandTask.getDeterrenceEnd() > 0) {
if(NumberUtil.inNumRange(subject.getDeterrenceDegree(),"["+demandTask.getDeterrenceStart()+","+demandTask.getDeterrenceEnd()+"]")) {
flag = true;
}
}
return flag;
}
/**
* 获取玩家关卡中人物所在的所有场所 * 获取玩家关卡中人物所在的所有场所
*/ */
public static List<String> getLocationByUid(String uid) { public static List<String> getLocationByUid(String uid) {
...@@ -326,6 +381,64 @@ public class PlayerUtil { ...@@ -326,6 +381,64 @@ public class PlayerUtil {
} }
/** /**
* 找到当前NPC身上,关于指定人物对应任务条件id的线索
* @param uid
* @param subjectId
* @param conditionTaskId
*/
public static List<ClueDto> getClueByConditionTaskId(String uid, Integer subjectId, String conditionTaskId) {
List<ClueDto> result = new ArrayList<>();
Integer currentId = TimingAcquisition.playerMap.get(uid).getPersonId();
Person current = TimingAcquisition.playerMap.get(uid).getPersonMap().get(currentId);
Person subject = TimingAcquisition.playerMap.get(uid).getPersonMap().get(subjectId);
if(!StringUtils.isEmpty(current)){
//通过任务条件id找到玩家需求任务集合
List<DemandTaskDto> demandTaskList = findDemandsByTaskId(subject, subjectId, conditionTaskId);
for (DemandTaskDto demandTask : demandTaskList) {
//找到对应的任务线索id
Integer clueId = demandTask.getClueId();
//找到对应线索
ClueDto clue = getClueById(uid, currentId, clueId);
if (!StringUtils.isEmpty(clue)) {
result.add(clue);
}
}
}
return result;
}
/**
* 找到对应类型且达到阈值的线索
*/
public static List<ClueDto> getCluesByType(Person person, int clueType, int infoLevel) {
List<ClueDto> result = new ArrayList<>();
List<ClueDto> clueList = person.getClues();
if (clueType == 0) {
for (ClueDto clue : clueList) {
//线索大于等于指定层级
if (clue.getInfoLevel() >= infoLevel) {
if (person.getTrustDegree() >= clue.getTrustDegree() || person.getDeterrenceDegree() >= clue.getThreaten()) {
result.add(clue);
}
}
}
} else {
for (ClueDto clue : clueList) {
//为指定类型
if (clue.getType() == clueType) {
//线索大于等于指定层级
if (clue.getInfoLevel() >= infoLevel) {
if (person.getTrustDegree() >= clue.getTrustDegree() || person.getDeterrenceDegree() >= clue.getThreaten()) {
result.add(clue);
}
}
}
}
}
return result;
}
/**
* 查询符合条件的任务 * 查询符合条件的任务
* @param person * @param person
* @param taskTarget 1 信任度提升 2 信任度降低 3 威慑度提升 4 威慑度降低 * @param taskTarget 1 信任度提升 2 信任度降低 3 威慑度提升 4 威慑度降低
...@@ -398,13 +511,13 @@ public class PlayerUtil { ...@@ -398,13 +511,13 @@ public class PlayerUtil {
/** /**
* 通过线索id找到对应线索 * 通过线索id找到对应线索
* @param current * @param person
* @param clueId * @param clueId
*/ */
public static ClueDto getClueById(Person current, Integer clueId) { public static ClueDto getClueById(Person person, Integer clueId, Integer type) {
List<ClueDto> clueList = current.getClues(); List<ClueDto> clueList = person.getClues();
for (ClueDto clue : clueList) { for (ClueDto clue : clueList) {
if (clueId.equals(clue.getClueId())) { if (clueId.equals(clue.getClueId()) && type.equals(clue.getType())) {
return clue; return clue;
} }
} }
...@@ -428,6 +541,51 @@ public class PlayerUtil { ...@@ -428,6 +541,51 @@ public class PlayerUtil {
} }
/** /**
* 通过线索id在主体身上找到对应线索
* @param person
* @param demandTaskDto
*/
public static ClueDto getPreClueById(Person person, DemandTaskDto demandTaskDto) {
List<DemandTaskDto> demandTaskList = person.getDemandTasks();
List<ClueDto> clueList = new ArrayList<>();
if (!StringUtils.isEmpty(demandTaskDto)) {
for (DemandTaskDto demandTask : demandTaskList) {
if (demandTask.getDemandTaskId() == demandTaskDto.getDemandTaskId()
&& demandTask.getSubject() == demandTaskDto.getSubject()) {
ClueDto clue = getClueById(person, demandTask.getClueId(), demandTask.getType());
if (!StringUtils.isEmpty(clue)) {
clueList.add(clue);
}
}
}
}
if (clueList.size() > 1) {
for (ClueDto clue : clueList) {
if (clue.getType() != 6) {
return clue;
}
}
}
if (clueList.size() == 1) {
return clueList.get(0);
}
return null;
}
/**
* 通过线索id找到需求任务
*/
public static DemandTaskDto getDemandTaskByClueId(Person person, ClueDto clue) {
List<DemandTaskDto> demandTaskList = person.getDemandTasks();
for (DemandTaskDto demandTask : demandTaskList) {
if (clue.getClueId() == demandTask.getClueId() && clue.getSubject() == demandTask.getSubject()) {
return demandTask;
}
}
return null;
}
/**
* 通过线索id找到需求任务 * 通过线索id找到需求任务
*/ */
public static DemandTaskDto getDemandTaskByClueId(Person person, Integer clueId) { public static DemandTaskDto getDemandTaskByClueId(Person person, Integer clueId) {
...@@ -498,16 +656,32 @@ public class PlayerUtil { ...@@ -498,16 +656,32 @@ public class PlayerUtil {
} }
} }
} }
if (!StringUtils.isEmpty(postTaskId)) { int objectId = clue.getSubject();
//线索对应人物解锁 if (person.getId() == clue.getSubject()) {
int objectId = clue.getSubject(); objectId = clue.getObject();
if (person.getId() == clue.getSubject()) { }
objectId = clue.getObject(); //线索主体为当前对话人时,解锁对应的任务
if (person.getId().equals(clue.getSubject())) {
//解锁后置任务
if (!StringUtils.isEmpty(postTaskId)) {
//线索对应任务解锁
List<DemandTaskDto> demandTaskObjectList = TimingAcquisition.playerMap.get(uid).getPersonMap().get(objectId).getDemandTasks();
//客体身上该任务解锁
for (DemandTaskDto demandTask : demandTaskObjectList) {
if (demandTask.getDemandTaskId() == Integer.parseInt(postTaskId)) {
//需解锁任务
if (demandTask.getClueSwitch() == 1) {
demandTask.setClueSwitch(2);
}
}
}
} }
} else {
//线索对应他人的任务解锁
List<DemandTaskDto> demandTaskObjectList = TimingAcquisition.playerMap.get(uid).getPersonMap().get(objectId).getDemandTasks(); List<DemandTaskDto> demandTaskObjectList = TimingAcquisition.playerMap.get(uid).getPersonMap().get(objectId).getDemandTasks();
//客体身上该任务解锁 //客体身上该任务解锁
for (DemandTaskDto demandTask : demandTaskObjectList) { for (DemandTaskDto demandTask : demandTaskObjectList) {
if (demandTask.getDemandTaskId() == Integer.parseInt(postTaskId)) { if (demandTask.getClueId() == clue.getClueId()) {
//需解锁任务 //需解锁任务
if (demandTask.getClueSwitch() == 1) { if (demandTask.getClueSwitch() == 1) {
demandTask.setClueSwitch(2); demandTask.setClueSwitch(2);
...@@ -657,15 +831,62 @@ public class PlayerUtil { ...@@ -657,15 +831,62 @@ public class PlayerUtil {
*/ */
public static void resetPlayer(String uid) { public static void resetPlayer(String uid) {
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
player.setClueMap(new HashMap<>()); //初始化推理游戏人物
player.setTaskMap(new HashMap<>()); List<Person> personsCopy = TimingAcquisition.gateInfoMap.get(player.getGateNo());
player.setCurrency(0.0); //深拷贝list
player.setPoint(0); List<Person> personCopyList = PlayerUtil.deepCopyList(personsCopy);
for (Map.Entry<Integer,Person> entry : player.getPersonMap().entrySet()) { Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>();
Map<Integer,Person> personMapCopy = new HashMap<>();
Map<String,Integer> name2IdMapCopy = new HashMap<>();
Map<Integer, String> id2NameMapCopy = new HashMap<>();
for (Person person : personCopyList) {
taskMapCopy.put(person.getId(), new HashMap<>());
personMapCopy.put(person.getId(), person);
name2IdMapCopy.put(person.getName(), person.getId());
id2NameMapCopy.put(person.getId(), person.getName());
}
player.setTaskMap(taskMapCopy);
player.setPersonMap(personMapCopy);
player.setName2IdMap(name2IdMapCopy);
player.setId2NameMap(id2NameMapCopy);
//给玩家分配场所和对话人物
Map<String, List<Integer>> locationPersonMap = new HashMap<>();
Map<Integer, Person> personMap = player.getPersonMap();
for (Map.Entry<Integer, Person> entry : personMap.entrySet()) {
Person person = entry.getValue(); Person person = entry.getValue();
person.setTrustDegree(0); if (!StringUtils.isEmpty(person.getLocation())) {
person.setDeterrenceDegree(0); //没有当前场所
if (StringUtils.isEmpty(locationPersonMap.get(person.getLocation()))) {
List<Integer> personList = new ArrayList<>();
personList.add(entry.getKey());
locationPersonMap.put(person.getLocation(), personList);
}
//有当前场所,但是没有这个人
List<Integer> persons = locationPersonMap.get(person.getLocation());
if (!persons.contains(entry.getKey())) {
persons.add(entry.getKey());
}
}
} }
List<String> locationList = new ArrayList<>(locationPersonMap.keySet());
int index = RandomUtil.randomInt(locationList.size());
String locationId = locationList.get(index);
player.setLocation(locationId);
//随机分配人物
List<Integer> personList = locationPersonMap.get(locationId);
int num = RandomUtil.randomInt(personList.size());
player.setPersonId(personList.get(num));
//生成场所表,包含场所隐藏状态和必现场所
Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(locationPersonMap);
player.setLocationMap(locationMap);
player.setCurrency(3000.0);
player.setPoint(0);
player.setClueMap(new HashMap<>());
player.setFinishedTaskNum(0);
player.setTipFlag(false);
player.setOperateTextNum(1);
player.setAskAndNumMap(new HashMap<>());
player.setFinished(0);
} }
/** /**
...@@ -693,6 +914,7 @@ public class PlayerUtil { ...@@ -693,6 +914,7 @@ public class PlayerUtil {
/** /**
* 生成场所表 * 生成场所表
* @param locationPersonMap
*/ */
public static Map<String, LocationInfoDto> makeLocationMap(Map<String, List<Integer>> locationPersonMap) { public static Map<String, LocationInfoDto> makeLocationMap(Map<String, List<Integer>> locationPersonMap) {
Map<String, LocationInfoDto> locationInfoMap = new HashMap<>(); Map<String, LocationInfoDto> locationInfoMap = new HashMap<>();
...@@ -741,6 +963,23 @@ public class PlayerUtil { ...@@ -741,6 +963,23 @@ public class PlayerUtil {
} }
/** /**
* 判断玩家是否已经见过某个人
* @param locationMap
* @param personId
*/
public static boolean checkHaveMeet(Map<String, LocationInfoDto> locationMap, String locationId, Integer personId) {
//指定场所已有的人物见面次数
Map<Integer, Integer> personInfoMap = locationMap.get(locationId).getPersonInfoMap();
if (!StringUtils.isEmpty(personInfoMap.get(personId))) {
int meetTimes = personInfoMap.get(personId);
if (meetTimes > 0) {
return true;
}
}
return false;
}
/**
* 解锁场所 * 解锁场所
* @param locationMap * @param locationMap
* @param locationId * @param locationId
...@@ -755,6 +994,8 @@ public class PlayerUtil { ...@@ -755,6 +994,8 @@ public class PlayerUtil {
/** /**
* 查找有前置任务的任务 * 查找有前置任务的任务
* @param uid
* @param personIdList
*/ */
public static List<PostTaskDto> getDemandTaskHavePre(String uid, List<Integer> personIdList) { public static List<PostTaskDto> getDemandTaskHavePre(String uid, List<Integer> personIdList) {
List<PostTaskDto> postTaskStatusList = new ArrayList<>(); List<PostTaskDto> postTaskStatusList = new ArrayList<>();
...@@ -784,6 +1025,31 @@ public class PlayerUtil { ...@@ -784,6 +1025,31 @@ public class PlayerUtil {
taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus); taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus);
} }
} }
//该任务为自动触发任务
if (demandTask.getIsAuto() == 1) {
// String[] condition1 = demandTask.getCondition1().split("\\|");
//任务为71000自动完成
if (StringUtils.isEmpty(taskStatusMap.get(demandTask.getDemandTaskId()))) {
//判断后置任务是否完成
int flag = checkTaskStatus(uid, personId, demandTask.getDemandTaskId());
//未完成
if (flag == 0) {
TaskStatusDto taskStatus = new TaskStatusDto();
if (!StringUtils.isEmpty(demandTask.getPostTask())) {
//判断前置任务是否已经完成
Integer postTaskId = Integer.valueOf(demandTask.getPostTask());
//前置任务的完成情况
int finished = checkTaskStatus(uid, demandTask.getObject(), postTaskId);
taskStatus.setTaskId(postTaskId);
taskStatus.setStatus(finished);
} else {
taskStatus.setTaskId(0);
taskStatus.setStatus(0);
}
taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus);
}
}
}
} }
if (taskStatusMap.size() != 0) { if (taskStatusMap.size() != 0) {
postTask.setTaskStatusMap(taskStatusMap); postTask.setTaskStatusMap(taskStatusMap);
...@@ -795,6 +1061,8 @@ public class PlayerUtil { ...@@ -795,6 +1061,8 @@ public class PlayerUtil {
/** /**
* 查找单个人有前置任务的任务 * 查找单个人有前置任务的任务
* @param uid
* @param personId
*/ */
public static List<PostTaskDto> getDemandTaskHavePre(String uid, Integer personId) { public static List<PostTaskDto> getDemandTaskHavePre(String uid, Integer personId) {
List<PostTaskDto> postTaskStatusList = new ArrayList<>(); List<PostTaskDto> postTaskStatusList = new ArrayList<>();
...@@ -820,6 +1088,31 @@ public class PlayerUtil { ...@@ -820,6 +1088,31 @@ public class PlayerUtil {
taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus); taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus);
} }
} }
//该任务为自动触发任务
if (demandTask.getIsAuto() == 1) {
// String[] condition1 = demandTask.getCondition1().split("\\|");
//任务为71000自动完成
if (StringUtils.isEmpty(taskStatusMap.get(demandTask.getDemandTaskId()))) {
//判断后置任务是否完成
int flag = checkTaskStatus(uid, personId, demandTask.getDemandTaskId());
//未完成
if (flag == 0) {
TaskStatusDto taskStatus = new TaskStatusDto();
if (!StringUtils.isEmpty(demandTask.getPostTask())) {
//判断前置任务是否已经完成
Integer postTaskId = Integer.valueOf(demandTask.getPostTask());
//前置任务的完成情况
int finished = checkTaskStatus(uid, demandTask.getObject(), postTaskId);
taskStatus.setTaskId(postTaskId);
taskStatus.setStatus(finished);
} else {
taskStatus.setTaskId(0);
taskStatus.setStatus(0);
}
taskStatusMap.put(demandTask.getDemandTaskId(), taskStatus);
}
}
}
} }
if (taskStatusMap.size() != 0) { if (taskStatusMap.size() != 0) {
postTask.setTaskStatusMap(taskStatusMap); postTask.setTaskStatusMap(taskStatusMap);
...@@ -830,6 +1123,9 @@ public class PlayerUtil { ...@@ -830,6 +1123,9 @@ public class PlayerUtil {
/** /**
* 判断任务是否已经完成,0-未完成,1-已完成 * 判断任务是否已经完成,0-未完成,1-已完成
* @param uid
* @param personId
* @param taskId
*/ */
public static int checkTaskStatus(String uid, Integer personId, Integer taskId) { public static int checkTaskStatus(String uid, Integer personId, Integer taskId) {
Map<Integer,Integer> taskStatusMap = TimingAcquisition.playerMap.get(uid).getTaskMap().get(personId); Map<Integer,Integer> taskStatusMap = TimingAcquisition.playerMap.get(uid).getTaskMap().get(personId);
...@@ -841,54 +1137,126 @@ public class PlayerUtil { ...@@ -841,54 +1137,126 @@ public class PlayerUtil {
/** /**
* 后置任务的提示按优先级查找 * 后置任务的提示按优先级查找
* @param uid
* @param postTaskList
*/ */
public static PostTaskRecordDto getPostTask(String uid, List<PostTaskDto> postTaskList) { public static PostTaskRecordDto getPostTask(String uid, List<PostTaskDto> postTaskList) {
PostTaskRecordDto postTaskRecord = new PostTaskRecordDto(); PostTaskRecordDto postTaskRecord = new PostTaskRecordDto();
List<PostTaskRecordDto> postTaskRecordList = new ArrayList<>(); List<PostTaskRecordDto> postTaskRecordList = new ArrayList<>();
//遍历每个人 Integer currentId = TimingAcquisition.playerMap.get(uid).getPersonId();
Person current = TimingAcquisition.playerMap.get(uid).getPersonMap().get(currentId);
//遍历每个任务
for (PostTaskDto postTask : postTaskList) { for (PostTaskDto postTask : postTaskList) {
Map<Integer, TaskStatusDto> taskStatusMap = postTask.getTaskStatusMap(); Map<Integer, TaskStatusDto> taskStatusMap = postTask.getTaskStatusMap();
for (Map.Entry<Integer, TaskStatusDto> entry : taskStatusMap.entrySet()) { for (Map.Entry<Integer, TaskStatusDto> entry : taskStatusMap.entrySet()) {
Integer postTaskId = entry.getKey(); Integer postTaskId = entry.getKey(); //后置任务id
TaskStatusDto taskStatus = entry.getValue(); TaskStatusDto taskStatus = entry.getValue(); //前置任务id及其状态
//通过人物的后置任务id找到任务信息
DemandTaskDto demandTask = getDemandTaskInfo(uid, postTask.getPersonId(), postTaskId); DemandTaskDto demandTask = getDemandTaskInfo(uid, postTask.getPersonId(), postTaskId);
//有前置任务已完成 //是前后置任务
if (taskStatus.getStatus() == 1) { if (!StringUtils.isEmpty(taskStatus)) {
if (!StringUtils.isEmpty(demandTask)) { //1.有前置任务已完成
String[] condition1 = demandTask.getCondition1().split("\\|"); if (taskStatus.getStatus() == 1) {
//任务条件为“70043” if (!StringUtils.isEmpty(demandTask)) {
if ("70043".equals(condition1[0])) { String[] condition1 = demandTask.getCondition1().split("\\|");
postTaskRecord.setPersonId(postTask.getPersonId()); //任务条件为“70043”
postTaskRecord.setPostTaskId(postTaskId); if ("70043".equals(condition1[0])) {
postTaskRecord.setPreTaskId(taskStatus.getTaskId()); postTaskRecord.setPersonId(postTask.getPersonId());
postTaskRecord.setStatus(taskStatus.getStatus()); postTaskRecord.setPostTaskId(postTaskId); //后置任务
boolean flag = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId()); postTaskRecord.setPreTaskId(taskStatus.getTaskId()); //前置任务
if (flag) { postTaskRecord.setStatus(taskStatus.getStatus());
postTaskRecord.setLevel(1); //前置任务已完成且是自己发布 boolean flag = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId());
} else { if (flag) {
postTaskRecord.setLevel(2); //前置任务已完成且不是自己发布 postTaskRecord.setLevel(1); //前置任务已完成且是自己发布
} else {
postTaskRecord.setLevel(2); //前置任务已完成且不是自己发布
}
return postTaskRecord;
}
}
}
}
//2.任务自动触发的情况
if (!StringUtils.isEmpty(demandTask)) {
//任务是自动触发
if (demandTask.getIsAuto() == 1) {
//判断是否达到阈值
boolean flag = checkThresholdNoSwitch(demandTask, current);
if (flag) {
//任务已解锁或者无需解锁
if (demandTask.getClueSwitch() != 1) {
String[] condition1 = demandTask.getCondition1().split("\\|");
PostTaskRecordDto postTaskRecordCopy = new PostTaskRecordDto();
postTaskRecordCopy.setPersonId(postTask.getPersonId());
postTaskRecordCopy.setPostTaskId(postTaskId); //后置任务
postTaskRecordCopy.setPreTaskId(taskStatus.getTaskId()); //前置任务
postTaskRecordCopy.setStatus(taskStatus.getStatus());
//任务是否为71000自动完成
if ("71000".equals(condition1[0])) {
postTaskRecordCopy.setLevel(3); //任务为自动触发完成
} else {
//任务为本人发布
boolean selfSign = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId());
if (!selfSign) {
postTaskRecordCopy.setLevel(4); //任务为自动发布
} else {
postTaskRecordCopy.setLevel(5); //任务为本人发布
}
}
postTaskRecordList.add(postTaskRecordCopy);
} else { //主要任务(后置任务)还未解锁
//主要任务有配置前置任务
if (!StringUtils.isEmpty(demandTask.getPostTask())) {
String[] condition1 = demandTask.getCondition1().split("\\|");
PostTaskRecordDto postTaskRecordCopy = new PostTaskRecordDto();
postTaskRecordCopy.setPersonId(postTask.getPersonId());
postTaskRecordCopy.setPostTaskId(postTaskId); //后置任务
postTaskRecordCopy.setPreTaskId(taskStatus.getTaskId()); //前置任务
postTaskRecordCopy.setStatus(taskStatus.getStatus());
//任务是否为71000自动完成
if ("71000".equals(condition1[0])) {
postTaskRecordCopy.setLevel(3); //任务为自动触发完成
} else {
//任务为本人发布
boolean selfSign = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId());
if (!selfSign) {
postTaskRecordCopy.setLevel(4); //任务为自动发布
} else {
postTaskRecordCopy.setLevel(5); //任务为本人发布
}
}
postTaskRecordList.add(postTaskRecordCopy);
}
} }
return postTaskRecord;
} }
} }
} }
//前置任务为本人发布 //3.前置任务为本人发布
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
boolean flag = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId()); boolean flag = checkTaskSelf(uid, postTask.getPersonId(), demandTask.getClueId());
if (flag) { if (flag) {
PostTaskRecordDto postTaskRecordCopy = new PostTaskRecordDto(); PostTaskRecordDto postTaskRecordCopy = new PostTaskRecordDto();
postTaskRecordCopy.setPersonId(postTask.getPersonId()); postTaskRecordCopy.setPersonId(postTask.getPersonId());
postTaskRecordCopy.setPostTaskId(postTaskId); postTaskRecordCopy.setPostTaskId(postTaskId); //后置任务
postTaskRecordCopy.setPreTaskId(taskStatus.getTaskId()); postTaskRecordCopy.setPreTaskId(taskStatus.getTaskId()); //前置任务
postTaskRecordCopy.setStatus(taskStatus.getStatus()); postTaskRecordCopy.setStatus(taskStatus.getStatus());
postTaskRecordCopy.setLevel(3); //任务为本人发布 postTaskRecordCopy.setLevel(5); //任务为本人发布
postTaskRecordList.add(postTaskRecordCopy); postTaskRecordList.add(postTaskRecordCopy);
} }
} }
} }
} }
//找到优先级最高的任务
if (postTaskRecordList.size() != 0) { if (postTaskRecordList.size() != 0) {
return postTaskRecordList.get(0); int min = 5;
int index = 0;
for (int i = 0; i < postTaskRecordList.size(); i++) {
if (postTaskRecordList.get(i).getLevel() <= min) {
min = postTaskRecordList.get(i).getLevel();
index = i;
}
}
return postTaskRecordList.get(index);
} }
return null; return null;
} }
...@@ -955,7 +1323,8 @@ public class PlayerUtil { ...@@ -955,7 +1323,8 @@ public class PlayerUtil {
Integer subjectId = barrierTaskKey.getSubject(); Integer subjectId = barrierTaskKey.getSubject();
ClueDto clue = getClueById(uid, subjectId, clueId); ClueDto clue = getClueById(uid, subjectId, clueId);
if (!StringUtils.isEmpty(clue)) { if (!StringUtils.isEmpty(clue)) {
return clue.getClueTemplate() + "这条线索可能对你比较重要。"; String text = TimingAcquisition.clueMap.get(clueId).getClueTemplate();
return text + "这条线索可能对你比较重要。";
} }
} }
} }
...@@ -965,6 +1334,8 @@ public class PlayerUtil { ...@@ -965,6 +1334,8 @@ public class PlayerUtil {
/** /**
* 找到白名单内该人的任务中已解锁或无需解锁的任务对应的提示 * 找到白名单内该人的任务中已解锁或无需解锁的任务对应的提示
* @param uid
* @param person
*/ */
public static String getTipInChat(String uid, Person person) { public static String getTipInChat(String uid, Person person) {
List<DemandTaskDto> demandTaskList = person.getDemandTasks(); List<DemandTaskDto> demandTaskList = person.getDemandTasks();
...@@ -977,7 +1348,6 @@ public class PlayerUtil { ...@@ -977,7 +1348,6 @@ public class PlayerUtil {
Integer trustDegree = person.getTrustDegree(); Integer trustDegree = person.getTrustDegree();
//威慑度 //威慑度
Integer deterrenceDegree = person.getDeterrenceDegree(); Integer deterrenceDegree = person.getDeterrenceDegree();
String text = "";
for (DemandTaskDto demandTask : demandTaskList) { for (DemandTaskDto demandTask : demandTaskList) {
//判断这个任务是否在白名单内 //判断这个任务是否在白名单内
for (BarrierTaskKeyDto barrierTaskKey : barrierTaskKeyList) { for (BarrierTaskKeyDto barrierTaskKey : barrierTaskKeyList) {
...@@ -990,7 +1360,19 @@ public class PlayerUtil { ...@@ -990,7 +1360,19 @@ public class PlayerUtil {
//未完成 //未完成
if (taskStatus == 0) { if (taskStatus == 0) {
if (trustDegree >= demandTask.getTrustStart() || deterrenceDegree >= demandTask.getDeterrenceStart()) { if (trustDegree >= demandTask.getTrustStart() || deterrenceDegree >= demandTask.getDeterrenceStart()) {
return SpeechUtil.getTipSpeech(uid, demandTask, 0, 1); String text = SpeechUtil.getTipSpeech(uid, demandTask, 0, 1);
String[] condition1 = demandTask.getCondition1().split("\\|");
//排除自动触发、70043、71000和没有配置任务文本的情况
if (!StringUtils.isEmpty(text) && demandTask.getIsAuto() != 1 && !"70043".equals(condition1[0]) && !"71000".equals(condition1[0])) {
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(person.getId());
reply.setDemandTaskId(demandTask.getDemandTaskId());
reply.setType(2); //直接操作提醒
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
return text;
} }
} }
} else { //任务需要解锁,找到能解锁任务的线索 } else { //任务需要解锁,找到能解锁任务的线索
...@@ -1000,8 +1382,28 @@ public class PlayerUtil { ...@@ -1000,8 +1382,28 @@ public class PlayerUtil {
if (personIdList.contains(person.getId())) { if (personIdList.contains(person.getId())) {
ClueDto clue = getClueById(uid, person.getId(), demandTask.getClueId()); ClueDto clue = getClueById(uid, person.getId(), demandTask.getClueId());
if (!StringUtils.isEmpty(clue)) { if (!StringUtils.isEmpty(clue)) {
if (trustDegree >= clue.getTrustDegree() || deterrenceDegree >= clue.getThreaten()) { //该任务已解锁或无需解锁
return SpeechUtil.getTipSpeech(uid, demandTask, 0, 2); if (demandTask.getClueSwitch() != 1) {
//任务是否已经完成
int taskStatus = checkTaskStatus(uid, person.getId(), demandTask.getDemandTaskId());
//未完成
if (taskStatus == 0) {
if (trustDegree >= clue.getTrustDegree() || deterrenceDegree >= clue.getThreaten()) {
String text = SpeechUtil.getTipSpeech(uid, demandTask, 0, 2);
String[] condition1 = demandTask.getCondition1().split("\\|");
//排除自动触发、70043、71000和没有配置任务文本的情况
if (!StringUtils.isEmpty(text) && demandTask.getIsAuto() != 1 && !"70043".equals(condition1[0]) && !"71000".equals(condition1[0])) {
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(person.getId());
reply.setDemandTaskId(demandTask.getDemandTaskId());
reply.setType(4); //自身线索提示
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
return text;
}
}
} }
} }
} }
...@@ -1014,19 +1416,27 @@ public class PlayerUtil { ...@@ -1014,19 +1416,27 @@ public class PlayerUtil {
List<ClueDto> clueList = person.getClues(); List<ClueDto> clueList = person.getClues();
for (BarrierTaskKeyDto barrierTaskKey : barrierTaskKeyList) { for (BarrierTaskKeyDto barrierTaskKey : barrierTaskKeyList) {
List<Integer> clueIdList = getClueByTaskId(player.getPersonMap().get(barrierTaskKey.getSubject()), barrierTaskKey.getDemandTaskId()); List<Integer> clueIdList = getClueByTaskId(player.getPersonMap().get(barrierTaskKey.getSubject()), barrierTaskKey.getDemandTaskId());
DemandTaskDto demandTask = getDemandTaskInfo(uid, barrierTaskKey.getSubject(), barrierTaskKey.getDemandTaskId());
for (ClueDto clue : clueList) { for (ClueDto clue : clueList) {
if (clueIdList.contains(clue.getClueId()) && clue.getSubject() == barrierTaskKey.getSubject()) { //排除当前对话人的线索
if (clueIdList.contains(clue.getClueId()) && clue.getSubject() == barrierTaskKey.getSubject() && player.getPersonId() != clue.getSubject()) {
//任务是否已经完成 //任务是否已经完成
// int taskStatus = checkTaskStatus(uid, barrierTaskKey.getSubject(), barrierTaskKey.getDemandTaskId()); // int taskStatus = checkTaskStatus(uid, barrierTaskKey.getSubject(), barrierTaskKey.getDemandTaskId());
//任务是否已经解锁 //任务是否已经解锁
DemandTaskDto demandTask = getDemandTaskInfo(uid, barrierTaskKey.getSubject(), barrierTaskKey.getDemandTaskId());
//未解锁
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
//未完成 //未解锁
if (demandTask.getClueSwitch() == 1) { if (demandTask.getClueSwitch() != 1) {
if (trustDegree >= clue.getTrustDegree() || deterrenceDegree >= clue.getThreaten()) { if (trustDegree >= clue.getTrustDegree() || deterrenceDegree >= clue.getThreaten()) {
//----------------记录线索-------------- //----------------记录线索--------------
recordClue(uid, person.getId(), barrierTaskKey.getSubject(), clue.getType(), clue); recordClue(uid, person.getId(), barrierTaskKey.getSubject(), clue.getType(), clue);
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(barrierTaskKey.getSubject());
reply.setObjectId(person.getId());
reply.setDemandTaskId(demandTask.getDemandTaskId());
reply.setType(1); //闲聊
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
return SpeechUtil.getTipSpeech(uid, barrierTaskKey, person.getId()); return SpeechUtil.getTipSpeech(uid, barrierTaskKey, person.getId());
} }
} }
...@@ -1036,13 +1446,17 @@ public class PlayerUtil { ...@@ -1036,13 +1446,17 @@ public class PlayerUtil {
} }
} }
if (count > 0) { if (count > 0) {
return "我们走吧,这人暂时问不出更重要的消息了,去先找别人问问吧。"; //获取对应话术
return SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103201);
} }
return "算了吧,估计这个人问不出什么东西来。去问问其他人吧。"; return "算了吧,估计这个人问不出什么东西来。我们去问问其他人吧。";
} }
/** /**
* 通过线索id找到挂线索的人物 * 通过线索id找到挂线索的人物
* @param uid
* @param clueId
* @param subjectId
*/ */
public static List<Integer> getPersonIdByClueId(String uid, Integer clueId, Integer subjectId) { public static List<Integer> getPersonIdByClueId(String uid, Integer clueId, Integer subjectId) {
List<Integer> personIdList = new ArrayList<>(); List<Integer> personIdList = new ArrayList<>();
...@@ -1063,6 +1477,8 @@ public class PlayerUtil { ...@@ -1063,6 +1477,8 @@ public class PlayerUtil {
/** /**
* 找到NPC身上的某个任务对应的所有线索 * 找到NPC身上的某个任务对应的所有线索
* @param person
* @param demandTaskId
*/ */
public static List<Integer> getClueByTaskId(Person person, Integer demandTaskId) { public static List<Integer> getClueByTaskId(Person person, Integer demandTaskId) {
List<Integer> clueIdList = new ArrayList<>(); List<Integer> clueIdList = new ArrayList<>();
...@@ -1089,6 +1505,9 @@ public class PlayerUtil { ...@@ -1089,6 +1505,9 @@ public class PlayerUtil {
/** /**
* 更新玩家跟人物的见面次数 * 更新玩家跟人物的见面次数
* @param uid
* @param locationId
* @param personId
*/ */
public static void updateMeetTimes(String uid, String locationId, Integer personId) { public static void updateMeetTimes(String uid, String locationId, Integer personId) {
Map<Integer, Integer> personInfoMap = TimingAcquisition.playerMap.get(uid).getLocationMap().get(locationId).getPersonInfoMap(); Map<Integer, Integer> personInfoMap = TimingAcquisition.playerMap.get(uid).getLocationMap().get(locationId).getPersonInfoMap();
...@@ -1098,6 +1517,8 @@ public class PlayerUtil { ...@@ -1098,6 +1517,8 @@ public class PlayerUtil {
/** /**
* 扣除玩家的货币 * 扣除玩家的货币
* @param uid
* @param num
*/ */
public static void updateMoneyNum(String uid, int num) { public static void updateMoneyNum(String uid, int num) {
int money = TimingAcquisition.playerMap.get(uid).getCurrency().intValue(); int money = TimingAcquisition.playerMap.get(uid).getCurrency().intValue();
...@@ -1110,6 +1531,8 @@ public class PlayerUtil { ...@@ -1110,6 +1531,8 @@ public class PlayerUtil {
/** /**
* 增加玩家的货币 * 增加玩家的货币
* @param uid
* @param num
*/ */
public static void addMoneyNum(String uid, int num) { public static void addMoneyNum(String uid, int num) {
int money = TimingAcquisition.playerMap.get(uid).getCurrency().intValue(); int money = TimingAcquisition.playerMap.get(uid).getCurrency().intValue();
...@@ -1137,6 +1560,9 @@ public class PlayerUtil { ...@@ -1137,6 +1560,9 @@ public class PlayerUtil {
/** /**
* 过滤到已经完成任务对应的线索 * 过滤到已经完成任务对应的线索
* @param uid
* @param person
* @param clueList
*/ */
public static List<ClueDto> getUndoClueList(String uid, Person person, List<ClueDto> clueList) { public static List<ClueDto> getUndoClueList(String uid, Person person, List<ClueDto> clueList) {
List<ClueDto> result = new ArrayList<>(); List<ClueDto> result = new ArrayList<>();
...@@ -1152,4 +1578,140 @@ public class PlayerUtil { ...@@ -1152,4 +1578,140 @@ public class PlayerUtil {
} }
return result; return result;
} }
/**
* 取出询问操作的方法编号对应的线索序号
*/
public static int getNumByMethodId(String uid, String methodId, int size) {
Map<String, Integer> askAndNumMap = TimingAcquisition.playerMap.get(uid).getAskAndNumMap();
int result = 0;
//还没有对用询问操作方法编号的序号
if (StringUtils.isEmpty(askAndNumMap.get(methodId))) {
askAndNumMap.put(methodId, 0);
} else {
result = askAndNumMap.get(methodId);
if (result >= size - 1) {
result = 0;
} else {
result += 1;
}
askAndNumMap.put(methodId, result);
}
return result;
}
/**
* 更新声望值
* @param player
* @param num
*/
public static void updateReputation(Player player, int num) {
//声望值
int fame = player.getReputation();
int result = fame + num;
if (result <= 0) {
player.setReputation(0);
} else {
player.setReputation(result);
}
}
/**
* 任务完成,数据更新
* @param uid
* @param subjectId
* @param demandTaskId
*/
public static void taskFinished(String uid, Integer subjectId, Integer demandTaskId) {
Player player = TimingAcquisition.playerMap.get(uid);
//已完成任务
Map<Integer, Integer> map = player.getTaskMap().get(subjectId);
DemandTaskDto demandTask = getDemandTaskInfo(uid, subjectId, demandTaskId);
//3.信任阈值提升
if (!StringUtils.isEmpty(demandTask)) {
int num = 0;
if (!StringUtils.isEmpty(map.get(demandTaskId))) {
num = map.get(demandTaskId);
}
//前置任务完成
map.put(demandTaskId, num + 1);
//更新威慑度
addThreshold(player.getPersonMap().get(subjectId), demandTask);
String condition2 = demandTask.getCondition2();
if (!StringUtils.isEmpty(condition2)) {
int value = Integer.parseInt(condition2);
//扣除货币
if (value > 0) {
updateMoneyNum(uid, value);
}
}
String completionReward = demandTask.getCompletionReward();
//发放奖励
if (!StringUtils.isEmpty(completionReward)) {
int reward = Integer.parseInt(completionReward);
addMoneyNum(uid, reward);
}
}
}
/**
* 自动触发的任务自动完成
* @param uid
* @param person
* @param clue
*/
public static String taskAutoFinish(String uid, Person person, ClueDto clue) {
String result = "";
String taskText = "";
if (!StringUtils.isEmpty(clue)) {
//线索类型为任务线索
if (clue.getType() == 6) {
Person subject = TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getSubject());
DemandTaskDto demandTaskDto = PlayerUtil.getDemandTaskByClueId(subject, clue);
Integer subjectId = person.getId();
if (!StringUtils.isEmpty(demandTaskDto)) {
//判断任务是否已经完成
int isFinished = PlayerUtil.checkTaskStatus(uid, subjectId, demandTaskDto.getDemandTaskId());
//未完成
if (isFinished == 0) {
if (demandTaskDto.getIsAuto() == 1) {
String condition1 = demandTaskDto.getCondition1();
String[] taskIdTimes = condition1.split("\\|");
//自动完成
if ("71000".equals(taskIdTimes[0])) {
//达到阈值
boolean flag = checkThreshold(demandTaskDto, subject);
if (flag) {
Integer preTaskId = demandTaskDto.getDemandTaskId(); //后置
DemandTaskDto demandTaskPre = getDemandTaskInfo(uid, subjectId, preTaskId);
//找到后置任务
if (!StringUtils.isEmpty(demandTaskPre)) {
//后置任务自动完成
taskFinished(uid, subjectId, preTaskId);
String preText = SpeechUtil.getSuccessTaskSpeech(uid, person, demandTaskPre);
//有配置前置任务
if (!StringUtils.isEmpty(demandTaskDto.getPostTask())) {
Integer postTaskId = Integer.valueOf(demandTaskDto.getPostTask());; //前置
//后置任务的主体
Integer objectId = demandTaskPre.getObject();
DemandTaskDto demandTaskPost = getDemandTaskInfo(uid, objectId, postTaskId);
if (!StringUtils.isEmpty(demandTaskPost)) {
//前置任务自动完成
taskFinished(uid, objectId, postTaskId);
String postText = SpeechUtil.getSuccessTaskSpeech(uid, person, demandTaskPost);
taskText += postText;
}
}
taskText += preText;
}
}
}
}
}
}
}
result = result + taskText;
}
return result;
}
} }
...@@ -2,9 +2,12 @@ package com.qiwu.inference.common.utils; ...@@ -2,9 +2,12 @@ package com.qiwu.inference.common.utils;
import cn.hutool.poi.excel.ExcelReader; import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil; import cn.hutool.poi.excel.ExcelUtil;
import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.dto.*; import com.qiwu.inference.dto.*;
import com.qiwu.inference.pojo.*; import com.qiwu.inference.pojo.*;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import java.io.File; import java.io.File;
...@@ -12,7 +15,13 @@ import java.util.*; ...@@ -12,7 +15,13 @@ import java.util.*;
import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors; import java.util.stream.Collectors;
@Component
public class SpeechUtil { public class SpeechUtil {
public static String expireTime;
@Value("${expireTime}")
public void setExpireTime(String expireTime) {
SpeechUtil.expireTime = expireTime;
}
/** /**
* 取指定范围内的随机数 * 取指定范围内的随机数
* @param num1 * @param num1
...@@ -279,13 +288,14 @@ public class SpeechUtil { ...@@ -279,13 +288,14 @@ public class SpeechUtil {
ExcelReader reader = ExcelUtil.getReader(new File(chatPath)); ExcelReader reader = ExcelUtil.getReader(new File(chatPath));
reader.addHeaderAlias("意图反馈", "methodId"); reader.addHeaderAlias("意图反馈", "methodId");
reader.addHeaderAlias("身份", "identity"); reader.addHeaderAlias("身份", "identity");
reader.addHeaderAlias("人物ID", "personId"); reader.addHeaderAlias("人物名称", "personName");
reader.addHeaderAlias("性别", "gender"); reader.addHeaderAlias("性别", "gender");
reader.addHeaderAlias("年龄段", "age"); reader.addHeaderAlias("年龄段", "age");
reader.addHeaderAlias("性格A", "dispositionIds"); reader.addHeaderAlias("性格A", "dispositionIds");
reader.addHeaderAlias("行为", "behaviour"); reader.addHeaderAlias("行为", "behaviour");
reader.addHeaderAlias("任务状态", "taskStatus"); reader.addHeaderAlias("任务状态", "taskStatus");
reader.addHeaderAlias("关系", "degree"); reader.addHeaderAlias("信任值", "trust");
reader.addHeaderAlias("威慑度", "deterrence");
reader.addHeaderAlias("文本内容", "answer"); reader.addHeaderAlias("文本内容", "answer");
reader.addHeaderAlias("通用标签", "flag"); reader.addHeaderAlias("通用标签", "flag");
List<ChatSpeech> chatList = reader.readAll(ChatSpeech.class); List<ChatSpeech> chatList = reader.readAll(ChatSpeech.class);
...@@ -355,6 +365,7 @@ public class SpeechUtil { ...@@ -355,6 +365,7 @@ public class SpeechUtil {
reader.addHeaderAlias("进行中任务完成提醒", "doingFinishedAnswer"); reader.addHeaderAlias("进行中任务完成提醒", "doingFinishedAnswer");
reader.addHeaderAlias("未进行中任务完成提醒", "noDoingFinishedAnswer"); reader.addHeaderAlias("未进行中任务完成提醒", "noDoingFinishedAnswer");
reader.addHeaderAlias("完成对话文本", "answer"); reader.addHeaderAlias("完成对话文本", "answer");
reader.addHeaderAlias("任务操作提醒文本", "replyAnswer");
reader.addHeaderAlias("通用标签", "flag"); reader.addHeaderAlias("通用标签", "flag");
List<TaskSpeech> taskSpeechList = reader.readAll(TaskSpeech.class); List<TaskSpeech> taskSpeechList = reader.readAll(TaskSpeech.class);
reader.close(); reader.close();
...@@ -423,6 +434,58 @@ public class SpeechUtil { ...@@ -423,6 +434,58 @@ public class SpeechUtil {
} }
/** /**
* 加载操作提示的话术
*/
public static Map<Integer, OperateSpeech> getOperateSpeechModel(String speechFilePath) {
String operateSpeechPath = speechFilePath + "operate.xlsx";
ExcelReader reader = ExcelUtil.getReader(new File(operateSpeechPath));
reader.addHeaderAlias("ID", "id");
reader.addHeaderAlias("操作提示文本", "answer");
List<OperateSpeech> operateSpeechList = reader.readAll(OperateSpeech.class);
reader.close();
Map<Integer, OperateSpeech> operateSpeechMap = new ConcurrentHashMap<>();
for (OperateSpeech operateSpeech : operateSpeechList) {
operateSpeechMap.put(operateSpeech.getId(), operateSpeech);
}
return operateSpeechMap;
}
/**
* 加载任务成功的话术
*/
public static Map<Integer, List<PreReasonSpeech>> getPreReasonSpeechModel(String speechFilePath) {
String preReasonSpeechPath = speechFilePath + "pre_reason.xlsx";
ExcelReader reader = ExcelUtil.getReader(new File(preReasonSpeechPath));
reader.addHeaderAlias("任务ID", "demandTaskId");
reader.addHeaderAlias("线索ID", "clueId");
reader.addHeaderAlias("任务名称", "taskName");
reader.addHeaderAlias("自身身份", "identity");
reader.addHeaderAlias("对方身份", "identitySide");
reader.addHeaderAlias("性别", "gender");
reader.addHeaderAlias("人物名称", "personName");
reader.addHeaderAlias("年龄段", "age");
reader.addHeaderAlias("性格A", "dispositionIds");
reader.addHeaderAlias("关系", "relation");
reader.addHeaderAlias("行为", "behaviour");
reader.addHeaderAlias("第三方描述", "answer");
reader.addHeaderAlias("自身描述", "answerSelf");
reader.addHeaderAlias("通用标签", "flag");
List<PreReasonSpeech> preReasonSpeechList = reader.readAll(PreReasonSpeech.class);
reader.close();
Map<Integer, List<PreReasonSpeech>> preReasonSpeechMap = new ConcurrentHashMap<>();
for (PreReasonSpeech preReasonSpeech : preReasonSpeechList) {
if (StringUtils.isEmpty(preReasonSpeechMap.get(preReasonSpeech.getClueId()))) {
List<PreReasonSpeech> preReasonSpeeches = new ArrayList<>();
preReasonSpeeches.add(preReasonSpeech);
preReasonSpeechMap.put(preReasonSpeech.getClueId(), preReasonSpeeches);
} else {
preReasonSpeechMap.get(preReasonSpeech.getClueId()).add(preReasonSpeech);
}
}
return preReasonSpeechMap;
}
/**
* 获取闲聊的话术 * 获取闲聊的话术
* @param uid * @param uid
* @param person * @param person
...@@ -452,6 +515,14 @@ public class SpeechUtil { ...@@ -452,6 +515,14 @@ public class SpeechUtil {
continue; continue;
} }
} }
//符合人物名称
if (!StringUtils.isEmpty(chatSpeech.getPersonName())) {
if (person.getName().equals(chatSpeech.getPersonName())) {
count++;
} else {
continue;
}
}
//符合性别 //符合性别
if (!StringUtils.isEmpty(chatSpeech.getGender())) { if (!StringUtils.isEmpty(chatSpeech.getGender())) {
if (gender.equals(chatSpeech.getGender())) { if (gender.equals(chatSpeech.getGender())) {
...@@ -483,6 +554,24 @@ public class SpeechUtil { ...@@ -483,6 +554,24 @@ public class SpeechUtil {
continue; continue;
} }
} }
//符合信任值
if (!StringUtils.isEmpty(chatSpeech.getTrust())) {
String[] trustRange = chatSpeech.getTrust().split("\\|");
if(NumberUtil.inNumRange(person.getTrustDegree(),"["+trustRange[0]+","+trustRange[1]+"]")) {
count++;
} else {
continue;
}
}
//符合威慑度
if (!StringUtils.isEmpty(chatSpeech.getDeterrence())) {
String[] deterrenceRange = chatSpeech.getDeterrence().split("\\|");
if(NumberUtil.inNumRange(person.getDeterrenceDegree(),"["+deterrenceRange[0]+","+deterrenceRange[1]+"]")) {
count++;
} else {
continue;
}
}
countMap.put(i, count); countMap.put(i, count);
} }
int max = 0; int max = 0;
...@@ -514,12 +603,162 @@ public class SpeechUtil { ...@@ -514,12 +603,162 @@ public class SpeechUtil {
text = chatList.get(num).getAnswer(); text = chatList.get(num).getAnswer();
} }
} else { } else {
List<Integer> indexList = new ArrayList<>();
for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {
if (max == entry.getValue()) {
indexList.add(entry.getKey());
}
}
int random = getRandomNum(0, indexList.size());
index = indexList.get(random);
//获取对应话术 //获取对应话术
text = chatList.get(index).getAnswer(); text = chatList.get(index).getAnswer();
} }
text = text.replace("\n", "");
String[] result = text.split("\\|");
// int i = getRandomNum(0, result.length);
int i = PlayerUtil.getNumByMethodId(uid, methodId, result.length);
text = result[i];
//操作为9001的模糊闲聊操作,则提示相应的线索
if ("9001".equals(methodId)) {
//线索提示文本
ClueDto clue = getClueTextByTypeLevel(uid, person, text);
// while (StringUtils.isEmpty(clue)) {
// int random = getRandomNum(0, result.length);
// text = result[random];
// clue = getClueTextByTypeLevel(person, text);
// }
if (StringUtils.isEmpty(clue)) {
String textCopy = null;
for (String s : result) {
textCopy = s;
clue = getClueTextByTypeLevel(uid, person, textCopy);
if (!StringUtils.isEmpty(clue)) {
text = textCopy;
break;
}
}
}
String taskText = "";
String addText = "";
if (!StringUtils.isEmpty(clue)) {
// if (clue.getType() == 6) {
// DemandTaskDto demandTaskDto = PlayerUtil.getDemandTaskByClueId(person, clue);
// ClueDto preClue = PlayerUtil.getPreClueById(person, demandTaskDto);
// //获取对应话术
// if (!StringUtils.isEmpty(preClue) && !StringUtils.isEmpty(demandTaskDto)) {
// preText = SpeechUtil.getPreReasonSpeech(uid, person, preClue, demandTaskDto.getDemandTaskId());
// if (!StringUtils.isEmpty(preText)) {
// preText = SpeechUtil.addHeader(preText, person.getName());
// }
// }
// }
//找到了对应的线索
addText = getSuccessClueSpeech(uid, person, clue);
Integer currentId = TimingAcquisition.playerMap.get(uid).getPersonId();
// String currentName = TimingAcquisition.getNameByPersonId(uid, currentId);
// if (currentId.equals(clue.getSubject()) || currentId.equals(clue.getObject())) {
// addText = addText.replace("【" + currentName + "@正常" + "】", "【人物名称@正常】");
// addText = addText.replace("据说", "").replace("听说", "").replace(currentName, "我");
// addText = replaceHeader(addText, currentName);
// }
if (clue.getType() == 6) {
//自身的任务线索
if (currentId.equals(clue.getSubject())) {
//----------------是否解锁任务-------------
PlayerUtil.unlockTask(uid, person, clue);
Person subject = TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getSubject());
DemandTaskDto demandTaskDto = PlayerUtil.getDemandTaskByClueId(subject, clue);
Integer subjectId = person.getId();
if (!StringUtils.isEmpty(demandTaskDto)) {
//判断后置任务是否已经完成
int isFinished = PlayerUtil.checkTaskStatus(uid, subjectId, demandTaskDto.getDemandTaskId());
//未完成
if (isFinished == 0) {
if (demandTaskDto.getIsAuto() == 1) {
String condition1 = demandTaskDto.getCondition1();
String[] taskIdTimes = condition1.split("\\|");
if ("71000".equals(taskIdTimes[0])) {
Integer preTaskId = demandTaskDto.getDemandTaskId(); //后置
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, subjectId, preTaskId);
//找到前置任务
if (!StringUtils.isEmpty(demandTaskPre)) {
//后置任务自动完成
PlayerUtil.taskFinished(uid, subjectId, preTaskId);
String preText = SpeechUtil.getSuccessTaskSpeech(uid, person, demandTaskPre);
//有配置前置任务
if (!StringUtils.isEmpty(demandTaskDto.getPostTask())) {
Integer postTaskId = Integer.valueOf(demandTaskDto.getPostTask());; //前置
//后置任务的主体
Integer objectId = demandTaskPre.getObject();
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, objectId, postTaskId);
if (!StringUtils.isEmpty(demandTaskPost)) {
//前置任务自动完成
PlayerUtil.taskFinished(uid, objectId, postTaskId);
String postText = SpeechUtil.getSuccessTaskSpeech(uid, person, demandTaskPost);
taskText += postText;
}
}
taskText += preText;
}
}
}
}
}
}
}
addText = addText + taskText;
}
if (text.contains("<")) {
int start = text.indexOf("<");
text = text.substring(0, start);
}
text += addText;
}
return text; return text;
} }
/**
* 根据话术里的线索类型和层级过滤
*/
public static ClueDto getClueTextByTypeLevel(String uid, Person person, String text) {
//话术中没有配置需要返回线索提示
if (!text.contains("<")) {
return null;
}
//配置了需要返回线索提示
int start = text.indexOf("<");
int end = text.indexOf(">");
String typeLevel = text.substring(start + 1, end);
String[] typeAndLevel = typeLevel.split("&");
int type = Integer.parseInt(typeAndLevel[0]);
int level = Integer.parseInt(typeAndLevel[1]);
List<ClueDto> clueList = PlayerUtil.getCluesByType(person, type, level);
//过滤掉已经完成的任务对应的线索
clueList = PlayerUtil.getUndoClueList(uid, person, clueList);
Integer currentId = TimingAcquisition.playerMap.get(uid).getPersonId();
List<ClueDto> clueCopyList = new ArrayList<>();
for (ClueDto clue : clueList) {
//过滤掉自身线索
if (!currentId.equals(clue.getSubject())) {
if (!StringUtils.isEmpty(clue.getObject())) {
if (!currentId.equals(clue.getObject())) {
clueCopyList.add(clue);
}
} else {
clueCopyList.add(clue);
}
}
}
//没有找到对应的线索
if (clueCopyList.size() == 0) {
return null;
}
int index = RandomUtil.randomInt(clueCopyList.size());
//找到了对应的线索
return clueCopyList.get(index);
}
/** /**
* 获取线索成功的话术 * 获取线索成功的话术
...@@ -533,6 +772,7 @@ public class SpeechUtil { ...@@ -533,6 +772,7 @@ public class SpeechUtil {
Map<Integer, List<ClueSpeech>> successClueSpeechMap = TimingAcquisition.successClueSpeechMap; Map<Integer, List<ClueSpeech>> successClueSpeechMap = TimingAcquisition.successClueSpeechMap;
List<ClueSpeech> clueSpeechList = successClueSpeechMap.get(clue.getClueId()); List<ClueSpeech> clueSpeechList = successClueSpeechMap.get(clue.getClueId());
String gender = person.getGender() == 1 ? "男" : "女"; String gender = person.getGender() == 1 ? "男" : "女";
String currentName = TimingAcquisition.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
for (int i = 1; i < clueSpeechList.size(); i++) { for (int i = 1; i < clueSpeechList.size(); i++) {
ClueSpeech clueSpeech = clueSpeechList.get(i); ClueSpeech clueSpeech = clueSpeechList.get(i);
int count = 0; int count = 0;
...@@ -590,6 +830,7 @@ public class SpeechUtil { ...@@ -590,6 +830,7 @@ public class SpeechUtil {
//获取对应话术 //获取对应话术
if (!person.getId().equals(clue.getSubject())) { if (!person.getId().equals(clue.getSubject())) {
text = clueSpeechList.get(0).getAnswer(); text = clueSpeechList.get(0).getAnswer();
text = SpeechUtil.addHeader(text, currentName);
} else { } else {
text = clueSpeechList.get(0).getAnswerSelf(); text = clueSpeechList.get(0).getAnswerSelf();
} }
...@@ -597,6 +838,7 @@ public class SpeechUtil { ...@@ -597,6 +838,7 @@ public class SpeechUtil {
//获取对应话术 //获取对应话术
if (!person.getId().equals(clue.getSubject())) { if (!person.getId().equals(clue.getSubject())) {
text = clueSpeechList.get(index).getAnswer(); text = clueSpeechList.get(index).getAnswer();
text = SpeechUtil.addHeader(text, currentName);
} else { } else {
text = clueSpeechList.get(index).getAnswerSelf(); text = clueSpeechList.get(index).getAnswerSelf();
} }
...@@ -618,43 +860,47 @@ public class SpeechUtil { ...@@ -618,43 +860,47 @@ public class SpeechUtil {
if (text.contains("B")) { if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, clue.getObject())); text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
} }
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
text = text.replace("\n", "");
return text; return text;
} }
/** /**
* 获取任务成功的话术 * 获取线索成功的话术
* @param uid * @param uid
* @param person * @param person
* @param demandTask * @param clue
*/ */
public static String getSuccessTaskSpeech(String uid, Person person, DemandTaskDto demandTask) { public static String getSuccessClueOtherSpeech(String uid, Person person, ClueDto clue) {
String text = ""; String text = "";
Map<Integer, Integer> countMap = new HashMap<>(); Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<TaskSpeech>> successTaskSpeechMap = TimingAcquisition.successTaskSpeechMap; Map<Integer, List<ClueSpeech>> successClueSpeechMap = TimingAcquisition.successClueSpeechMap;
List<TaskSpeech> taskSpeechList = successTaskSpeechMap.get(demandTask.getDemandTaskId()); List<ClueSpeech> clueSpeechList = successClueSpeechMap.get(clue.getClueId());
String gender = person.getGender() == 1 ? "男" : "女"; String gender = person.getGender() == 1 ? "男" : "女";
for (int i = 1; i < taskSpeechList.size(); i++) { for (int i = 1; i < clueSpeechList.size(); i++) {
TaskSpeech taskSpeech = taskSpeechList.get(i); ClueSpeech clueSpeech = clueSpeechList.get(i);
int count = 0; int count = 0;
//符合身份 //符合身份
if (!StringUtils.isEmpty(taskSpeech.getIdentity())) { if (!StringUtils.isEmpty(clueSpeech.getIdentity())) {
if (person.getIdentityName().equals(taskSpeech.getIdentity())) { if (person.getIdentityName().equals(clueSpeech.getIdentity())) {
count++; count++;
} else { } else {
continue; continue;
} }
} }
//符合性别 //符合性别
if (!StringUtils.isEmpty(taskSpeech.getGender())) { if (!StringUtils.isEmpty(clueSpeech.getGender())) {
if (gender.equals(taskSpeech.getGender())) { if (gender.equals(clueSpeech.getGender())) {
count++; count++;
} else { } else {
continue; continue;
} }
} }
//符合年龄 //符合年龄
if (!StringUtils.isEmpty(taskSpeech.getAge())) { if (!StringUtils.isEmpty(clueSpeech.getAge())) {
String[] ageRange = taskSpeech.getAge().split("\\|"); String[] ageRange = clueSpeech.getAge().split("\\|");
if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) { if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) {
count++; count++;
} else { } else {
...@@ -662,8 +908,8 @@ public class SpeechUtil { ...@@ -662,8 +908,8 @@ public class SpeechUtil {
} }
} }
//符合性格 //符合性格
if (!StringUtils.isEmpty(taskSpeech.getDispositionIds())) { if (!StringUtils.isEmpty(clueSpeech.getDispositionIds())) {
String[] dispositionIds = taskSpeech.getDispositionIds().split("\\|"); String[] dispositionIds = clueSpeech.getDispositionIds().split("\\|");
//话术的性格要求 //话术的性格要求
List<Integer> dispositionIdList = Arrays.stream(dispositionIds).map(Integer::new).collect(Collectors.toList()); List<Integer> dispositionIdList = Arrays.stream(dispositionIds).map(Integer::new).collect(Collectors.toList());
//对话人的性格要求 //对话人的性格要求
...@@ -688,66 +934,157 @@ public class SpeechUtil { ...@@ -688,66 +934,157 @@ public class SpeechUtil {
} }
if (max == 0) { if (max == 0) {
//获取对应话术 //获取对应话术
text = taskSpeechList.get(0).getAnswer(); text = clueSpeechList.get(0).getAnswer();
} else { } else {
//获取对应话术 //获取对应话术
text = taskSpeechList.get(index).getAnswer(); text = clueSpeechList.get(index).getAnswer();
} }
//话术中配置数据替换 //话术中配置数据替换
if (text.contains("【A】")) { if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject())); text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
} }
if (text.contains("【B】")) { if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject())); text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
} }
if (text.contains("【第三人称】")) { if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她"; String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call); text = text.replace("【第三人称】", call);
} }
if (text.contains("【条件2】")) { if (text.contains("A")) {
if (!StringUtils.isEmpty(demandTask.getCondition2())) { text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
text = text.replace("【条件2】", demandTask.getCondition2());
}
} }
if (text.contains("【奖励】")) { if (text.contains("B")) {
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) { text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
if (!"0".equals(demandTask.getCompletionReward())) { }
PlayerUtil.addMoneyNum(uid, Integer.parseInt(demandTask.getCompletionReward())); String[] result = text.split("\\|");
text = text.replace("【奖励】", demandTask.getCompletionReward()); Integer i = getRandomNum(0, result.length);
text = result[i];
text = text.replace("\n", "");
return text;
}
/**
* 获取线索成功的话术
* @param uid
* @param person
* @param clue
*/
public static String getClueWithPreSpeech(String uid, Person person, ClueDto clue) {
String text = "";
Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<ClueSpeech>> successClueSpeechMap = TimingAcquisition.successClueSpeechMap;
List<ClueSpeech> clueSpeechList = successClueSpeechMap.get(clue.getClueId());
String gender = person.getGender() == 1 ? "男" : "女";
String currentName = TimingAcquisition.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
for (int i = 1; i < clueSpeechList.size(); i++) {
ClueSpeech clueSpeech = clueSpeechList.get(i);
int count = 0;
//符合身份
if (!StringUtils.isEmpty(clueSpeech.getIdentity())) {
if (person.getIdentityName().equals(clueSpeech.getIdentity())) {
count++;
} else {
continue;
}
}
//符合性别
if (!StringUtils.isEmpty(clueSpeech.getGender())) {
if (gender.equals(clueSpeech.getGender())) {
count++;
} else {
continue;
}
}
//符合年龄
if (!StringUtils.isEmpty(clueSpeech.getAge())) {
String[] ageRange = clueSpeech.getAge().split("\\|");
if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) {
count++;
} else {
continue;
}
}
//符合性格
if (!StringUtils.isEmpty(clueSpeech.getDispositionIds())) {
String[] dispositionIds = clueSpeech.getDispositionIds().split("\\|");
//话术的性格要求
List<Integer> dispositionIdList = Arrays.stream(dispositionIds).map(Integer::new).collect(Collectors.toList());
//对话人的性格要求
List<Integer> dispositionPerson = person.getDispositions().stream().map(DispositionDto::getDispositionId).collect(Collectors.toList());
//所有性格都符合
if (PlayerUtil.checkSubset(dispositionIdList, dispositionPerson)) {
count++;
} else {
continue;
} }
} }
countMap.put(i, count);
}
int max = 0;
int index = 0;
//找到命中次数最多的索引
for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {
if (entry.getValue() > max) {
max = entry.getValue();
index = entry.getKey();
}
}
if (max == 0) {
//获取对应话术
if (!person.getId().equals(clue.getSubject())) {
text = clueSpeechList.get(0).getAnswer();
text = SpeechUtil.addHeader(text, currentName);
} else {
text = clueSpeechList.get(0).getAnswerSelf();
}
} else {
//获取对应话术
if (!person.getId().equals(clue.getSubject())) {
text = clueSpeechList.get(index).getAnswer();
text = SpeechUtil.addHeader(text, currentName);
} else {
text = clueSpeechList.get(index).getAnswerSelf();
}
}
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
}
if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call);
} }
if (text.contains("A")) { if (text.contains("A")) {
text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject())); text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
} }
if (text.contains("B")) { if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject())); text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
} }
//补充信任值和威慑度增减的回复 String[] result = text.split("\\|");
String addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。"; Integer i = getRandomNum(0, result.length);
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree()), String.valueOf(person.getDeterrenceDegree())); text = result[i];
// if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
// if (!"0".equals(demandTask.getCompletionReward())) {
// addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
// }
// }
text += addText;
text = text.replace("\n", ""); text = text.replace("\n", "");
return text; return text;
} }
/** /**
* 获取前后置任务成功的话术 * 获取任务成功的话术
* @param uid * @param uid
* @param person * @param person
* @param demandTask * @param demandTask
*/ */
public static String getPreSuccessTaskSpeech(String uid, Person person, DemandTaskDto demandTask, int level) { public static String getSuccessTaskSpeech(String uid, Person person, DemandTaskDto demandTask) {
String text = ""; String text = "";
Map<Integer, Integer> countMap = new HashMap<>(); Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<TaskSpeech>> successTaskSpeechMap = TimingAcquisition.successTaskSpeechMap; Map<Integer, List<TaskSpeech>> successTaskSpeechMap = TimingAcquisition.successTaskSpeechMap;
List<TaskSpeech> taskSpeechList = successTaskSpeechMap.get(demandTask.getDemandTaskId()); List<TaskSpeech> taskSpeechList = successTaskSpeechMap.get(demandTask.getDemandTaskId());
String gender = person.getGender() == 1 ? "男" : "女"; String gender = person.getGender() == 1 ? "男" : "女";
if (StringUtils.isEmpty(taskSpeechList)) {
return text;
}
for (int i = 1; i < taskSpeechList.size(); i++) { for (int i = 1; i < taskSpeechList.size(); i++) {
TaskSpeech taskSpeech = taskSpeechList.get(i); TaskSpeech taskSpeech = taskSpeechList.get(i);
int count = 0; int count = 0;
...@@ -801,51 +1138,13 @@ public class SpeechUtil { ...@@ -801,51 +1138,13 @@ public class SpeechUtil {
index = entry.getKey(); index = entry.getKey();
} }
} }
String addText = "";
if (max == 0) { if (max == 0) {
//获取对应话术 //获取对应话术
if (level == 1) { text = taskSpeechList.get(0).getAnswer();
text = taskSpeechList.get(0).getDoingFinishedAnswer();
text += taskSpeechList.get(0).getAnswer();
}
if (level == 2) {
text = taskSpeechList.get(0).getNoDoingFinishedAnswer();
text += taskSpeechList.get(0).getAnswer();
}
if (level == 3) {
text = taskSpeechList.get(0).getDoingAsk();
}
} else { } else {
//获取对应话术 //获取对应话术
if (level == 1) { text = taskSpeechList.get(index).getAnswer();
text = taskSpeechList.get(index).getDoingFinishedAnswer();
text += taskSpeechList.get(index).getAnswer();
//补充信任值和威慑度增减的回复
addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。";
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree()), String.valueOf(person.getDeterrenceDegree()));
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
}
}
}
if (level == 2) {
text = taskSpeechList.get(index).getNoDoingFinishedAnswer();
text += taskSpeechList.get(index).getAnswer();
//补充信任值和威慑度增减的回复
addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。";
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree()), String.valueOf(person.getDeterrenceDegree()));
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
}
}
}
if (level == 3) {
text = taskSpeechList.get(index).getDoingAsk();
}
} }
text = addHeader(text, person.getName());
//话术中配置数据替换 //话术中配置数据替换
if (text.contains("【A】")) { if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject())); text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
...@@ -857,9 +1156,9 @@ public class SpeechUtil { ...@@ -857,9 +1156,9 @@ public class SpeechUtil {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她"; String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call); text = text.replace("【第三人称】", call);
} }
if (text.contains("【条件2】")) { if (text.contains("【消费货币】")) {
if (!StringUtils.isEmpty(demandTask.getCondition2())) { if (!StringUtils.isEmpty(demandTask.getCondition2())) {
text = text.replace("【条件2】", demandTask.getCondition2()); text = text.replace("【消费货币】", demandTask.getCondition2());
} }
} }
if (text.contains("【奖励】")) { if (text.contains("【奖励】")) {
...@@ -876,8 +1175,300 @@ public class SpeechUtil { ...@@ -876,8 +1175,300 @@ public class SpeechUtil {
if (text.contains("B")) { if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject())); text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
} }
text += addText; //补充信任值和威慑度增减的回复
text = text.replace("\n", ""); String addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。";
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree() - 50), String.valueOf(person.getDeterrenceDegree() - 50));
// if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
// if (!"0".equals(demandTask.getCompletionReward())) {
// addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
// }
// }
text += addText;
text = text.replace("\n", "");
return text;
}
/**
* 获取任务二次回复的话术
* @param uid
* @param person
* @param demandTask
*/
public static String getSuccessTaskReplySpeech(String uid, Person person, DemandTaskDto demandTask, ReplyDto reply) {
String text = "";
Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<TaskSpeech>> successTaskSpeechMap = TimingAcquisition.successTaskSpeechMap;
List<TaskSpeech> taskSpeechList = successTaskSpeechMap.get(demandTask.getDemandTaskId());
String gender = person.getGender() == 1 ? "男" : "女";
if (StringUtils.isEmpty(taskSpeechList)) {
return text;
}
for (int i = 1; i < taskSpeechList.size(); i++) {
TaskSpeech taskSpeech = taskSpeechList.get(i);
int count = 0;
//符合身份
if (!StringUtils.isEmpty(taskSpeech.getIdentity())) {
if (person.getIdentityName().equals(taskSpeech.getIdentity())) {
count++;
} else {
continue;
}
}
//符合性别
if (!StringUtils.isEmpty(taskSpeech.getGender())) {
if (gender.equals(taskSpeech.getGender())) {
count++;
} else {
continue;
}
}
//符合年龄
if (!StringUtils.isEmpty(taskSpeech.getAge())) {
String[] ageRange = taskSpeech.getAge().split("\\|");
if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) {
count++;
} else {
continue;
}
}
//符合性格
if (!StringUtils.isEmpty(taskSpeech.getDispositionIds())) {
String[] dispositionIds = taskSpeech.getDispositionIds().split("\\|");
//话术的性格要求
List<Integer> dispositionIdList = Arrays.stream(dispositionIds).map(Integer::new).collect(Collectors.toList());
//对话人的性格要求
List<Integer> dispositionPerson = person.getDispositions().stream().map(DispositionDto::getDispositionId).collect(Collectors.toList());
//所有性格都符合
if (PlayerUtil.checkSubset(dispositionIdList, dispositionPerson)) {
count++;
} else {
continue;
}
}
countMap.put(i, count);
}
int max = 0;
int index = 0;
//找到命中次数最多的索引
for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {
if (entry.getValue() > max) {
max = entry.getValue();
index = entry.getKey();
}
}
if (max == 0) {
//获取对应话术
text = taskSpeechList.get(0).getReplyAnswer();
} else {
//获取对应话术
text = taskSpeechList.get(index).getReplyAnswer();
}
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call);
}
if (text.contains("【消费货币】")) {
if (!StringUtils.isEmpty(demandTask.getCondition2())) {
text = text.replace("【消费货币】", demandTask.getCondition2());
}
}
if (text.contains("【奖励】")) {
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
PlayerUtil.addMoneyNum(uid, Integer.parseInt(demandTask.getCompletionReward()));
text = text.replace("【奖励】", demandTask.getCompletionReward());
}
}
}
if (text.contains("A")) {
text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
text = text.replace("\n", "");
String[] result = text.split("\\|");
int num = reply.getNum();
text = result[num];
if (num < result.length - 1) {
reply.setNum(num + 1);
} else {
reply.setNum(result.length - 1);
}
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
//保存上轮数据
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
return text;
}
/**
* 获取前后置任务成功的话术。level: 1-是进行中任务完成提醒;2-未进行中任务完成提醒;3-进行中任务询问.其中1和2会加上完成对话文本
* @param uid
* @param person
* @param demandTask
*/
public static String getPreSuccessTaskSpeech(String uid, Person person, DemandTaskDto demandTask, int level) {
String text = "";
Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<TaskSpeech>> successTaskSpeechMap = TimingAcquisition.successTaskSpeechMap;
List<TaskSpeech> taskSpeechList = successTaskSpeechMap.get(demandTask.getDemandTaskId());
if (StringUtils.isEmpty(taskSpeechList)) {
return text;
}
String gender = person.getGender() == 1 ? "男" : "女";
for (int i = 1; i < taskSpeechList.size(); i++) {
TaskSpeech taskSpeech = taskSpeechList.get(i);
int count = 0;
//符合身份
if (!StringUtils.isEmpty(taskSpeech.getIdentity())) {
if (person.getIdentityName().equals(taskSpeech.getIdentity())) {
count++;
} else {
continue;
}
}
//符合性别
if (!StringUtils.isEmpty(taskSpeech.getGender())) {
if (gender.equals(taskSpeech.getGender())) {
count++;
} else {
continue;
}
}
//符合年龄
if (!StringUtils.isEmpty(taskSpeech.getAge())) {
String[] ageRange = taskSpeech.getAge().split("\\|");
if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) {
count++;
} else {
continue;
}
}
//符合性格
if (!StringUtils.isEmpty(taskSpeech.getDispositionIds())) {
String[] dispositionIds = taskSpeech.getDispositionIds().split("\\|");
//话术的性格要求
List<Integer> dispositionIdList = Arrays.stream(dispositionIds).map(Integer::new).collect(Collectors.toList());
//对话人的性格要求
List<Integer> dispositionPerson = person.getDispositions().stream().map(DispositionDto::getDispositionId).collect(Collectors.toList());
//所有性格都符合
if (PlayerUtil.checkSubset(dispositionIdList, dispositionPerson)) {
count++;
} else {
continue;
}
}
countMap.put(i, count);
}
int max = 0;
int index = 0;
//找到命中次数最多的索引
for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {
if (entry.getValue() > max) {
max = entry.getValue();
index = entry.getKey();
}
}
String addText = "";
if (max == 0) {
//获取对应话术
if (level == 1) {
text = taskSpeechList.get(0).getDoingFinishedAnswer();
text += taskSpeechList.get(0).getAnswer();
}
if (level == 2) {
text = taskSpeechList.get(0).getNoDoingFinishedAnswer();
text += taskSpeechList.get(0).getAnswer();
}
if (level == 3) {
text = taskSpeechList.get(0).getDoingAsk();
}
} else {
//获取对应话术
if (level == 1) {
text = taskSpeechList.get(index).getDoingFinishedAnswer();
text += taskSpeechList.get(index).getAnswer();
}
if (level == 2) {
text = taskSpeechList.get(index).getNoDoingFinishedAnswer();
text += taskSpeechList.get(index).getAnswer();
}
if (level == 3) {
text = taskSpeechList.get(index).getDoingAsk();
}
}
if (level == 1) {
if (!StringUtils.isEmpty(taskSpeechList.get(index).getDoingFinishedAnswer())) {
text = addHeader(text, person.getName());
}
//补充信任值和威慑度增减的回复
addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。";
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree() - 50), String.valueOf(person.getDeterrenceDegree() - 50));
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
}
}
text += addText;
}
if (level == 2) {
if (!StringUtils.isEmpty(taskSpeechList.get(index).getNoDoingFinishedAnswer())) {
text = addHeader(text, person.getName());
}
//补充信任值和威慑度增减的回复
addText = "【旁白@正常】【1】对你的信任达到【2】,对你的畏惧达到【3】。";
addText = speechReplaceNum(addText, person.getName(), String.valueOf(person.getTrustDegree() - 50), String.valueOf(person.getDeterrenceDegree() - 50));
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
addText += "你获得" + demandTask.getCompletionReward() + "文酬劳。";
}
}
text += addText;
}
if (level == 3) {
if (!StringUtils.isEmpty(taskSpeechList.get(index).getDoingAsk())) {
text = addHeader(text, person.getName());
}
}
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call);
}
if (text.contains("【消费货币】")) {
if (!StringUtils.isEmpty(demandTask.getCondition2())) {
text = text.replace("【消费货币】", demandTask.getCondition2());
}
}
if (text.contains("【奖励】")) {
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
PlayerUtil.addMoneyNum(uid, Integer.parseInt(demandTask.getCompletionReward()));
text = text.replace("【奖励】", demandTask.getCompletionReward());
}
}
}
if (text.contains("A")) {
text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
text = text.replace("\n", "");
return text; return text;
} }
...@@ -892,6 +1483,57 @@ public class SpeechUtil { ...@@ -892,6 +1483,57 @@ public class SpeechUtil {
String text = ""; String text = "";
Map<Integer, List<TipSpeech>> tipSpeechMap = TimingAcquisition.tipSpeechMap; Map<Integer, List<TipSpeech>> tipSpeechMap = TimingAcquisition.tipSpeechMap;
List<TipSpeech> tipSpeechList = tipSpeechMap.get(demandTask.getDemandTaskId()); List<TipSpeech> tipSpeechList = tipSpeechMap.get(demandTask.getDemandTaskId());
if (StringUtils.isEmpty(tipSpeechList)) {
return text;
}
//当前能做的任务线索
if (source == 1) {
//获取对应话术
text = tipSpeechList.get(0).getTaskClue();
}
//自身能解锁任务的线索
if (source == 2) {
//获取对应话术
text = tipSpeechList.get(0).getSelfClue();
}
//他人能解锁任务的线索
if (source == 3) {
//获取对应话术
text = tipSpeechList.get(0).getOtherClue();
}
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
if (personId != 0) {
if (text.contains("【C】")) {
text = text.replace("【C】", TimingAcquisition.getNameByPersonId(uid, personId));
}
}
text = text.replace("\n", "");
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
return text;
}
/**
* 获取自身任务线索提示的话术,用于二次回复
* @param uid
* @param demandTask
* @param personId
* @param source
*/
public static String getTipReplySpeech(String uid, DemandTaskDto demandTask, Integer personId, int source, ReplyDto reply) {
String text = "";
Map<Integer, List<TipSpeech>> tipSpeechMap = TimingAcquisition.tipSpeechMap;
List<TipSpeech> tipSpeechList = tipSpeechMap.get(demandTask.getDemandTaskId());
if (StringUtils.isEmpty(tipSpeechList)) {
return text;
}
//当前能做的任务线索 //当前能做的任务线索
if (source == 1) { if (source == 1) {
//获取对应话术 //获取对应话术
...@@ -920,6 +1562,18 @@ public class SpeechUtil { ...@@ -920,6 +1562,18 @@ public class SpeechUtil {
} }
} }
text = text.replace("\n", ""); text = text.replace("\n", "");
String[] result = text.split("\\|");
int num = reply.getNum();
text = result[num];
if (num < result.length - 1) {
reply.setNum(num + 1);
} else {
reply.setNum(result.length - 1);
}
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
//保存上轮数据
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
return text; return text;
} }
...@@ -933,6 +1587,9 @@ public class SpeechUtil { ...@@ -933,6 +1587,9 @@ public class SpeechUtil {
String text = ""; String text = "";
Map<Integer, List<TipSpeech>> tipSpeechMap = TimingAcquisition.tipSpeechMap; Map<Integer, List<TipSpeech>> tipSpeechMap = TimingAcquisition.tipSpeechMap;
List<TipSpeech> tipSpeechList = tipSpeechMap.get(barrierTaskKey.getDemandTaskId()); List<TipSpeech> tipSpeechList = tipSpeechMap.get(barrierTaskKey.getDemandTaskId());
if (StringUtils.isEmpty(tipSpeechList)) {
return text;
}
//他人能解锁任务的线索 //他人能解锁任务的线索
//获取对应话术 //获取对应话术
text = tipSpeechList.get(0).getOtherClue(); text = tipSpeechList.get(0).getOtherClue();
...@@ -946,6 +1603,9 @@ public class SpeechUtil { ...@@ -946,6 +1603,9 @@ public class SpeechUtil {
} }
} }
text = text.replace("\n", ""); text = text.replace("\n", "");
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
return text; return text;
} }
...@@ -964,6 +1624,344 @@ public class SpeechUtil { ...@@ -964,6 +1624,344 @@ public class SpeechUtil {
} else { } else {
text = "【人物名称@正常】" + TimingAcquisition.personSpeechMap.get(name).get(0).getAnswer(); text = "【人物名称@正常】" + TimingAcquisition.personSpeechMap.get(name).get(0).getAnswer();
} }
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
return text;
}
/**
* 获取人物见面时的话术
*/
public static String getPersonFirstSpeech(String uid, String locationId, Integer personId) {
String text = "";
String name = TimingAcquisition.playerMap.get(uid).getPersonMap().get(personId).getName();
//判断该人物是否是第一次见面
boolean isFirstMeet = PlayerUtil.isFirstMeet(uid, locationId, personId);
if (isFirstMeet) {
text = "【旁白@正常】" + TimingAcquisition.personSpeechMap.get(name).get(0).getDescription();
// String personText = "【人物名称@正常】" + TimingAcquisition.personSpeechMap.get(name).get(0).getFirstAnswer();
// text = asideText + personText;
} else {
text = "";
}
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
return text;
}
/**
* 获取人物见面时的话术
*/
public static String getOperateSpeech(Player player) {
Integer index = player.getOperateTextNum();
Map<Integer, String> id2NameMap = player.getId2NameMap();
Map<Integer, OperateSpeech> operateSpeechMap = TimingAcquisition.operateSpeechMap;
if (!StringUtils.isEmpty(operateSpeechMap.get(index))) {
String text = operateSpeechMap.get(index).getAnswer();
if (text.contains("【1】")) {
text = text.replace("【1】", id2NameMap.get(1));
}
if (text.contains("【2】")) {
text = text.replace("【2】", id2NameMap.get(2));
}
if (text.contains("【3】")) {
text = text.replace("【3】", id2NameMap.get(3));
}
if (text.contains("【4】")) {
text = text.replace("【4】", id2NameMap.get(4));
}
if (text.contains("【5】")) {
text = text.replace("【5】", id2NameMap.get(5));
}
if (text.contains("【6】")) {
text = text.replace("【6】", id2NameMap.get(6));
}
if (text.contains("【7】")) {
text = text.replace("【7】", id2NameMap.get(7));
}
if (text.contains("【8】")) {
text = text.replace("【8】", id2NameMap.get(8));
}
return text;
} else {
return null;
}
}
/**
* 获取前后置任务成功的话术
* @param uid
* @param person
* @param demandTask
*/
public static String speechReplaceValue(String uid, String text, Person person, DemandTaskDto demandTask) {
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(demandTask.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call);
}
if (text.contains("【条件2】")) {
if (!StringUtils.isEmpty(demandTask.getCondition2())) {
text = text.replace("【条件2】", demandTask.getCondition2());
}
}
if (text.contains("【奖励】")) {
if (!StringUtils.isEmpty(demandTask.getCompletionReward())) {
if (!"0".equals(demandTask.getCompletionReward())) {
PlayerUtil.addMoneyNum(uid, Integer.parseInt(demandTask.getCompletionReward()));
text = text.replace("【奖励】", demandTask.getCompletionReward());
}
}
}
if (text.contains("A")) {
text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, demandTask.getSubject()));
}
if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, demandTask.getObject()));
}
if (text.contains("【信任值】")) {
text = text.replace("【信任值】", String.valueOf(person.getTrustDegree() - 50));
}
if (text.contains("【威慑度】")) {
text = text.replace("【威慑度】", String.valueOf(person.getDeterrenceDegree() - 50));
}
text = text.replace("\n", "");
return text;
}
/**
* 获取关卡的开场白
*/
public static String getPrologueSpeech(String uid, String gateNo) {
int size = TimingAcquisition.barrierTaskKeyMap.get(gateNo).size();
Integer demandTaskId = TimingAcquisition.barrierTaskKeyMap.get(gateNo).get(size - 1).getDemandTaskId();
//搭档名称
String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
String text = SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103102);
text = SpeechUtil.replaceHeader(text, partnerName);
String location = TimingAcquisition.locationMap.get(TimingAcquisition.playerMap.get(uid).getLocation()).getName();
String name = PlayerUtil.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
text = SpeechUtil.speechReplaceNum(text, location, name);
//开场白
// Map<Integer, EndGoal> endGoalMap = TimingAcquisition.endGoalMap;
// String text = "";
// for (Map.Entry<Integer, EndGoal> entry : endGoalMap.entrySet()) {
// EndGoal endGoal = entry.getValue();
// List<String> associatedTaskIds = Arrays.asList(endGoal.getAssociatedTaskId().split("\\|"));
// if (associatedTaskIds.contains(demandTaskId.toString())) {
// text = "【旁白@正常】" + endGoal.getName();
// text += "【旁白@正常】" + endGoal.getDescription();
// text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103101);
// text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103102);
// text = SpeechUtil.replaceHeader(text, partnerName);
// String location = TimingAcquisition.locationMap.get(TimingAcquisition.playerMap.get(uid).getLocation()).getName();
// String name = PlayerUtil.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
// text = SpeechUtil.speechReplaceNum(text, location, name);
// break;
// }
// }
return text;
}
/**
* 获取线索成功的话术
* @param uid
* @param person
* @param clue
*/
public static String getPreReasonSpeech(String uid, Person person, ClueDto clue, Integer demandTaskId) {
String text = "";
Map<Integer, Integer> countMap = new HashMap<>();
Map<Integer, List<PreReasonSpeech>> preReasonSpeechMap = TimingAcquisition.preReasonSpeechMap;
List<PreReasonSpeech> preReasonSpeechList = preReasonSpeechMap.get(clue.getClueId());
//当前对话人
Integer currentId = TimingAcquisition.playerMap.get(uid).getPersonId();
if (StringUtils.isEmpty(preReasonSpeechList)) {
return text;
}
String gender = person.getGender() == 1 ? "男" : "女";
for (int i = 0; i < preReasonSpeechList.size(); i++) {
PreReasonSpeech preReasonSpeech = preReasonSpeechList.get(i);
int count = 0;
if (!preReasonSpeech.getDemandTaskId().equals(demandTaskId)) {
continue;
}
//符合行为
if (!StringUtils.isEmpty(preReasonSpeech.getBehaviour())) {
Integer behaviour = preReasonSpeech.getBehaviour();
List<Integer> behaviourIdList = person.getBehaviours().stream().map(BehaviourDto::getBehaviourId).collect(Collectors.toList());
if(behaviourIdList.contains(behaviour)) {
count++;
} else {
continue;
}
}
//符合关系
if (!StringUtils.isEmpty(preReasonSpeech.getRelation())) {
Integer relation = preReasonSpeech.getRelation();
List<Integer> relationIdList = person.getRelations().stream().map(RelationDto::getRelationId).collect(Collectors.toList());
if(relationIdList.contains(relation)) {
count++;
} else {
continue;
}
}
//符合性格
if (!StringUtils.isEmpty(preReasonSpeech.getDispositionId())) {
//话术的性格要求
Integer dispositionId = preReasonSpeech.getDispositionId();
//对话人的性格要求
List<Integer> dispositionPerson = person.getDispositions().stream().map(DispositionDto::getDispositionId).collect(Collectors.toList());
//所有性格都符合
if (dispositionPerson.contains(dispositionId)) {
count++;
} else {
continue;
}
}
//符合自身身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentity())) {
if (person.getIdentityId().equals(preReasonSpeech.getIdentity())) {
count++;
} else {
continue;
}
}
//符合对方身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentitySide())) {
if (!StringUtils.isEmpty(clue.getObject())) {
Integer identityIdSide = TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getObject()).getIdentityId();
if (identityIdSide.equals(preReasonSpeech.getIdentitySide())) {
count++;
} else {
continue;
}
}
}
//符合性别
if (!StringUtils.isEmpty(preReasonSpeech.getGender())) {
if (gender.equals(preReasonSpeech.getGender())) {
count++;
} else {
continue;
}
}
//符合年龄
if (!StringUtils.isEmpty(preReasonSpeech.getAge())) {
String[] ageRange = preReasonSpeech.getAge().split("\\|");
if(NumberUtil.inNumRange(person.getAge(),"["+ageRange[0]+","+ageRange[1]+"]")) {
count++;
} else {
continue;
}
}
countMap.put(i, count);
}
int max = 0;
List<Integer> indexList = new ArrayList<>();
//找到命中次数最多的索引
for (Map.Entry<Integer, Integer> entry : countMap.entrySet()) {
if (entry.getValue() >= max) {
max = entry.getValue();
indexList.add(entry.getKey());
}
}
if (max == 0) {
//获取对应话术
if (!currentId.equals(clue.getSubject())) {
text = preReasonSpeechList.get(0).getAnswer();
} else {
text = preReasonSpeechList.get(0).getAnswerSelf();
}
} else {
int index = 0;
//命中次数最多的有多条,按优先级查找(行为 > 关系 > 性格)
if (indexList.size() > 1) {
//记录索引的优先级
Map<Integer, Integer> indexSortMap = new HashMap<>();
//遍历所有索引,划分优先级
for (Integer i : indexList) {
PreReasonSpeech preReasonSpeech = preReasonSpeechList.get(i);
//配置了行为
if (!StringUtils.isEmpty(preReasonSpeech.getBehaviour())) {
//配置了自身身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentity())) {
indexSortMap.put(i, 1);
}
//配置了对方身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentitySide())) {
indexSortMap.put(i, 2);
}
}
//配置了关系
if (!StringUtils.isEmpty(preReasonSpeech.getRelation())) {
//配置了自身身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentity())) {
indexSortMap.put(i, 3);
}
//配置了对方身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentitySide())) {
indexSortMap.put(i, 4);
}
}
//配置了性格
if (!StringUtils.isEmpty(preReasonSpeech.getDispositionId())) {
//配置了自身身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentity())) {
indexSortMap.put(i, 5);
}
//配置了对方身份
if (!StringUtils.isEmpty(preReasonSpeech.getIdentitySide())) {
indexSortMap.put(i, 6);
}
}
}
//找出优先级最高的索引
int min = 6;
for (Map.Entry<Integer, Integer> entry : indexSortMap.entrySet()) {
if (entry.getValue() <= min) {
min = entry.getValue();
index = entry.getKey();
}
}
} else {
index = indexList.get(0);
}
//获取对应话术
if (!currentId.equals(clue.getSubject())) {
text = preReasonSpeechList.get(index).getAnswer();
} else {
text = preReasonSpeechList.get(index).getAnswerSelf();
}
}
//话术中配置数据替换
if (text.contains("【A】")) {
text = text.replace("【A】", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
}
if (text.contains("【B】")) {
text = text.replace("【B】", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
}
if (text.contains("【第三人称】")) {
String call = (TimingAcquisition.playerMap.get(uid).getPersonMap().get(clue.getSubject()).getGender() == 1) ? "他" : "她";
text = text.replace("【第三人称】", call);
}
if (text.contains("A")) {
text = text.replace("A", TimingAcquisition.getNameByPersonId(uid, clue.getSubject()));
}
if (text.contains("B")) {
text = text.replace("B", TimingAcquisition.getNameByPersonId(uid, clue.getObject()));
}
String[] result = text.split("\\|");
Integer i = getRandomNum(0, result.length);
text = result[i];
return text; return text;
} }
} }
...@@ -3,8 +3,11 @@ package com.qiwu.inference.controller; ...@@ -3,8 +3,11 @@ package com.qiwu.inference.controller;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.DataTrimUtil; import com.qiwu.inference.common.utils.DataTrimUtil;
import com.qiwu.inference.common.utils.RequestConversionUtil; import com.qiwu.inference.common.utils.RequestConversionUtil;
import com.qiwu.inference.dto.ReplyDto;
import com.qiwu.inference.dto.request.CommonRequest; import com.qiwu.inference.dto.request.CommonRequest;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
...@@ -59,10 +62,18 @@ public class CommonController { ...@@ -59,10 +62,18 @@ public class CommonController {
CommonResult<ResultVarsResponse> result = null; CommonResult<ResultVarsResponse> result = null;
String uid = commonRequest.getUid(); String uid = commonRequest.getUid();
boolean login = false; boolean login = false;
//玩家第一次登录 //玩家已经存在
if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) { if (TimingAcquisition.uidList.contains(uid)) {
loginService.login(uid); //玩家已经下线,重新加载
login = true; if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) {
loginService.loadPlayerData(uid);
}
} else {
//玩家第一次登录
if (StringUtils.isEmpty(TimingAcquisition.playerMap.get(uid))) {
loginService.login(uid);
login = true;
}
} }
//请求参数转换 //请求参数转换
OperationRequest operationReq = RequestConversionUtil.request2Operation(commonRequest); OperationRequest operationReq = RequestConversionUtil.request2Operation(commonRequest);
...@@ -86,7 +97,7 @@ public class CommonController { ...@@ -86,7 +97,7 @@ public class CommonController {
if ("闲聊".equals(operateName)) { if ("闲聊".equals(operateName)) {
int chatTimes = TimingAcquisition.playerMap.get(uid).getChatTimes(); int chatTimes = TimingAcquisition.playerMap.get(uid).getChatTimes();
int times = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue()); int times = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue());
if (chatTimes > times) { if (chatTimes >= times - 1) {
TimingAcquisition.playerMap.get(uid).setChatTimes(0); TimingAcquisition.playerMap.get(uid).setChatTimes(0);
} else { } else {
TimingAcquisition.playerMap.get(uid).setChatTimes(TimingAcquisition.playerMap.get(uid).getChatTimes() + 1); TimingAcquisition.playerMap.get(uid).setChatTimes(TimingAcquisition.playerMap.get(uid).getChatTimes() + 1);
...@@ -94,6 +105,15 @@ public class CommonController { ...@@ -94,6 +105,15 @@ public class CommonController {
} else { } else {
TimingAcquisition.playerMap.get(uid).setChatTimes(0); TimingAcquisition.playerMap.get(uid).setChatTimes(0);
} }
//判断上一轮玩家任务数据是否清空
if (!"二次回复".equals(operateName)) {
String unique = uid + TimingAcquisition.playerMap.get(uid).getGateNo();
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
if (!StringUtils.isEmpty(reply)) {
//清除任务数据
CacheGlobal.concurrentMap.remove(unique);
}
}
switch (operateName) { switch (operateName) {
case "开始游戏": case "开始游戏":
result = loginService.startGame(operationReq); result = loginService.startGame(operationReq);
...@@ -107,6 +127,9 @@ public class CommonController { ...@@ -107,6 +127,9 @@ public class CommonController {
case "查看操作": case "查看操作":
result = checkService.check(operationReq); result = checkService.check(operationReq);
break; break;
case "二次回复":
result = checkService.secondAnswer(operationReq);
break;
case "关卡操作": case "关卡操作":
result = barrierService.operate(operationReq); result = barrierService.operate(operationReq);
break; break;
......
...@@ -19,7 +19,7 @@ public class BehaviourDto implements Serializable { ...@@ -19,7 +19,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 行为名称 * 行为名称
*/ */
private String name; // private String name;
/** /**
* 行为id * 行为id
*/ */
...@@ -27,7 +27,7 @@ public class BehaviourDto implements Serializable { ...@@ -27,7 +27,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 行为描述 * 行为描述
*/ */
private String description; // private String description;
/** /**
* 主体 * 主体
*/ */
...@@ -35,7 +35,7 @@ public class BehaviourDto implements Serializable { ...@@ -35,7 +35,7 @@ public class BehaviourDto implements Serializable {
/** /**
* 主体名称 * 主体名称
*/ */
private String subjectName; // private String subjectName;
/** /**
* 客体 * 客体
*/ */
...@@ -43,6 +43,6 @@ public class BehaviourDto implements Serializable { ...@@ -43,6 +43,6 @@ public class BehaviourDto implements Serializable {
/** /**
* 客体名称 * 客体名称
*/ */
private String objectName; // private String objectName;
} }
...@@ -38,7 +38,7 @@ public class ClueDto implements Serializable { ...@@ -38,7 +38,7 @@ public class ClueDto implements Serializable {
/** /**
* 描述 * 描述
*/ */
private String description; // private String description;
/** /**
* 类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务 9: 关键线索 * 类型: 1:身份 2:场所 3:性格爱好 4:行为 5:关系 6:任务 9: 关键线索
*/ */
...@@ -54,7 +54,7 @@ public class ClueDto implements Serializable { ...@@ -54,7 +54,7 @@ public class ClueDto implements Serializable {
/** /**
* 线索模板 * 线索模板
*/ */
private String clueTemplate; // private String clueTemplate;
/** /**
* 信任度 * 信任度
......
...@@ -31,7 +31,7 @@ public class DemandTaskDto implements Serializable { ...@@ -31,7 +31,7 @@ public class DemandTaskDto implements Serializable {
/** /**
* 描述 * 描述
*/ */
private String description; // private String description;
/** /**
* 主体 * 主体
...@@ -102,7 +102,7 @@ public class DemandTaskDto implements Serializable { ...@@ -102,7 +102,7 @@ public class DemandTaskDto implements Serializable {
/** /**
* 完成反馈 * 完成反馈
*/ */
private String completionFeedback; // private String completionFeedback;
/** /**
* 有效次数 * 有效次数
*/ */
...@@ -124,10 +124,20 @@ public class DemandTaskDto implements Serializable { ...@@ -124,10 +124,20 @@ public class DemandTaskDto implements Serializable {
private int infoLevel; private int infoLevel;
/** /**
* 任务标签 1普通任务 2关键任务 3目标任 * 任务标签 1普通任务 2关键任务 3目标任务
*/ */
private int taskLabel; private int taskLabel;
/**
* 自动触发: 0-不自动触发,1-自动触发
*/
private int isAuto;
/**
* 声望值
*/
private int reputation;
@Override @Override
......
...@@ -27,11 +27,11 @@ public class DispositionDto implements Serializable { ...@@ -27,11 +27,11 @@ public class DispositionDto implements Serializable {
/** /**
* 性格名称 * 性格名称
*/ */
private String name; // private String name;
/** /**
* 性格描述 * 性格描述
*/ */
private String description; // private String description;
/** /**
* 类型 * 类型
*/ */
......
...@@ -68,6 +68,10 @@ public class Player { ...@@ -68,6 +68,10 @@ public class Player {
* 人物的姓名和编号转换 map * 人物的姓名和编号转换 map
*/ */
private Map<String,Integer> name2IdMap = new HashMap<>(); private Map<String,Integer> name2IdMap = new HashMap<>();
/**
* 人物的编号和姓名转换 map
*/
private Map<Integer, String> id2NameMap = new HashMap<>();
/** /**
* 当前关卡的货币 * 当前关卡的货币
...@@ -127,6 +131,21 @@ public class Player { ...@@ -127,6 +131,21 @@ public class Player {
*/ */
private int chatTimes = 0; private int chatTimes = 0;
/**
* 记录玩家操作提示的序号
*/
private int operateTextNum = 1;
/**
* 记录玩家询问操作的每个操作对应线索的序号
*/
private Map<String, Integer> askAndNumMap = new HashMap<>();
/**
* 声望值
*/
private int reputation = 0;
// public Player(){ // public Player(){
// //初始化推理游戏人物 // //初始化推理游戏人物
// List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet()); // List<String> keys = new ArrayList<>(TimingAcquisition.gateInfoMap.keySet());
......
...@@ -11,7 +11,7 @@ public class PostTaskDto { ...@@ -11,7 +11,7 @@ public class PostTaskDto {
*/ */
private Integer personId; private Integer personId;
/** /**
* 后置任务的前置任务完成情况: Map<后置任务id, Map<前置任务id, 完成状态>> * 后置任务的前置任务完成情况: Map<后置任务id, 对象{前置任务id, 前置任务完成状态}>
*/ */
Map<Integer, TaskStatusDto> taskStatusMap; Map<Integer, TaskStatusDto> taskStatusMap;
} }
...@@ -20,12 +20,12 @@ public class RelationDto implements Serializable { ...@@ -20,12 +20,12 @@ public class RelationDto implements Serializable {
/** /**
* 关系名称 * 关系名称
*/ */
private String name; // private String name;
/** /**
* 关系描述 * 关系描述
*/ */
private String description; // private String description;
/** /**
* 类型 * 类型
......
package com.qiwu.inference.dto;
import lombok.Data;
@Data
public class ReplyDto {
/**
* 主体id
*/
private Integer subjectId;
/**
* 客体id
*/
private Integer objectId;
/**
* 任务id
*/
private Integer demandTaskId;
/**
* 响应方式:1-闲聊,2-发布任务,3-执行任务
*/
private int type;
/**
* 序号,按顺序去对应话术
*/
private int num = 0;
}
...@@ -15,8 +15,8 @@ public class ChatSpeech implements Serializable { ...@@ -15,8 +15,8 @@ public class ChatSpeech implements Serializable {
@ApiModelProperty("身份") @ApiModelProperty("身份")
private String identity; private String identity;
@ApiModelProperty("人物ID") @ApiModelProperty("人物名称")
private Integer personId; private String personName;
@ApiModelProperty("性别") @ApiModelProperty("性别")
private String gender; private String gender;
...@@ -33,8 +33,11 @@ public class ChatSpeech implements Serializable { ...@@ -33,8 +33,11 @@ public class ChatSpeech implements Serializable {
@ApiModelProperty("任务状态") @ApiModelProperty("任务状态")
private String taskStatus; private String taskStatus;
@ApiModelProperty("关系") @ApiModelProperty("信任值")
private String degree; private String trust;
@ApiModelProperty("威慑度")
private String deterrence;
@ApiModelProperty("文本内容") @ApiModelProperty("文本内容")
private String answer; private String answer;
......
package com.qiwu.inference.pojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class OperateSpeech implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("ID")
private Integer id;
@ApiModelProperty("操作提示文本")
private String answer;
}
package com.qiwu.inference.pojo;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
@Data
public class PreReasonSpeech implements Serializable {
private static final long serialVersionUID = 1L;
@ApiModelProperty("线索ID")
private Integer demandTaskId;
@ApiModelProperty("任务ID")
private Integer clueId;
@ApiModelProperty("任务名称")
private String taskName;
@ApiModelProperty("自身身份")
private Integer identity;
@ApiModelProperty("对方身份")
private Integer identitySide;
@ApiModelProperty("性别")
private String gender;
@ApiModelProperty("人物名称")
private Integer personName;
@ApiModelProperty("年龄段")
private String age;
@ApiModelProperty("性格A")
private Integer dispositionId;
@ApiModelProperty("关系")
private Integer relation;
@ApiModelProperty("行为")
private Integer behaviour;
@ApiModelProperty("第三方描述")
private String answer;
@ApiModelProperty("自身描述")
private String answerSelf;
@ApiModelProperty("通用标签")
private Integer flag;
}
...@@ -48,6 +48,9 @@ public class TaskSpeech implements Serializable { ...@@ -48,6 +48,9 @@ public class TaskSpeech implements Serializable {
@ApiModelProperty("完成对话文本") @ApiModelProperty("完成对话文本")
private String answer; private String answer;
@ApiModelProperty("任务操作提醒文本")
private String replyAnswer;
@ApiModelProperty("通用标签") @ApiModelProperty("通用标签")
private Integer flag; private Integer flag;
} }
...@@ -8,10 +8,7 @@ import com.qiwu.inference.common.utils.CacheUtil; ...@@ -8,10 +8,7 @@ import com.qiwu.inference.common.utils.CacheUtil;
import com.qiwu.inference.common.utils.PlayerUtil; import com.qiwu.inference.common.utils.PlayerUtil;
import com.qiwu.inference.common.utils.RandomUtil; import com.qiwu.inference.common.utils.RandomUtil;
import com.qiwu.inference.common.utils.SpeechUtil; import com.qiwu.inference.common.utils.SpeechUtil;
import com.qiwu.inference.dto.DemandTaskDto; import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.PostTaskDto;
import com.qiwu.inference.dto.PostTaskRecordDto;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
...@@ -47,17 +44,18 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -47,17 +44,18 @@ public class BarrierServiceImpl implements BarrierService {
String methodId = operationReq.getMethodId(); //方法编号 String methodId = operationReq.getMethodId(); //方法编号
Integer subjectId = operationReq.getSubjectId(); //人物名称1 Integer subjectId = operationReq.getSubjectId(); //人物名称1
String locationId = operationReq.getLocationId(); //场所名称 String locationId = operationReq.getLocationId(); //场所名称
//当前玩家上一轮的请求信息 if (!StringUtils.isEmpty(subjectId)) {
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid); if (subjectId == Constants.REQ_NON) {
if (!StringUtils.isEmpty(lastReq)) { //获取对应话术
if (Constants.OPERATE_BARRIER.equals(lastReq.getOperate())) { String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400203);
methodId = (methodId == null) ? lastReq.getMethodId() : methodId; resultResponse.set反馈ID(400203);
subjectId = (subjectId == null) ? lastReq.getSubjectId() : subjectId; resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
} }
} }
operationReq.setOperate(Constants.OPERATE_BARRIER); operationReq.setOperate(Constants.OPERATE_BARRIER);
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//场所移动 //场所移动
if ("4001".equals(methodId)) { if ("4001".equals(methodId)) {
//离开,或者没有说明去哪和找谁 //离开,或者没有说明去哪和找谁
...@@ -66,7 +64,7 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -66,7 +64,7 @@ public class BarrierServiceImpl implements BarrierService {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400105); String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400105);
text = SpeechUtil.speechReplaceNum(text, locationText); text = SpeechUtil.speechReplaceNum(text, locationText);
resultResponse.set反馈ID(400105); resultResponse.set反馈ID(400109);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
...@@ -75,6 +73,161 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -75,6 +73,161 @@ public class BarrierServiceImpl implements BarrierService {
if (!StringUtils.isEmpty(subjectId)) { if (!StringUtils.isEmpty(subjectId)) {
//获取人物所在场所 //获取人物所在场所
locationId = player.getPersonMap().get(subjectId).getLocation(); locationId = player.getPersonMap().get(subjectId).getLocation();
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//获取对应话术
String text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
// if (!StringUtils.isEmpty(text) && !"".equals(text)) {
// text = SpeechUtil.replaceHeader(text, subjectName);
// }
//更新场所和人物
player.setLocation(locationId);
player.setPersonId(subjectId);
//查找这个人物所有的后置任务和自动触发的任务
List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId);
if (postTaskList.size() != 0) {
//找到优先级高的任务
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) {
//前置任务已完成
if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) {
subjectId = postTaskRecord.getPersonId();
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
//任务自动完成
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
Map<Integer, Integer> map = taskMap.get(subjectId);
map.put(postTaskRecord.getPostTaskId(), 1);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
if (!StringUtils.isEmpty(demandTask)) {
PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask);
if (postTaskRecord.getLevel() == 1) {
//获取对应话术
text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1);
resultResponse.set反馈ID(400105);
}
if (postTaskRecord.getLevel() == 2) {
//获取对应话术
text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2);
resultResponse.set反馈ID(400106);
}
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//任务为自动触发且自动完成
if (postTaskRecord.getLevel() == 3) {
Integer preTaskId = postTaskRecord.getPreTaskId(); //前置
Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
//找到后置任务
if (!StringUtils.isEmpty(demandTaskPost)) {
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
String clueText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += clueText;
}
//后置任务自动完成
PlayerUtil.taskFinished(uid, subjectId, postTaskId);
String postText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTaskPost);
//有配置前置任务
if (preTaskId != 0) {
//后置任务的客体
Integer objectId = demandTaskPost.getObject();
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, objectId, preTaskId);
if (!StringUtils.isEmpty(demandTaskPre)) {
//前置任务自动完成
PlayerUtil.taskFinished(uid, objectId, preTaskId);
String preText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(objectId), demandTaskPre);
text += preText;
}
}
text += postText;
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务为自动触发仅提供线索
if (postTaskRecord.getLevel() == 4) {
Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
//找到后置任务
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
if (!StringUtils.isEmpty(demandTaskPost)) {
//后置任务解锁
if (demandTaskPost.getClueSwitch() == 1) {
demandTaskPost.setClueSwitch(2);
}
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
//----------------记录线索--------------
PlayerUtil.recordClue(uid, player.getPersonId(), subjectId, clue.getType(), clue);
//----------------是否解锁任务-------------
// PlayerUtil.unlockTask(uid, player.getPersonMap().get(subjectId), clue);
//前置任务解锁
if (postTaskRecord.getPreTaskId() != 0) {
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, demandTaskPost.getObject(), postTaskRecord.getPreTaskId());
if (!StringUtils.isEmpty(demandTaskPre)) {
demandTaskPre.setClueSwitch(2);
}
}
String postText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += postText;
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(2); //直接操作提醒
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400108);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务是本人发布的
if (postTaskRecord.getLevel() == 5) {
subjectId = postTaskRecord.getPersonId();
//获取后置任务对应的信息
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
if (!StringUtils.isEmpty(demandTask)) {
text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3);
String[] condition1 = demandTask.getCondition1().split("\\|");
if (!"70043".equals(condition1[0]) && !"71000".equals(condition1[0])) {
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(3); //执行任务
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
}
} else { } else {
//玩家提供的场所不存在 //玩家提供的场所不存在
if (Constants.NON_STR.equals(locationId)) { if (Constants.NON_STR.equals(locationId)) {
...@@ -101,29 +254,35 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -101,29 +254,35 @@ public class BarrierServiceImpl implements BarrierService {
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList); PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务 //存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) { if (!StringUtils.isEmpty(postTaskRecord)) {
subjectId = postTaskRecord.getPersonId();
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//获取对应话术
String text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
// if (!StringUtils.isEmpty(text)) {
// text = SpeechUtil.replaceHeader(text, subjectName);
// }
//更新场所和人物
player.setLocation(locationId);
player.setPersonId(subjectId);
//前置任务已完成 //前置任务已完成
if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) { if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) {
subjectId = postTaskRecord.getPersonId();
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
//任务自动完成 //任务自动完成
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap(); Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
Map<Integer, Integer> map = taskMap.get(subjectId); Map<Integer, Integer> map = taskMap.get(subjectId);
map.put(postTaskRecord.getPostTaskId(), 1); map.put(postTaskRecord.getPostTaskId(), 1);
player.setLocation(locationId);
player.setPersonId(subjectId);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask); PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask);
String text = "";
if (postTaskRecord.getLevel() == 1) { if (postTaskRecord.getLevel() == 1) {
//获取对应话术 //获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1);
resultResponse.set反馈ID(400105); resultResponse.set反馈ID(400105);
} }
if (postTaskRecord.getLevel() == 2) { if (postTaskRecord.getLevel() == 2) {
//获取对应话术 //获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2);
resultResponse.set反馈ID(400106); resultResponse.set反馈ID(400106);
} }
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -131,15 +290,102 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -131,15 +290,102 @@ public class BarrierServiceImpl implements BarrierService {
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
} }
//任务是本人发布的 //任务为自动触发且自动完成
if (postTaskRecord.getLevel() == 3) { if (postTaskRecord.getLevel() == 3) {
subjectId = postTaskRecord.getPersonId(); Integer preTaskId = postTaskRecord.getPreTaskId(); //前置
player.setLocation(locationId); Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
player.setPersonId(subjectId); DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
//找到后置任务
if (!StringUtils.isEmpty(demandTaskPost)) {
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
String clueText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += clueText;
}
//后置任务自动完成
PlayerUtil.taskFinished(uid, subjectId, postTaskId);
String postText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTaskPost);
//有配置前置任务
if (preTaskId != 0) {
//后置任务的客体
Integer objectId = demandTaskPost.getObject();
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, objectId, preTaskId);
if (!StringUtils.isEmpty(demandTaskPre)) {
//前置任务自动完成
PlayerUtil.taskFinished(uid, objectId, preTaskId);
String preText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(objectId), demandTaskPre);
text += preText;
}
}
text += postText;
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务为自动触发仅提供线索
if (postTaskRecord.getLevel() == 4) {
Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
//找到后置任务
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
if (!StringUtils.isEmpty(demandTaskPost)) {
//后置任务解锁
if (demandTaskPost.getClueSwitch() == 1) {
demandTaskPost.setClueSwitch(2);
}
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
//----------------记录线索--------------
PlayerUtil.recordClue(uid, player.getPersonId(), subjectId, clue.getType(), clue);
//----------------是否解锁任务-------------
// PlayerUtil.unlockTask(uid, player.getPersonMap().get(subjectId), clue);
//前置任务解锁
if (postTaskRecord.getPreTaskId() != 0) {
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, demandTaskPost.getObject(), postTaskRecord.getPreTaskId());
if (!StringUtils.isEmpty(demandTaskPre)) {
demandTaskPre.setClueSwitch(2);
}
}
String postText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += postText;
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(2); //直接操作提醒
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400108);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务是本人发布的
if (postTaskRecord.getLevel() == 5) {
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3);
String[] condition1 = demandTask.getCondition1().split("\\|");
if (!"70043".equals(condition1[0]) && !"71000".equals(condition1[0])) {
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(3); //执行任务
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
} }
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
...@@ -152,7 +398,6 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -152,7 +398,6 @@ public class BarrierServiceImpl implements BarrierService {
} }
int index = RandomUtil.randomInt(personIdList.size()); int index = RandomUtil.randomInt(personIdList.size());
subjectId = personIdList.get(index); subjectId = personIdList.get(index);
subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
} }
//场所为隐藏,还未解锁 //场所为隐藏,还未解锁
if (Constants.IS_HIDDEN.equals(player.getLocationMap().get(locationId).getIsHidden())) { if (Constants.IS_HIDDEN.equals(player.getLocationMap().get(locationId).getIsHidden())) {
...@@ -167,10 +412,11 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -167,10 +412,11 @@ public class BarrierServiceImpl implements BarrierService {
player.setPersonId(subjectId); player.setPersonId(subjectId);
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getPersonSpeech(uid, locationId, subjectId); String text = SpeechUtil.getPersonSpeech(uid, locationId, subjectId);
text = SpeechUtil.replaceHeader(text, subjectName); text = SpeechUtil.replaceHeader(text, subjectName);
//更新见面次数 //更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId); PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
// String call = (player.getPersonMap().get(subjectId).getGender() == 1) ? "他" : "她"; // String call = (player.getPersonMap().get(subjectId).getGender() == 1) ? "他" : "她";
//获取对应话术 //获取对应话术
...@@ -181,8 +427,17 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -181,8 +427,17 @@ public class BarrierServiceImpl implements BarrierService {
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//当前玩家上一轮的请求信息
OperationRequest lastReq = (OperationRequest) CacheUtil.get(uid);
if (!StringUtils.isEmpty(lastReq)) {
if (Constants.OPERATE_BARRIER.equals(lastReq.getOperate())) {
methodId = (methodId == null) ? lastReq.getMethodId() : methodId;
subjectId = (subjectId == null) ? lastReq.getSubjectId() : subjectId;
}
}
//直接找人 //直接找人
if ("4002".equals(methodId)) { if ("4002".equals(methodId)) {
String subjectName = PlayerUtil.getNameByPersonId(uid, subjectId);
//关卡中没有这个人物 //关卡中没有这个人物
if (StringUtils.isEmpty(player.getPersonMap().get(subjectId))) { if (StringUtils.isEmpty(player.getPersonMap().get(subjectId))) {
//获取对应话术 //获取对应话术
...@@ -202,6 +457,8 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -202,6 +457,8 @@ public class BarrierServiceImpl implements BarrierService {
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
//获取人物所在场所
locationId = player.getPersonMap().get(subjectId).getLocation();
//查找所有这个人物的后置任务情况 //查找所有这个人物的后置任务情况
List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId); List<PostTaskDto> postTaskList = PlayerUtil.getDemandTaskHavePre(uid, subjectId);
if (postTaskList.size() != 0) { if (postTaskList.size() != 0) {
...@@ -209,29 +466,36 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -209,29 +466,36 @@ public class BarrierServiceImpl implements BarrierService {
PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList); PostTaskRecordDto postTaskRecord = PlayerUtil.getPostTask(uid, postTaskList);
//存在优先级高的任务 //存在优先级高的任务
if (!StringUtils.isEmpty(postTaskRecord)) { if (!StringUtils.isEmpty(postTaskRecord)) {
subjectId = postTaskRecord.getPersonId();
//获取对应话术
String text = SpeechUtil.getPersonFirstSpeech(uid, locationId, subjectId); //第一次见面时的话术
// if (!StringUtils.isEmpty(text)) {
// text = SpeechUtil.replaceHeader(text, subjectName);
// }
//更新场所和人物
player.setLocation(locationId);
player.setPersonId(subjectId);
//前置任务已完成 //前置任务已完成
if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) { if (postTaskRecord.getLevel() == 1 || postTaskRecord.getLevel() == 2) {
subjectId = postTaskRecord.getPersonId();
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
//任务自动完成 //任务自动完成
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap(); Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
Map<Integer, Integer> map = taskMap.get(subjectId); Map<Integer, Integer> map = taskMap.get(subjectId);
map.put(postTaskRecord.getPostTaskId(), 1); map.put(postTaskRecord.getPostTaskId(), 1);
player.setLocation(locationId);
player.setPersonId(subjectId);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask); PlayerUtil.addThreshold(player.getPersonMap().get(subjectId), demandTask);
String text = "";
if (postTaskRecord.getLevel() == 1) { if (postTaskRecord.getLevel() == 1) {
//获取对应话术 //获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 1);
resultResponse.set反馈ID(400105); resultResponse.set反馈ID(400105);
} }
if (postTaskRecord.getLevel() == 2) { if (postTaskRecord.getLevel() == 2) {
//获取对应话术 //获取对应话术
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 2);
resultResponse.set反馈ID(400106); resultResponse.set反馈ID(400106);
} }
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
...@@ -239,18 +503,108 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -239,18 +503,108 @@ public class BarrierServiceImpl implements BarrierService {
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
} }
//任务是本人发布的 //任务为自动触发且自动完成
if (postTaskRecord.getLevel() == 3) { if (postTaskRecord.getLevel() == 3) {
Integer preTaskId = postTaskRecord.getPreTaskId(); //前置
Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
//找到后置任务
if (!StringUtils.isEmpty(demandTaskPost)) {
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
String clueText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += clueText;
}
//前置任务自动完成
PlayerUtil.taskFinished(uid, subjectId, postTaskId);
String postText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTaskPost);
//有配置前置任务
if (preTaskId != 0) {
//后置任务的客体
Integer objectId = demandTaskPost.getObject();
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, objectId, preTaskId);
if (!StringUtils.isEmpty(demandTaskPre)) {
//前置任务自动完成
PlayerUtil.taskFinished(uid, objectId, preTaskId);
String preText = SpeechUtil.getSuccessTaskSpeech(uid, player.getPersonMap().get(objectId), demandTaskPre);
text += preText;
}
}
text += postText;
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务为自动触发仅提供线索
if (postTaskRecord.getLevel() == 4) {
Integer postTaskId = postTaskRecord.getPostTaskId();; //后置
//找到后置任务
DemandTaskDto demandTaskPost = PlayerUtil.getDemandTaskInfo(uid, subjectId, postTaskId);
if (!StringUtils.isEmpty(demandTaskPost)) {
//后置任务解锁
if (demandTaskPost.getClueSwitch() == 1) {
demandTaskPost.setClueSwitch(2);
}
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTaskPost.getClueId());
if (!StringUtils.isEmpty(clue)) {
//----------------记录线索--------------
PlayerUtil.recordClue(uid, player.getPersonId(), subjectId, clue.getType(), clue);
//----------------是否解锁任务-------------
// PlayerUtil.unlockTask(uid, player.getPersonMap().get(subjectId), clue);
//前置任务解锁
if (postTaskRecord.getPreTaskId() != 0) {
DemandTaskDto demandTaskPre = PlayerUtil.getDemandTaskInfo(uid, demandTaskPost.getObject(), postTaskRecord.getPreTaskId());
if (!StringUtils.isEmpty(demandTaskPre)) {
demandTaskPre.setClueSwitch(2);
}
}
String postText = SpeechUtil.getSuccessClueSpeech(uid, player.getPersonMap().get(subjectId), clue);
text += postText;
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(2); //直接操作提醒
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400108);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//任务是本人发布的
if (postTaskRecord.getLevel() == 5) {
subjectId = postTaskRecord.getPersonId(); subjectId = postTaskRecord.getPersonId();
player.setLocation(locationId);
player.setPersonId(subjectId);
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId()); DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, postTaskRecord.getPostTaskId());
String text = "";
if (!StringUtils.isEmpty(demandTask)) { if (!StringUtils.isEmpty(demandTask)) {
text = SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3); text += SpeechUtil.getPreSuccessTaskSpeech(uid, player.getPersonMap().get(subjectId), demandTask, 3);
String[] condition1 = demandTask.getCondition1().split("\\|");
if (!"70043".equals(condition1[0]) && !"71000".equals(condition1[0])) {
//记录本轮的任务数据,用于下轮的二次回复
String unique = uid + player.getGateNo();
ReplyDto reply = new ReplyDto();
reply.setSubjectId(subjectId);
reply.setDemandTaskId(postTaskRecord.getPostTaskId());
reply.setType(3); //执行任务
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
} }
//----------------记录见过的人-------------- //----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId); PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
resultResponse.set反馈ID(400107); resultResponse.set反馈ID(400107);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -258,8 +612,6 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -258,8 +612,6 @@ public class BarrierServiceImpl implements BarrierService {
} }
} }
} }
//获取人物所在场所
locationId = player.getPersonMap().get(subjectId).getLocation();
//跟玩家在同一场所 //跟玩家在同一场所
if (player.getLocation().equals(locationId)) { if (player.getLocation().equals(locationId)) {
player.setPersonId(subjectId); player.setPersonId(subjectId);
...@@ -281,6 +633,10 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -281,6 +633,10 @@ public class BarrierServiceImpl implements BarrierService {
//不在同一场所 //不在同一场所
//判断玩家是否已经获得了该人物的场所线索 //判断玩家是否已经获得了该人物的场所线索
boolean flag = PlayerUtil.checkLocationClue(player.getClueMap(), subjectId); boolean flag = PlayerUtil.checkLocationClue(player.getClueMap(), subjectId);
//没有获得该NPC的场所线索,但是去到某个场所见过该NPC,也可以找到该NPC
if (!flag) {
flag = PlayerUtil.checkHaveMeet(player.getLocationMap(), locationId, subjectId);
}
if (!flag) { if (!flag) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400204); String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400204);
...@@ -294,6 +650,10 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -294,6 +650,10 @@ public class BarrierServiceImpl implements BarrierService {
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
operationReq.setMethodId("4001"); operationReq.setMethodId("4001");
CacheUtil.put(uid, operationReq, Long.parseLong(expireTime)); CacheUtil.put(uid, operationReq, Long.parseLong(expireTime));
//----------------记录见过的人--------------
PlayerUtil.recordClue(uid, subjectId);
//更新该NPC见面次数
PlayerUtil.updateMeetTimes(uid, locationId, subjectId);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400202); String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400202);
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.locationMap.get(locationId).getName()); text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.locationMap.get(locationId).getName());
...@@ -320,6 +680,9 @@ public class BarrierServiceImpl implements BarrierService { ...@@ -320,6 +680,9 @@ public class BarrierServiceImpl implements BarrierService {
PlayerUtil.resetPlayer(uid); PlayerUtil.resetPlayer(uid);
//获取对应话术 //获取对应话术
String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400302); String text = SpeechUtil.getBarrierSpeech(Constants.SPEECH_ASIDE, 400302);
//获取开场白话术
String prologueText = SpeechUtil.getPrologueSpeech(uid, player.getGateNo());
text += prologueText;
resultResponse.set反馈ID(400302); resultResponse.set反馈ID(400302);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
......
...@@ -36,19 +36,32 @@ public class ChatServiceImpl implements ChatService { ...@@ -36,19 +36,32 @@ public class ChatServiceImpl implements ChatService {
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
//对话人的信息 //对话人的信息
Person current = player.getPersonMap().get(player.getPersonId()); Person current = player.getPersonMap().get(player.getPersonId());
//搭档名称
String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
//获取对应话术 //获取对应话术
String text = SpeechUtil.getChatSpeech(uid, current, methodId); String text = SpeechUtil.getChatSpeech(uid, current, methodId);
text = SpeechUtil.addHeader(text, current.getName()); text = SpeechUtil.addHeader(text, current.getName());
//闲聊连续对话次数超过指定次数,任务白名单中有该人已解锁或无需解锁的任务则进行提示 //闲聊连续对话次数超过指定次数,任务白名单中有该人已解锁或无需解锁的任务则进行提示
int chatTimes = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue()); int chatTimes = Integer.parseInt(TimingAcquisition.systemConfigMap.get("chatTimes").getValue());
if (player.getChatTimes() >= chatTimes) { if (player.getChatTimes() >= chatTimes - 1) {
//找到白名单内该人的任务中已解锁或无需解锁的任务 //找到白名单内该人的任务中已解锁或无需解锁的任务
String addText = PlayerUtil.getTipInChat(uid, current); String addText = PlayerUtil.getTipInChat(uid, current);
if (!StringUtils.isEmpty(addText)) { if (!StringUtils.isEmpty(addText)) {
addText = "【寒烟@正常】" + addText; addText = SpeechUtil.addHeader(addText, partnerName);
text += addText; text += addText;
} }
} }
//每轮的第一次进行操作提示
if (player.getChatTimes() == 0) {
//找到操作的提示
String operateText = SpeechUtil.getOperateSpeech(player);
if (!StringUtils.isEmpty(operateText)) {
operateText = SpeechUtil.addHeader(operateText, partnerName);
text += operateText;
}
//更新玩家操作提示的序号
player.setOperateTextNum(player.getOperateTextNum() + 1);
}
resultResponse.set反馈ID(600101); resultResponse.set反馈ID(600101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
......
...@@ -6,4 +6,6 @@ import com.qiwu.inference.dto.response.ResultVarsResponse; ...@@ -6,4 +6,6 @@ import com.qiwu.inference.dto.response.ResultVarsResponse;
public interface CheckService { public interface CheckService {
CommonResult<ResultVarsResponse> check(OperationRequest operationReq); CommonResult<ResultVarsResponse> check(OperationRequest operationReq);
CommonResult<ResultVarsResponse> secondAnswer(OperationRequest operationReq);
} }
...@@ -3,16 +3,17 @@ package com.qiwu.inference.service.check.impl; ...@@ -3,16 +3,17 @@ package com.qiwu.inference.service.check.impl;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
import com.qiwu.inference.common.cache.CacheGlobal;
import com.qiwu.inference.common.utils.*; import com.qiwu.inference.common.utils.*;
import com.qiwu.inference.dto.ClueDto; import com.qiwu.inference.dto.*;
import com.qiwu.inference.dto.Person;
import com.qiwu.inference.dto.Player;
import com.qiwu.inference.dto.request.OperationRequest; import com.qiwu.inference.dto.request.OperationRequest;
import com.qiwu.inference.dto.response.ResultResponse; import com.qiwu.inference.dto.response.ResultResponse;
import com.qiwu.inference.dto.response.ResultVarsResponse; import com.qiwu.inference.dto.response.ResultVarsResponse;
import com.qiwu.inference.service.chat.impl.ChatServiceImpl;
import com.qiwu.inference.service.check.CheckService; import com.qiwu.inference.service.check.CheckService;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
...@@ -22,6 +23,8 @@ import java.util.HashMap; ...@@ -22,6 +23,8 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import static com.qiwu.inference.common.utils.PlayerUtil.addThreshold;
@Service @Service
public class CheckServiceImpl implements CheckService { public class CheckServiceImpl implements CheckService {
private Logger log = LoggerFactory.getLogger(CheckServiceImpl.class); private Logger log = LoggerFactory.getLogger(CheckServiceImpl.class);
...@@ -30,6 +33,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -30,6 +33,9 @@ public class CheckServiceImpl implements CheckService {
@Value("${expireTime}") @Value("${expireTime}")
private String expireTime; private String expireTime;
@Autowired
private ChatServiceImpl chatService;
@Override @Override
public CommonResult<ResultVarsResponse> check(OperationRequest operationReq) { public CommonResult<ResultVarsResponse> check(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse(); ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
...@@ -179,7 +185,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -179,7 +185,7 @@ public class CheckServiceImpl implements CheckService {
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300102); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300102);
text = SpeechUtil.speechReplaceNum(text, subjectName, person.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subjectName, person.getAge().toString(),
(person.getGender() == 1) ? "男" : "女", call, (person.getGender() == 1) ? "男" : "女", call,
person.getTrustDegree().toString(), person.getDeterrenceDegree().toString()); String.valueOf(person.getTrustDegree() - 50), String.valueOf(person.getDeterrenceDegree() - 50));
resultResponse.set反馈ID(300102); resultResponse.set反馈ID(300102);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("查看人物列表2"); resultResponse.set后台附加返回("查看人物列表2");
...@@ -244,7 +250,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -244,7 +250,7 @@ public class CheckServiceImpl implements CheckService {
text = SpeechUtil.speechReplaceNum(text, PlayerUtil.getNameByPersonId(uid, subjectId), clueText.toString()); text = SpeechUtil.speechReplaceNum(text, PlayerUtil.getNameByPersonId(uid, subjectId), clueText.toString());
resultResponse.set反馈ID(300103); resultResponse.set反馈ID(300103);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultResponse.set后台附加返回("查看线索3"); resultResponse.set后台附加返回("查看人物列表3");
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
...@@ -297,6 +303,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -297,6 +303,9 @@ public class CheckServiceImpl implements CheckService {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300501); text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300501);
} else { } else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050101); text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050101);
//搭档名称
String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
text = SpeechUtil.addHeader(text, partnerName);
} }
text = SpeechUtil.speechReplaceNum(text, String.valueOf(clueSize)); text = SpeechUtil.speechReplaceNum(text, String.valueOf(clueSize));
resultResponse.set反馈ID(300501); resultResponse.set反馈ID(300501);
...@@ -363,7 +372,9 @@ public class CheckServiceImpl implements CheckService { ...@@ -363,7 +372,9 @@ public class CheckServiceImpl implements CheckService {
if (clueNumMap.size() == 0) { if (clueNumMap.size() == 0) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050301); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050301);
text = SpeechUtil.speechReplaceNum(text, clueText.toString()); //搭档名称
String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
text = SpeechUtil.addHeader(text, partnerName);
resultResponse.set反馈ID(30050301); resultResponse.set反馈ID(30050301);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -538,9 +549,19 @@ public class CheckServiceImpl implements CheckService { ...@@ -538,9 +549,19 @@ public class CheckServiceImpl implements CheckService {
int index = lastReq.getIndex(); int index = lastReq.getIndex();
String subjectName = TimingAcquisition.getNameByPersonId(uid, lastReq.getSubjectId()); String subjectName = TimingAcquisition.getNameByPersonId(uid, lastReq.getSubjectId());
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506); String text = "";
if (clueList.size() > 1) {
if (index < clueList.size() - 1) {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506);
} else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050607);
}
} else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050606);
}
String addText = SpeechUtil.getSuccessClueOtherSpeech(uid, player.getPersonMap().get(subjectId), clueList.get(index));
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(lastReq.getClueTypeId()), text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(lastReq.getClueTypeId()),
String.valueOf(clueList.size()), String.valueOf(index + 1), clueList.get(index).getClueTemplate()); String.valueOf(clueList.size()), String.valueOf(index + 1), addText);
//保存本轮对话 //保存本轮对话
index = (index + 1) % clueList.size(); index = (index + 1) % clueList.size();
operationReq.setSubjectId(lastReq.getSubjectId()); operationReq.setSubjectId(lastReq.getSubjectId());
...@@ -624,9 +645,15 @@ public class CheckServiceImpl implements CheckService { ...@@ -624,9 +645,15 @@ public class CheckServiceImpl implements CheckService {
List<ClueDto> clueList = player.getClueMap().get(subjectId).get(clueTypeId); List<ClueDto> clueList = player.getClueMap().get(subjectId).get(clueTypeId);
int index = 0; int index = 0;
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506); String text = "";
if (clueList.size() > 1) {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 300506);
} else {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 30050606);
}
String addText = SpeechUtil.getSuccessClueOtherSpeech(uid, player.getPersonMap().get(subjectId), clueList.get(index));
text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(clueTypeId), text = SpeechUtil.speechReplaceNum(text, subjectName, TimingAcquisition.clueTypeMap.get(clueTypeId),
String.valueOf(clueList.size()), String.valueOf(index + 1), clueList.get(index).getClueTemplate()); String.valueOf(clueList.size()), String.valueOf(index + 1), addText);
//保存本轮对话 //保存本轮对话
index = (index + 1) % clueList.size(); index = (index + 1) % clueList.size();
operationReq.setSubjectId(subjectId); operationReq.setSubjectId(subjectId);
...@@ -643,10 +670,17 @@ public class CheckServiceImpl implements CheckService { ...@@ -643,10 +670,17 @@ public class CheckServiceImpl implements CheckService {
} }
//查看某人的模糊操作 //查看某人的模糊操作
if ("3101".equals(methodId)) { if ("3101".equals(methodId)) {
//询问对象为对话人
if(StringUtils.isEmpty(subjectId)){
subjectId = player.getPersonId();
}
//搭档名称
String partnerName = TimingAcquisition.systemConfigMap.get("partnerName").getValue();
//没有提供人物名称 //没有提供人物名称
if (StringUtils.isEmpty(subjectId)) { if (StringUtils.isEmpty(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310101); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310101);
text = SpeechUtil.replaceHeader(text, partnerName);
resultResponse.set反馈ID(310101); resultResponse.set反馈ID(310101);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -656,6 +690,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -656,6 +690,7 @@ public class CheckServiceImpl implements CheckService {
if (subjectId == Constants.REQ_NON) { if (subjectId == Constants.REQ_NON) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310102); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310102);
text = SpeechUtil.replaceHeader(text, partnerName);
resultResponse.set反馈ID(310102); resultResponse.set反馈ID(310102);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -688,6 +723,7 @@ public class CheckServiceImpl implements CheckService { ...@@ -688,6 +723,7 @@ public class CheckServiceImpl implements CheckService {
if (!personList.contains(subjectId)) { if (!personList.contains(subjectId)) {
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310103); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310103);
text = SpeechUtil.replaceHeader(text, partnerName);
text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(),
(subject.getGender() == 1) ? "男" : "女", subject.getIdentityName()); (subject.getGender() == 1) ? "男" : "女", subject.getIdentityName());
resultResponse.set反馈ID(310103); resultResponse.set反馈ID(310103);
...@@ -698,9 +734,10 @@ public class CheckServiceImpl implements CheckService { ...@@ -698,9 +734,10 @@ public class CheckServiceImpl implements CheckService {
String call = (subject.getGender() == 1) ? "他" : "她"; String call = (subject.getGender() == 1) ? "他" : "她";
//获取对应话术 //获取对应话术
String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310104); String text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 310104);
text = SpeechUtil.replaceHeader(text, partnerName);
text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(), text = SpeechUtil.speechReplaceNum(text, subject.getName(), subject.getAge().toString(),
(subject.getGender() == 1) ? "男" : "女", subject.getIdentityName(), call, (subject.getGender() == 1) ? "男" : "女", subject.getIdentityName(), call,
subject.getTrustDegree().toString(), subject.getDeterrenceDegree().toString()); String.valueOf(subject.getTrustDegree() - 50), String.valueOf(subject.getDeterrenceDegree() - 50));
resultResponse.set反馈ID(310104); resultResponse.set反馈ID(310104);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
...@@ -714,4 +751,169 @@ public class CheckServiceImpl implements CheckService { ...@@ -714,4 +751,169 @@ public class CheckServiceImpl implements CheckService {
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
@Override
public CommonResult<ResultVarsResponse> secondAnswer(OperationRequest operationReq) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid();
String methodId = operationReq.getMethodId(); //方法编号
String gateNo = TimingAcquisition.playerMap.get(uid).getGateNo(); //关卡编号
String unique = uid + gateNo; //用户uid和关卡编号组成唯一标识
Player player = TimingAcquisition.playerMap.get(uid);
String currentName = TimingAcquisition.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
//当前玩家上一轮保存的数据
ReplyDto reply = (ReplyDto) CacheUtil.get(unique);
//走闲聊
if (StringUtils.isEmpty(reply)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
//当前对话的人物
Person current = player.getPersonMap().get(player.getPersonId());
Integer subjectId = reply.getSubjectId();
Integer demandTaskId = reply.getDemandTaskId();
int type = reply.getType(); //响应方式
//找到对应任务
DemandTaskDto demandTask = PlayerUtil.getDemandTaskById(uid, subjectId, demandTaskId);
Person subject = player.getPersonMap().get(subjectId);
//走闲聊
if (StringUtils.isEmpty(demandTask)) {
operationReq.setMethodId("9001");
return chatService.operate(operationReq);
}
String text = "";
//确定
if ("001".equals(methodId)) {
//闲聊的二次回复提示玩家他人线索
if (type == 1) {
ClueDto clue = PlayerUtil.getClueById(uid, subjectId, demandTask.getClueId());
if (!StringUtils.isEmpty(clue)) {
text = SpeechUtil.getSuccessClueOtherSpeech(uid, current, clue);
text = SpeechUtil.addHeader(text, currentName);
//保存上轮数据
CacheUtil.put(unique, reply, Long.parseLong(expireTime));
}
}
//发布任务后提示对应文本
if (type == 2) {
text = SpeechUtil.getSuccessTaskReplySpeech(uid, current, demandTask, reply);
}
//询问任务进度,之后执行操作
if (type == 3) {
if (demandTask.getClueSwitch() != 1) {
String[] condition1 = demandTask.getCondition1().split("\\|");
log.info(uid + "执行的任务id:" + demandTaskId + ",条件1:" + demandTask.getCondition1());
String method = String.valueOf(Integer.parseInt(condition1[0]) - 68002);
//条件判断
// 1. 判断是否符合阈值需求
boolean flag = PlayerUtil.checkThreshold(demandTask, subject);
//不符合阈值需求
if (!flag) {
int feedBackId = Integer.parseInt(method + "04");
log.info(uid + "二次回复的反馈id:" + feedBackId);
//获取对应话术
text = SpeechUtil.getTaskSpeech(Constants.SPEECH_PERSON, 210204);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, Map<Integer, Integer>> taskMap = player.getTaskMap();
//2.符合阈值需求,判断是否完成前置任务
if (taskMap.containsKey(subjectId)) {
Map<Integer, Integer> subjectMap = taskMap.get(subjectId);
if (subjectMap.containsKey(demandTask.getDemandTaskId())) {
int num = subjectMap.get(demandTask.getDemandTaskId());
Integer objectId = demandTask.getObject();
//符合阈值需求,已达次数上限
if (num >= demandTask.getEffectiveDegree()) {
int feedBackId = Integer.parseInt(method + "02");
log.info(uid + "二次回复的反馈id:" + feedBackId);
//获取对应话术
text = SpeechUtil.getTaskSpeech(Constants.SPEECH_PERSON, 210202);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Map<Integer, Integer> objectMap = taskMap.get(objectId);
if (objectMap.containsKey(Integer.parseInt(demandTask.getPostTask()))) {
int feedBackId = Integer.parseInt(method + "01");
log.info(uid + "二次回复的反馈id:" + feedBackId);
subjectMap.put(demandTask.getDemandTaskId(), num + 1);
addThreshold(subject, demandTask);
//增加声望值
PlayerUtil.updateReputation(player, demandTask.getReputation());
//获取对应话术
text = SpeechUtil.getSuccessTaskSpeech(uid, subject, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
//符合阈值需求,前置任务没有完成
int feedBackId = Integer.parseInt(method + "03");
log.info(uid + "二次回复的反馈id:" + feedBackId);
//获取对应话术
text = SpeechUtil.getTaskSpeech(Constants.SPEECH_PERSON, 210203);
text = SpeechUtil.replaceHeader(text, subject.getName());
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
Integer objectId = demandTask.getObject();
Map<Integer, Integer> objectMap = taskMap.get(objectId);
if (!StringUtils.isEmpty(demandTask.getPostTask()) && !StringUtils.isEmpty(objectMap)) {
if (objectMap.containsKey(Integer.parseInt(demandTask.getPostTask()))) {
int feedBackId = Integer.parseInt(method + "01");
log.info(uid + "二次回复的反馈id:" + feedBackId);
subjectMap.put(demandTask.getDemandTaskId(), 1);
addThreshold(subject, demandTask);
//增加声望值
PlayerUtil.updateReputation(player, demandTask.getReputation());
//清除缓存
CacheGlobal.concurrentMap.remove(unique);
//获取对应话术
text = SpeechUtil.getSuccessTaskSpeech(uid, subject, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
//符合阈值需求,前置任务没有完成
int feedBackId = Integer.parseInt(method + "03");
log.info(uid + "二次回复的反馈id:" + feedBackId);
//获取对应话术
text = SpeechUtil.getTaskSpeech(Constants.SPEECH_PERSON, 210203);
text = SpeechUtil.replaceHeader(text, subject.getName());
text = SpeechUtil.speechReplaceValue(uid, text, subject, demandTask);
resultResponse.set反馈ID(feedBackId);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
}
}
//自身线索提示对应文本
if (type == 4) {
text = SpeechUtil.getTipReplySpeech(uid, demandTask, 0, 2, reply);
}
}
//否定
if ("002".equals(methodId)) {
text = SpeechUtil.getCheckSpeech(Constants.SPEECH_ASIDE, 3007);
}
resultResponse.set反馈ID(300001);
resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
} }
...@@ -52,6 +52,8 @@ public class CommonService { ...@@ -52,6 +52,8 @@ public class CommonService {
case "1028": case "1028":
case "1029": case "1029":
return playerService.askPrompt(request); return playerService.askPrompt(request);
case "1030":
return playerService.askFinalClue(request);
case "2001": case "2001":
case "2003": case "2003":
case "2002": case "2002":
...@@ -93,6 +95,7 @@ public class CommonService { ...@@ -93,6 +95,7 @@ public class CommonService {
case "2039": case "2039":
case "2040": case "2040":
case "2041": case "2041":
case "2042":
case "2101": case "2101":
case "2102": case "2102":
case "2104": case "2104":
...@@ -100,6 +103,13 @@ public class CommonService { ...@@ -100,6 +103,13 @@ public class CommonService {
case "2107": case "2107":
case "2108": case "2108":
case "2109": case "2109":
case "2043":
case "204301":
case "204302":
case "204303":
case "204304":
case "204305":
case "2044":
return playerService.performTask(request); return playerService.performTask(request);
} }
return null; return null;
......
...@@ -9,4 +9,6 @@ public interface LoginService { ...@@ -9,4 +9,6 @@ public interface LoginService {
CommonResult<ResultVarsResponse> login(String uid); CommonResult<ResultVarsResponse> login(String uid);
CommonResult<ResultVarsResponse> startGame(OperationRequest operationReq); CommonResult<ResultVarsResponse> startGame(OperationRequest operationReq);
CommonResult<ResultVarsResponse> loadPlayerData(String uid);
} }
...@@ -2,6 +2,7 @@ package com.qiwu.inference.service.login.impl; ...@@ -2,6 +2,7 @@ package com.qiwu.inference.service.login.impl;
import cn.hutool.core.lang.UUID; import cn.hutool.core.lang.UUID;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.TypeReference;
import com.qiwu.inference.common.Constants; import com.qiwu.inference.common.Constants;
import com.qiwu.inference.common.TimingAcquisition; import com.qiwu.inference.common.TimingAcquisition;
import com.qiwu.inference.common.api.CommonResult; import com.qiwu.inference.common.api.CommonResult;
...@@ -22,6 +23,8 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -22,6 +23,8 @@ import java.util.concurrent.ConcurrentHashMap;
@Service @Service
public class LoginServiceImpl implements LoginService { public class LoginServiceImpl implements LoginService {
@Value("${offlineTime}")
private String offlineTime;
//从yml配置文件中取出对话过期时间 //从yml配置文件中取出对话过期时间
@Value("${expireTime}") @Value("${expireTime}")
private String expireTime; private String expireTime;
...@@ -49,14 +52,17 @@ public class LoginServiceImpl implements LoginService { ...@@ -49,14 +52,17 @@ public class LoginServiceImpl implements LoginService {
Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>(); Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>();
Map<Integer,Person> personMapCopy = new HashMap<>(); Map<Integer,Person> personMapCopy = new HashMap<>();
Map<String,Integer> name2IdMapCopy = new HashMap<>(); Map<String,Integer> name2IdMapCopy = new HashMap<>();
Map<Integer, String> id2NameMapCopy = new HashMap<>();
for (Person person : personCopyList) { for (Person person : personCopyList) {
taskMapCopy.put(person.getId(), new HashMap<>()); taskMapCopy.put(person.getId(), new HashMap<>());
personMapCopy.put(person.getId(), person); personMapCopy.put(person.getId(), person);
name2IdMapCopy.put(person.getName(), person.getId()); name2IdMapCopy.put(person.getName(), person.getId());
id2NameMapCopy.put(person.getId(), person.getName());
} }
player.setTaskMap(taskMapCopy); player.setTaskMap(taskMapCopy);
player.setPersonMap(personMapCopy); player.setPersonMap(personMapCopy);
player.setName2IdMap(name2IdMapCopy); player.setName2IdMap(name2IdMapCopy);
player.setId2NameMap(id2NameMapCopy);
//给玩家分配场所和对话人物 //给玩家分配场所和对话人物
Map<String, List<Integer>> locationPersonMap = new HashMap<>(); Map<String, List<Integer>> locationPersonMap = new HashMap<>();
Map<Integer, Person> personMap = player.getPersonMap(); Map<Integer, Person> personMap = player.getPersonMap();
...@@ -95,6 +101,12 @@ public class LoginServiceImpl implements LoginService { ...@@ -95,6 +101,12 @@ public class LoginServiceImpl implements LoginService {
PersistenceUtil.saveDataToFile(userFilePath, uid, playerStr); PersistenceUtil.saveDataToFile(userFilePath, uid, playerStr);
sidGateNoMap.put(uid, player.getGateNo()); sidGateNoMap.put(uid, player.getGateNo());
TimingAcquisition.uidGateNoMap.putAll(sidGateNoMap); TimingAcquisition.uidGateNoMap.putAll(sidGateNoMap);
//保存所有玩家的uid
TimingAcquisition.uidList.add(uid);
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = uid + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
resultResponse.set反馈ID(100000); resultResponse.set反馈ID(100000);
resultResponse.set反馈文本("登录成功"); resultResponse.set反馈文本("登录成功");
...@@ -108,7 +120,6 @@ public class LoginServiceImpl implements LoginService { ...@@ -108,7 +120,6 @@ public class LoginServiceImpl implements LoginService {
ResultResponse resultResponse = new ResultResponse(); ResultResponse resultResponse = new ResultResponse();
String uid = operationReq.getUid(); String uid = operationReq.getUid();
String text = "";
Player player = TimingAcquisition.playerMap.get(uid); Player player = TimingAcquisition.playerMap.get(uid);
//数据重置 //数据重置
if (player.getFinished() == 1) { if (player.getFinished() == 1) {
...@@ -122,15 +133,17 @@ public class LoginServiceImpl implements LoginService { ...@@ -122,15 +133,17 @@ public class LoginServiceImpl implements LoginService {
Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>(); Map<Integer,Map<Integer,Integer>> taskMapCopy = new HashMap<>();
Map<Integer,Person> personMapCopy = new HashMap<>(); Map<Integer,Person> personMapCopy = new HashMap<>();
Map<String,Integer> name2IdMapCopy = new HashMap<>(); Map<String,Integer> name2IdMapCopy = new HashMap<>();
Map<Integer, String> id2NameMapCopy = new HashMap<>();
for (Person person : personCopyList) { for (Person person : personCopyList) {
taskMapCopy.put(person.getId(), new HashMap<>()); taskMapCopy.put(person.getId(), new HashMap<>());
personMapCopy.put(person.getId(), person); personMapCopy.put(person.getId(), person);
name2IdMapCopy.put(person.getName(), person.getId()); name2IdMapCopy.put(person.getName(), person.getId());
id2NameMapCopy.put(person.getId(), person.getName());
} }
player.setTaskMap(taskMapCopy); player.setTaskMap(taskMapCopy);
player.setPersonMap(personMapCopy); player.setPersonMap(personMapCopy);
player.setName2IdMap(name2IdMapCopy); player.setName2IdMap(name2IdMapCopy);
player.setCurrency(3000.0); player.setId2NameMap(id2NameMapCopy);
//给玩家分配场所和对话人物 //给玩家分配场所和对话人物
Map<String, List<Integer>> locationPersonMap = new HashMap<>(); Map<String, List<Integer>> locationPersonMap = new HashMap<>();
Map<Integer, Person> personMap = player.getPersonMap(); Map<Integer, Person> personMap = player.getPersonMap();
...@@ -161,29 +174,42 @@ public class LoginServiceImpl implements LoginService { ...@@ -161,29 +174,42 @@ public class LoginServiceImpl implements LoginService {
//生成场所表,包含场所隐藏状态和必现场所 //生成场所表,包含场所隐藏状态和必现场所
Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(locationPersonMap); Map<String, LocationInfoDto> locationMap = PlayerUtil.makeLocationMap(locationPersonMap);
player.setLocationMap(locationMap); player.setLocationMap(locationMap);
player.setCurrency(3000.0);
player.setPoint(0);
player.setClueMap(new HashMap<>());
player.setFinishedTaskNum(0);
player.setTipFlag(false);
player.setOperateTextNum(1);
player.setAskAndNumMap(new HashMap<>());
player.setFinished(0);
} }
//关卡编号 //关卡编号
String gateNo = player.getGateNo(); String gateNo = player.getGateNo();
int size = TimingAcquisition.barrierTaskKeyMap.get(gateNo).size(); //获取开场白话术
Integer demandTaskId = TimingAcquisition.barrierTaskKeyMap.get(gateNo).get(size - 1).getDemandTaskId(); String text = SpeechUtil.getPrologueSpeech(uid, gateNo);
Map<Integer, EndGoal> endGoalMap = TimingAcquisition.endGoalMap;
for (Map.Entry<Integer, EndGoal> entry : endGoalMap.entrySet()) {
EndGoal endGoal = entry.getValue();
List<String> associatedTaskIds = Arrays.asList(endGoal.getAssociatedTaskId().split("\\|"));
if (associatedTaskIds.contains(demandTaskId.toString())) {
text = "【旁白@正常】" + endGoal.getName();
text += "【旁白@正常】" + endGoal.getDescription();
text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103001);
text += SpeechUtil.getAskSpeech(Constants.SPEECH_PERSON, 103002);
String location = TimingAcquisition.locationMap.get(TimingAcquisition.playerMap.get(uid).getLocation()).getName();
String name = PlayerUtil.getNameByPersonId(uid, TimingAcquisition.playerMap.get(uid).getPersonId());
text = SpeechUtil.speechReplaceNum(text, location, name);
break;
}
}
resultResponse.set反馈ID(100009); resultResponse.set反馈ID(100009);
resultResponse.set反馈文本(text); resultResponse.set反馈文本(text);
resultVarsResponse.setVars(resultResponse); resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse); return CommonResult.success(resultVarsResponse);
} }
@Override
public CommonResult<ResultVarsResponse> loadPlayerData(String uid) {
ResultVarsResponse resultVarsResponse = new ResultVarsResponse();
ResultResponse resultResponse = new ResultResponse();
String playStr = PersistenceUtil.loadPlayerData(userFilePath, uid);
Player player = JSON.parseObject(playStr, new TypeReference<Player>(){});
player.setOnlineTime(DateUtil.getCurrentTime());
player.setStatus(Constants.ONLINE);
TimingAcquisition.playerMap.put(uid, player);
//该玩家以唯一标识加入全局缓存,用于玩家离线判断
String uniqueUid = uid + "%#%online%#%";
CacheUtil.put(uniqueUid, "", Long.parseLong(offlineTime));
resultResponse.set反馈ID(100010);
resultResponse.set反馈文本(uid + "的数据加载完成");
resultVarsResponse.setVars(resultResponse);
return CommonResult.success(resultVarsResponse);
}
} }
...@@ -54,6 +54,13 @@ public interface PlayerService { ...@@ -54,6 +54,13 @@ public interface PlayerService {
public CommonResult<ResultVarsResponse> askPrompt(OperationRequest request); public CommonResult<ResultVarsResponse> askPrompt(OperationRequest request);
/** /**
* 询问最终线索
* @param request
* @return
*/
public CommonResult<ResultVarsResponse> askFinalClue(OperationRequest request);
/**
* 执行任务 * 执行任务
* @param request * @param request
* @return * @return
......
This source diff could not be displayed because it is too large. You can view the blob instead.
server:
port: 60019
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_brick?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
speechFilePath: /home/jiaoyou/projects/inferenceBrick/speech/
configFilePath: /home/jiaoyou/projects/inferenceBrick/config/
userFilePath: /home/jiaoyou/projects/inferenceBrick/user/
server:
port: 60020
serlvet:
context-type:/inference
#设置当前服务名
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root
password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource
druid:
initial-size: 5
min-idle: 5
max-active: 20
max-wait: 60000
#配置间隔多久才进行一次检测,检测需要关闭的空闲连接
time-between-eviction-runs-millis: 20000
#配置一个连接在池中最小生存的时间
min-evictable-idle-time-millis: 300000
#对话过期时间
expireTime: 180000
#玩家无操作时长,默认下线
offlineTime: 180000
speechFilePath: /home/jiaoyou/projects/inferenceReflection/speech/
configFilePath: /home/jiaoyou/projects/inferenceReflection/config/
userFilePath: /home/jiaoyou/projects/inferenceReflection/user/
...@@ -7,7 +7,7 @@ server: ...@@ -7,7 +7,7 @@ server:
spring: spring:
datasource: datasource:
driver-class-name: com.mysql.cj.jdbc.Driver driver-class-name: com.mysql.cj.jdbc.Driver
url: jdbc:mysql://localhost:3306/inference_game?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC url: jdbc:mysql://localhost:3306/inference_reflection?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
username: root username: root
password: dgKNTmt2iLHNjEQajkDEZkq8 password: dgKNTmt2iLHNjEQajkDEZkq8
type: com.alibaba.druid.pool.DruidDataSource type: com.alibaba.druid.pool.DruidDataSource
......
spring: spring:
profiles: profiles:
active: pro active: dev
\ No newline at end of file \ No newline at end of file
...@@ -20,142 +20,143 @@ aside: ...@@ -20,142 +20,143 @@ aside:
100101: 100101:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
100102: 100102:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100103: 100103:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
100104: 100104:
- 【旁白@正常】 - 【旁白@正常】
100105: 100105:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100106: 100106:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1002: 询问A是否是某个性格 #1002: 询问A是否是某个性格
100203: 100203:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100204: 100204:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1003: 询问A和B是什么关系 #1003: 询问A和B是什么关系
100302: 100302:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100303: 100303:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1004: 询问A和B是不是某个关系 #1004: 询问A和B是不是某个关系
100403: 100403:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100404: 100404:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1005: 询问和A有某个关系的人是谁 #1005: 询问和A有某个关系的人是谁
100502: 100502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100503: 100503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1006: 询问谁和谁有某个关系 #1006: 询问谁和谁有某个关系
100602: 100602:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100603: 100603:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1007: 询问A有过什么行为 #1007: 询问A有过什么行为
100702: 100702:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100703: 100703:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1008: 询问A和B有什么行为 #1008: 询问A和B有什么行为
100802: 100802:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100803: 100803:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1009: 询问A和谁有了某个行为 #1009: 询问A和谁有了某个行为
100902: 100902:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100903: 100903:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1010: 询问A有没有发生过某个行为 #1010: 询问A有没有发生过某个行为
101003: 101003:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101004: 101004:
- 【旁白@正常】 - 【旁白@正常】
#1011: 询问A和B有没有发生过某个行为 #1011: 询问A和B有没有发生过某个行为
101103: 101103:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101104: 101104:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1012: 询问A知道/看见了B和C的什么行为 #1012: 询问A知道/看见了B和C的什么行为
101202: 101202:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101203: 101203:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1013: 询问A有没有看到B和C发生了某个行为 #1013: 询问A有没有看到B和C发生了某个行为
101303: 101303:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101304: 101304:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1014: 询问A知道什么行为事件 #1014: 询问A知道什么行为事件
101402: 101402:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101403: 101403:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1015: 询问A的提升信任度任务 #1015: 询问A的提升信任度任务
101502: 101502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101503: 101503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1016: 询问A的提升威慑度任务 #1016: 询问A的提升威慑度任务
101602: 101602:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101603: 101603:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1017: 询问A是否有某个提升信任度的任务 #1017: 询问A是否有某个提升信任度的任务
101702: 101702:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101703: 101703:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1018: 询问A是否有某个提升威慑度的任务 #1018: 询问A是否有某个提升威慑度的任务
101803: 101803:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101804: 101804:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1019: 询问A降低信任度的任务 #1019: 询问A降低信任度的任务
101902: 101902:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101903: 101903:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1020: 询问A降低威慑度的任务 #1020: 询问A降低威慑度的任务
102002: 102002:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102003: 102003:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1021: 询问A是否有某个降低信任度的任务 #1021: 询问A是否有某个降低信任度的任务
102103: 102103:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102104: 102104:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道。
#1022: 询问A是否有某个降低威慑度的任务 #1022: 询问A是否有某个降低威慑度的任务
102203: 102203:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102204: 102204:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1023: 询问A是什么身份 #1023: 询问A是什么身份
102301: 102301:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
102302: 102302:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102303: 102303:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1024: 询问A是不是某个身份 #1024: 询问A是不是某个身份
102401: 102401:
- 【旁白@正常】【1】。 - 【旁白@正常】【1】。
102402: 102402:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102403: 102403:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1025: 询问A在哪个场所 #1025: 询问A在哪个场所
102502: 102502:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102503: 102503:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
#1026: 询问A是不是在某个场所 #1026: 询问A是不是在某个场所
102603: 102603:
- 【旁白@正常】我又不认识你,为什么要告诉你? - 【旁白@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102604: 102604:
- 【旁白@正常】不好意思,我不知道 - 【旁白@正常】不好意思,我不知道
...@@ -169,11 +170,13 @@ person: ...@@ -169,11 +170,13 @@ person:
100101: 100101:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100102: 100102:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
10010201: 10010201:
- 【人物名称@正常】我又不认识你,为什么要告诉你关于我的事。 - 【人物名称@正常】凭你我目前的交情,为什么要告诉你关于我的事。你问问别人去吧。
100103: 100103:
- 【人物名称@正常】不好意思,我不知道【1】的性格。 - 【人物名称@正常】不好意思,我不知道【1】的性格。
10010301:
- 【人物名称@正常】不好意思,我不知道【1】的爱好。
100104: 100104:
- 【人物名称@正常】 - 【人物名称@正常】
100105: 100105:
...@@ -184,217 +187,286 @@ person: ...@@ -184,217 +187,286 @@ person:
100201: 100201:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
100202: 100202:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
100203: 100203:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
10020301: 10020301:
- 【人物名称@正常】我又不认识你,为什么要告诉你我的事? - 【人物名称@正常】凭你我目前的交情,为什么要告诉你我的事?你问问别人去吧。
100204: 100204:
- 【人物名称@正常】不好意思,我不知道【1】的性格。 - 【人物名称@正常】不好意思,我不知道【1】的性格。
#1003: 询问A和B是什么关系 #1003: 询问A和B是什么关系
100301: 100301:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100302: 100302:
- 【人物名称@正常】我又不认识你,为什么要告诉你他们的关系? - 【人物名称@正常】凭你我目前的交情,为什么要告诉你他们的关系?你问问别人去吧。
10030201: 10030201:
- 【人物名称@正常】我又不认识你,为什么要告诉你我们的关系? - 【人物名称@正常】凭你我目前的交情,为什么要告诉你我们的关系?你问问别人去吧。
100303: 100303:
- 【人物名称@正常】不好意思,我不知道他们的关系。 - 【人物名称@正常】不好意思,我不知道他们的关系。
10030301: 10030301:
- 【人物名称@正常】【1】吗?我好像不认识这个人啊 - 【人物名称@正常】你这样问,我也不好回答啊。
#1004: 询问A和B是不是某个关系 #1004: 询问A和B是不是某个关系
100401: 100401:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
100402: 100402:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
100403: 100403:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100404: 100404:
- 【人物名称@正常】不好意思,我不知道他们的关系。 - 【人物名称@正常】不好意思,我不知道他们的关系。
#1005: 询问和A有某个关系的人是谁 #1005: 询问和A有某个关系的人是谁
100501: 100501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100502: 100502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100503: 100503:
- 【人物名称@正常】不好意思,我不知道【1】【2】是谁。 - 【人物名称@正常】不好意思,我不知道【1】和谁有【2】关系。
#1006: 询问谁和谁有某个关系 #1006: 询问谁和谁有某个关系
100601: 100601:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100602: 100602:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100603: 100603:
- 【人物名称@正常】不好意思,我不知道有【1】关系的人。 - 【人物名称@正常】不好意思,我不知道有【1】关系的人。
#1007: 询问A有过什么行为 #1007: 询问A有过什么行为
100701: 100701:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100702: 100702:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100703: 100703:
- 【人物名称@正常】不好意思,我不知道【1】干过什么。 - 【人物名称@正常】不好意思,我不知道【1】干过什么。
#1008: 询问A和B有什么行为 #1008: 询问A和B有什么行为
100801: 100801:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100802: 100802:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100803: 100803:
- 【人物名称@正常】不好意思,我不知道他们干过什么。 - 【人物名称@正常】不好意思,我不知道他们干过什么。
#1009: 询问A和谁有了某个行为 #1009: 询问A和谁有了某个行为
100901: 100901:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
100902: 100902:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
100903: 100903:
- 【人物名称@正常】不好意思,我不知道【1】和谁【2】了。 - 【人物名称@正常】不好意思,我不知道【1】和谁【2】了。
#1010: 询问A有没有发生过某个行为 #1010: 询问A有没有发生过某个行为
101001: 101001:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101002: 101002:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101003: 101003:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101004: 101004:
- 【人物名称@正常】不好意思,我不知道【1】有没有【2】过。 - 【人物名称@正常】不好意思,我不知道【1】有没有【2】过。
#1011: 询问A和B有没有发生过某个行为 #1011: 询问A和B有没有发生过某个行为
101101: 101101:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101102: 101102:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101103: 101103:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101104: 101104:
- 【人物名称@正常】不好意思,我不知道他们有没有【1】过。 - 【人物名称@正常】不好意思,我不知道他们有没有【1】过。
#1012: 询问A知道/看见了B和C的什么行为 #1012: 询问A知道/看见了B和C的什么行为
101201: 101201:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101202: 101202:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101203: 101203:
- 【人物名称@正常】不好意思,我不知道。 - 【人物名称@正常】不好意思,我不知道。
#1013: 询问A有没有看到B和C发生了某个行为 #1013: 询问A有没有看到B和C发生了某个行为
101301: 101301:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101302: 101302:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101303: 101303:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101304: 101304:
- 【人物名称@正常】不好意思,我不知道 - 【人物名称@正常】不好意思,我不知道
#1014: 询问A知道什么行为事件 #1014: 询问A知道什么行为事件
101401: 101401:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101402: 101402:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101403: 101403:
- 【人物名称@正常】不好意思,我不知道【1】。 - 【人物名称@正常】不好意思,我不知道【1】。
#1015: 询问A的提升信任度任务 #1015: 询问A的提升信任度任务
101501: 101501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101502: 101502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101503: 101503:
- 【人物名称@正常】你想知道的我都已经告诉过你了。 - 【人物名称@正常】你想知道的我都已经告诉过你了。
101504: 101504:
- 【人物名称@正常】不好意思,我不知道【1】想干什么。 - 【人物名称@正常】不好意思,我不知道【1】想干什么。
101505:
- 【人物名称@正常】我正有事相求。不过我现在正忙,你晚点再来吧。
【寒烟@正常】少爷,我们先出去晃一晃再回来吧。
- 【人物名称@正常】有的,我现在没空,你等下再来找我一次吧。
【寒烟@正常】少爷,我们先出去晃一晃再回来吧。
- 【人物名称@正常】我有预感,下次见面会有事相求。
【寒烟@正常】少爷,我们下次再来找【1】吧。
- 【人物名称@正常】有的,我现在没空,你等下再来找我吧。
【寒烟@正常】少爷,我们过会儿再来找【1】吧。
101506:
- 【人物名称@正常】没有,我没什么可说的了。
101507:
- 【人物名称@正常】【1】偶尔会遇到麻烦,说不定下次你就遇上了。
【寒烟@正常】少爷,我们有空去找【1】碰碰运气吧。
- 【人物名称@正常】【1】经常有事需要求人帮忙,你下次可以去找【1】看看。
【寒烟@正常】少爷,我们下次去找【1】看看能不能遇上吧。
#1016: 询问A的提升威慑度任务 #1016: 询问A的提升威慑度任务
101601: 101601:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101602: 101602:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101603: 101603:
- 【人物名称@正常】不好意思,我不知道【1】怕什么。 - 【人物名称@正常】不好意思,我不知道【1】怕什么。
101604:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101605:
- 【人物名称@正常】你问这个是什么用意?小心我报官啊。
101606:
- 【人物名称@正常】哎哟,肚子突然疼起来了。你过一刻钟再来,我告诉你。
【寒烟@正常】少爷,我们先出去晃一晃再回来吧。
- 【人物名称@正常】我左眼跳得厉害,下次相见会有事发生。
【寒烟@正常】少爷,我们下次再来找【1】吧。
- 【人物名称@正常】我有预感,下次见面,怕是有事发生。
【寒烟@正常】少爷,我们先出去晃一晃再回来吧。
- 【人物名称@正常】你问这个想干啥?
【寒烟@正常】少爷,我觉得我们下次来找【1】会有事情发生。
101607:
- 【人物名称@正常】【1】有时会惹出麻烦,说不定你下次去找【1】就遇上了。
【寒烟@正常】少爷,我们下次去找【1】看看能不能遇上吧。
- 【人物名称@正常】【1】有时神神秘秘,去找【1】说不定就撞破了。
【寒烟@正常】少爷,我们有空去找【1】碰碰运气吧。
#1017: 询问A是否有某个提升信任度的任务 #1017: 询问A是否有某个提升信任度的任务
101701: 101701:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101702: 101702:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101703: 101703:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101704: 101704:
- 【人物名称@正常】不好意思,我不知道可不可以。 - 【人物名称@正常】不好意思,我不知道可不可以。
101705:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
#1018: 询问A是否有某个提升威慑度的任务 #1018: 询问A是否有某个提升威慑度的任务
101801: 101801:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
101802: 101802:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
101803: 101803:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101804: 101804:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会怕你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会怕你。
101805:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101806:
- 【人物名称@正常】你别没事找事,我可不怕你。
#1019: 询问A降低信任度的任务 #1019: 询问A降低信任度的任务
101901: 101901:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
101902: 101902:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
101903: 101903:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。
101904:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
101905:
- 【人物名称@正常】别这样问我,我们关系还不错吧,又不讨厌你。
#1020: 询问A降低威慑度的任务 #1020: 询问A降低威慑度的任务
102001: 102001:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102002: 102002:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102003: 102003:
- 【人物名称@正常】不好意思,我不知道【1】会不会对你改观。 - 【人物名称@正常】不好意思,我不知道【1】会不会对你改观。
102004:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102005:
- 【人物名称@正常】没用的,我们关系暂时就这样了。
#1021: 询问A是否有某个降低信任度的任务 #1021: 询问A是否有某个降低信任度的任务
102101: 102101:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102102: 102102:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102103: 102103:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102104: 102104:
- 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。 - 【人物名称@正常】不好意思,我不知道这样【1】会不会不喜欢你。
102105:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102106:
- 【人物名称@正常】没有,你人挺好的。
#1022: 询问A是否有某个降低威慑度的任务 #1022: 询问A是否有某个降低威慑度的任务
102201: 102201:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102202: 102202:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102203: 102203:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102204: 102204:
- 【人物名称@正常】不好意思,我不知道能不能让【1】不讨厌你。 - 【人物名称@正常】不好意思,我不知道能不能让【1】不讨厌你。
102205:
- 【人物名称@正常】你想知道的我都已经告诉过你了。
102206:
- 【人物名称@正常】我现在暂时还不想理你,别问了。
#1023: 询问A是什么身份 #1023: 询问A是什么身份
102301: 102301:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102302: 102302:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102303: 102303:
- 【人物名称@正常】不好意思,我不知道【1】的身份。 - 【人物名称@正常】不好意思,我不知道【1】的身份。
#1024: 询问A是不是某个身份 #1024: 询问A是不是某个身份
102401: 102401:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102402: 102402:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102403: 102403:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102404: 102404:
- 【人物名称@正常】不好意思,我不知道是不是【1】。 - 【人物名称@正常】不好意思,我不知道是不是【1】。
#1025: 询问A在哪个场所 #1025: 询问A在哪个场所
102501: 102501:
- 【人物名称@正常】【1】 - 【人物名称@正常】【1】
102502: 102502:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102503: 102503:
- 【人物名称@正常】不好意思,我不知道【1】在哪。 - 【人物名称@正常】不好意思,我不知道【1】在哪。
102504:
- 【人物名称@正常】我不就在【1】吗。
#1026: 询问A是不是在某个场所 #1026: 询问A是不是在某个场所
102601: 102601:
- 【人物名称@正常】是的,【1】 - 【人物名称@正常】是的,【1】
102602: 102602:
- 【人物名称@正常】不是,【1】 - 【人物名称@正常】这个嘛。【1】
102603: 102603:
- 【人物名称@正常】我又不认识你,为什么要告诉你? - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
102604: 102604:
- 【人物名称@正常】不好意思,我不知道【1】在哪。 - 【人物名称@正常】不好意思,我不知道【1】在哪。
#1027: 询问提示 #1027: 询问提示
102701: 102701:
- 【人物名称@正常】你可以去问问【1】,他可能知道点什么。 - 【人物名称@正常】你可以去问问【1】,他可能知道点什么。
102702: 102702:
- 【人物名称@正常】抱歉,爱莫能助。 - 【人物名称@正常】抱歉,爱莫能助。我们去其他地方看看吧?
#1029: 询问玩家所在场所 #1029: 询问玩家所在场所
102901: 102901:
- 【人物名称@正常】主人,我们在【1】呀。 - 【人物名称@正常】主人,我们在【1】呀。
#1030: 搭档说话 #1030: 询问最终线索
103001:
- 【寒烟@正常】这个县城里有各色各样的人物,您可以试着从打招呼、送小费开始,到帮助对方解决麻烦,来拉进和对方的关系,或者使用暴力,让对方畏惧于你,以逐步挖掘更深的线索,并最终找出目标。如果一开始没有头绪,少主也可以四处走走,多跟人聊聊天,搜集一下信息。您想去哪里或者找谁,直接说就好。如果发现了任何蛛丝马迹,我会及时提醒少主的。另外,关于人物、地点和关系,如果少主不记得了,也可以随时向我提问。
103002: 103002:
- 【寒烟@正常】我们现在在【1】,看到【2】了,我们过去打个招呼吧。 - 【人物名称@正常】凭你我目前的交情,我没什么可以告诉你了。你问问别人去吧。
103003:
- 【人物名称@正常】不好意思,我不知道这件事。
#1031: 搭档说话
103101:
- 【人物名称@正常】这个县城有各色各样的人物,您可以试着从打招呼、送钱开始,到帮助对方解决麻烦,拉进彼此关系,或者使用暴力,让对方畏惧于你,以逐步挖掘更深的线索,并最终找出目标。如果一开始没有头绪,少爷也可以四处走走,多跟人聊聊天,搜集一下信息,如果发现了任何蛛丝马迹,我会及时提醒少主的。如果不知道去哪里,可以说“我可以去哪里”。另外,关于这里的人物和关系,如果少爷不记得了,也可以随时向我提问。
103102:
- 【人物名称@正常】我们现在在【1】,看到【2】了,我们过去打个招呼吧。
#1032: 搭档说话
103201:
- 我们走吧,这人暂时问不出更重要的消息了,去先找别人问问吧。
- 我们去问问其他人吧,也许会有别的线索呢!
- 感觉从这个人身上得不到什么有用的信息,我们换个人问问吧。
- 我们去找其他人问问吧,感觉这个人身上没有什么有用的线索。
...@@ -10,7 +10,7 @@ aside: ...@@ -10,7 +10,7 @@ aside:
400103: 400103:
- 【旁白@正常】不知道您说的这个地方在哪呢。 - 【旁白@正常】不知道您说的这个地方在哪呢。
400104: 400104:
- 【旁白@正常】这个地方没有你要找的人。 - 【旁白@正常】没有这个地方,换其他地方试试吧,您可以说:我可以去哪里。
400105: 400105:
- 【旁白@正常】你想要去哪里呢?目前已知场所有:【1】。 - 【旁白@正常】你想要去哪里呢?目前已知场所有:【1】。
#4002: 开启对话 #4002: 开启对话
......
...@@ -31,7 +31,7 @@ aside: ...@@ -31,7 +31,7 @@ aside:
300501: 300501:
- 【旁白@正常】您当前已知线索【1】条,请问想要查看关于人物的线索还是不同类型的线索呢? - 【旁白@正常】您当前已知线索【1】条,请问想要查看关于人物的线索还是不同类型的线索呢?
30050101: 30050101:
- 【旁白@正常】您当前还没有获得任何线索,我能给您提供点建议。 - 您当前还没有获得任何线索,我能给您提供点建议。
300502: 300502:
- 【旁白@正常】当前已知人物【1】名:【2】,想要知道哪个人物的相关线索呢?说出他的名称即可。 - 【旁白@正常】当前已知人物【1】名:【2】,想要知道哪个人物的相关线索呢?说出他的名称即可。
30050201: 30050201:
...@@ -39,7 +39,7 @@ aside: ...@@ -39,7 +39,7 @@ aside:
300503: 300503:
- 【旁白@正常】当前已知【1】,想要知晓哪个类型线索呢? - 【旁白@正常】当前已知【1】,想要知晓哪个类型线索呢?
30050301: 30050301:
- 【旁白@正常】您当前还没有收集到线索,我能给您提供点建议。 - 您当前还没有收集到线索,我能给您提供点建议。
300504: 300504:
- 【旁白@正常】【1】已知线索【2】条,其中【3】,想要了解【1】的哪种线索呢? - 【旁白@正常】【1】已知线索【2】条,其中【3】,想要了解【1】的哪种线索呢?
30050401: 30050401:
...@@ -62,17 +62,25 @@ aside: ...@@ -62,17 +62,25 @@ aside:
- 【旁白@正常】您想看什么类型的线索呢? - 【旁白@正常】您想看什么类型的线索呢?
30050605: 30050605:
- 【旁白@正常】没有这种类型的线索哦。 - 【旁白@正常】没有这种类型的线索哦。
30050606:
- 【旁白@正常】【1】的【2】线索共【3】条,第【4】条:【5】
30050607:
- 【旁白@正常】【1】的【2】线索共【3】条,第【4】条:【5】要重新查看吗?
#3006: 询问谁和谁有某个关系 #3006: 询问谁和谁有某个关系
300601: 300601:
- 【旁白@正常】您当前排名积分为:【1】。 - 【旁白@正常】您当前排名积分为:【1】。
#3007: 询问某人的模糊处理操作
3007:
- 【寒烟@正常】那我们下次再说吧。
- 【寒烟@正常】嗯嗯,我们下次再说这件事。
#3101: 询问某人的模糊处理操作 #3101: 询问某人的模糊处理操作
310101: 310101:
- 【寒烟@正常】您还没告诉要看谁的呢。 - 【人物名称@正常】您还没告诉要看谁的呢。
310102: 310102:
- 【寒烟@正常】没有您说的这个人哦。 - 【人物名称@正常】没有您说的这个人哦。
310103: 310103:
- 【寒烟@正常】【1】,年龄【2】,性别【3】,身份【4】,其他信息不详。 - 【人物名称@正常】【1】,年龄【2】,性别【3】,身份【4】,其他信息不详。
310104: 310104:
- 【寒烟@正常】【1】,年龄【2】,性别【3】,身份【4】,【5】对你的信任度为:【6】、威慑度为:【7】。 - 【人物名称@正常】【1】,年龄【2】,性别【3】,身份【4】,【5】对你的信任度为:【6】、威慑度为:【7】。
...@@ -301,8 +301,10 @@ person: ...@@ -301,8 +301,10 @@ person:
- 【人物名称@正常】好酒!嗝儿! - 【人物名称@正常】好酒!嗝儿!
200103: 200103:
- 【人物名称@正常】酒逢知己千杯少,话不投机半句多…… - 【人物名称@正常】酒逢知己千杯少,话不投机半句多……
200104:
- 【人物名称@正常】你身上带的钱不太够,喝酒要花费【条件2】文。
200105: 200105:
- 【人物名称@正常】这酒还是算了吧。 - 【人物名称@正常】凭你我的关系,喝酒还是算了吧。
200106: 200106:
- 【人物名称@正常】谢谢,我不喝酒。 - 【人物名称@正常】谢谢,我不喝酒。
#2002: 打招呼 #2002: 打招呼
...@@ -311,31 +313,31 @@ person: ...@@ -311,31 +313,31 @@ person:
200202: 200202:
- 【人物名称@正常】又是你啊,有事吗? - 【人物名称@正常】又是你啊,有事吗?
200203: 200203:
- 【人物名称@正常】找我何事? - 【旁白@正常】【A】淡淡地扫了你一眼,仿佛没听见。【人物名称@正常】找我何事?
200204: 200205:
- 【人物名称@正常】不好意思,我很忙。 - 【人物名称@正常】不好意思,我很忙。
#2003: 买古董 #2003: 卖古董
200301: 200301:
- 【人物名称@正常】既然出得起价钱,此物便交予你了。 - 【人物名称@正常】既然出得起价钱,此物便交予你了。
200302: 200302:
- 【人物名称@正常】罢了。惹不起你。此物便卖给你吧。 - 【人物名称@正常】罢了。惹不起你。此物便卖给你吧。
200303: 200303:
- 【人物名称@正常】【1】文,不能再少了。你身上的钱可不够。
200304:
- 【人物名称@正常】我们好像不熟吧?抱歉这是我心爱之物,不能随意割爱。 - 【人物名称@正常】我们好像不熟吧?抱歉这是我心爱之物,不能随意割爱。
200304:
- 【人物名称@正常】【条件2】文,不能再少了。你身上的钱可不够。
200305: 200305:
- 【人物名称@正常】抱歉,我这不买这东西。 - 【人物名称@正常】没有没有,快走快走。
#2004: 买药 #2004: 买药
200401: 200401:
- 【人物名称@正常】自无不可。 - 【人物名称@正常】自无不可。
200402: 200402:
- 【人物名称@正常】你已经买过金疮药了。此物多买无益。 - 【人物名称@正常】你已经买过金疮药了。此物多买无益。
200403: 200403:
- 【人物名称@正常】你身上连【1】文都没有,可不足以买我的药。
200404:
- 【人物名称@正常】我的药不卖给险恶之人。快走快走。 - 【人物名称@正常】我的药不卖给险恶之人。快走快走。
200404:
- 【人物名称@正常】你身上连【条件2】文都没有,可不足以买我的药。
200405: 200405:
- 【人物名称@正常】抱歉,我没有药可卖。 - 【人物名称@正常】没有没有,快走快走。
#2005: 获赠金疮药 #2005: 获赠金疮药
200501: 200501:
- 【人物名称@正常】以你我的交情,还谈什么钱。这份金疮药我送你了。 - 【人物名称@正常】以你我的交情,还谈什么钱。这份金疮药我送你了。
...@@ -343,54 +345,56 @@ person: ...@@ -343,54 +345,56 @@ person:
- 【人物名称@正常】你已经买过金疮药了。此物多买无益。 - 【人物名称@正常】你已经买过金疮药了。此物多买无益。
200503: 200503:
- 【人物名称@正常】我这金疮药得来不易,以你我的交情,还不足以让我割爱。 - 【人物名称@正常】我这金疮药得来不易,以你我的交情,还不足以让我割爱。
200504: 200505:
- 【人物名称@正常】我没有金疮药,卖不了。 - 【人物名称@正常】没有没有,快走快走。
#2006: 揍人 #2006: 揍人
200601: 200601:
- 【人物名称@正常】我和你无冤无仇……哎哟!哎哟! - 【人物名称@正常】我和你无冤无仇……哎哟!哎哟!
200602: 200602:
- 【人物名称@正常】刚刚才被你欺负了一场,怎么又来!哎哟! - 【人物名称@正常】刚刚才被你欺负了一场,怎么又来!哎哟!【旁白@正常】你狠狠揍了【A】一顿。
200603: 200603:
- 【人物名称@正常】呸,凭你的细胳膊细腿也配和我动手?找死。 - 【人物名称@正常】呸,凭你的细胳膊细腿也配和我动手?找死。【旁白@正常】你被【A】狠狠收拾了一顿,被揍得鼻青脸肿。
200604: 200605:
- 【人物名称@正常】别动手啊,告诉你,打我也没用。 - 【人物名称@正常】我和你往日无冤,近日无仇,随便动我小心吃官司。
#2007: 请吃饭 #2007: 请吃饭
200701: 200701:
- 【人物名称@正常】盛情难却,这次让你破费了。感谢,感谢。 - 【人物名称@正常】盛情难却,这次让你破费了。感谢,感谢。
200702: 200702:
- 【人物名称@正常】这不是刚吃过没多久吗?您也太客气了。 - 【旁白@正常】你邀请【A】到酒楼,满满点了一桌子。【人物名称@正常】这不是刚吃过没多久吗?您也太客气了。
200703: 200703:
- 【人物名称@正常】怎么,你这是耍我呢?
200704:
- 【人物名称@正常】你的饭菜,我可吃不起。 - 【人物名称@正常】你的饭菜,我可吃不起。
200704:
- 【旁白@正常】最便宜的一桌饭菜也需要【条件2】文,你的钱不够了。【人物名称@正常】怎么,你这是耍我呢?
200705: 200705:
- 【人物名称@正常】我不饿,你也别请了,请客对我没用。 - 【人物名称@正常】我不饿,你也别请了,请客对我没用。
#2008: 好处费 #2008: 好处费
200801: 200801:
- 【人物名称@正常】哎哟,这,这多不好意思的。 - 【人物名称@正常】哎哟,这,这多不好意思的。
200802: 200802:
- 【人物名称@正常】哎哟,这,这多不好意思的。 - 【旁白@正常】你偷偷摸出【条件2】文递给【A】。【人物名称@正常】哎哟,这,这多不好意思的。【旁白@正常】【A】不着痕迹地把银子塞进袖子里。因为打赏次数太多,信任度已经无法提升。
200803:
- 【旁白@正常】你偷偷摸出【条件2】文递给【A】。【人物名称@正常】哎哟,您的钱我可不敢收,怕烫手。
200804: 200804:
- 【人物名称@正常】哎哟,您的钱我可不敢收,怕烫手。 - 【旁白@正常】打赏一次要【条件2】文,你的钱不够了。
200805: 200805:
- 【人物名称@正常】我不收礼,没用的,放弃吧。 - 【人物名称@正常】我不收礼,没用的,放弃吧。
#2009: 帮挑水 #2009: 帮挑水
200901: 200901:
- 【人物名称@正常】这可太感谢你了。 - 【人物名称@正常】这可太感谢你了。
200902: 200902:
- 【人物名称@正常】这可太感谢你了。 - 【人物名称@正常】这可太感谢你了。【旁白@正常】你吭哧吭哧为【A】把水缸挑满。但是挑水这种小事已经无法再提高【第三人称】的信任度。
200903: 200903:
- 【人物名称@正常】非亲非故的,不敢劳驾你。 - 【人物名称@正常】非亲非故的,不敢劳驾你。
200904: 200905:
- 【人物名称@正常】家里不缺水,不用你给挑。 - 【人物名称@正常】家里不缺水,不用你给挑。
#2010: 一起钓鱼 #2010: 一起钓鱼
201001: 201001:
- 【人物名称@正常】正合我意。走! - 【人物名称@正常】正合我意。走!
201002: 201002:
- 【人物名称@正常】想不到你兴致这么浓。那我陪你去吧。 - 【人物名称@正常】想不到你兴致这么浓。那我陪你去吧。【旁白@正常】你陪着【A】又去钓了一场鱼。信任度没有提高。但是你顺手把钓到的小鱼卖了,获利【奖励】文。
201003: 201003:
- 【人物名称@正常】钓鱼须得三五好友,情投意合才有乐趣。我跟你个陌生人去钓什么鱼! - 【人物名称@正常】钓鱼须得三五好友,情投意合才有乐趣。我跟你个陌生人去钓什么鱼!
201004: 201005:
- 【人物名称@正常】我不钓鱼,你找别人吧。 - 【人物名称@正常】我不钓鱼,你找别人吧。
#2011: 送货 #2011: 送货
201101: 201101:
...@@ -399,26 +403,28 @@ person: ...@@ -399,26 +403,28 @@ person:
- 【人物名称@正常】你不是已经给过我了吗? - 【人物名称@正常】你不是已经给过我了吗?
201103: 201103:
- 【人物名称@正常】我看你面目可憎,这货我是不敢收的。回去换个人给我送吧。 - 【人物名称@正常】我看你面目可憎,这货我是不敢收的。回去换个人给我送吧。
201104: 201105:
- 【人物名称@正常】我没有东西要收,你找错人了吧。 - 【人物名称@正常】我没有东西要收,你找错人了吧。
#2012: 给钱 #2012: 给钱
201201: 201201:
- 【人物名称@正常】太客气了太客气了。 - 【人物名称@正常】太客气了太客气了。
201202: 201202:
- 【人物名称@正常】太客气了太客气了。 - 【人物名称@正常】太客气了太客气了。【旁白@正常】你多次给【A】送钱,【第三人称】已经习惯成自然,信任度没有提升。
201204: 201203:
- 【人物名称@正常】你这是干什么?非亲非故送人钱财,怕是不安好心。收回去吧。 - 【人物名称@正常】你这是干什么?非亲非故送人钱财,怕是不安好心。收回去吧。
201204:
- 【旁白@正常】你的钱财不足,已经拿不出手了。
201205: 201205:
- 【人物名称@正常】我差这么点钱吗,别给我来这套。 - 【人物名称@正常】我差这么点钱吗,太小看我了吧。
#2013: 邀请医生 #2013: 邀请医生
201301: 201301:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。诊金么,先预付个【1】文吧。 - 【人物名称@正常】医者父母心,我这就陪你走一趟。诊金么,先预付个【条件2】文吧。
201302: 201302:
- 【人物名称@正常】医者父母心,陪你出诊倒是无妨。可是此人明明生龙活虎,你是想戏弄于我吗? - 【人物名称@正常】医者父母心,陪你出诊倒是无妨。可是此人明明生龙活虎,你是想戏弄于我吗?
201303: 201303:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。不过这个诊金么,先预付个【1】文吧。
201304:
- 【人物名称@正常】话不投机,想要我陪你去却是万万不能。 - 【人物名称@正常】话不投机,想要我陪你去却是万万不能。
201304:
- 【人物名称@正常】医者父母心,我这就陪你走一趟。不过这个诊金么,先预付个【条件2】文吧。【旁白】很遗憾,你掏不出【条件2】的诊金。
201305: 201305:
- 【人物名称@正常】不好意思,你另请高明吧。 - 【人物名称@正常】不好意思,你另请高明吧。
#2014: 给钱买茶具 #2014: 给钱买茶具
...@@ -427,20 +433,20 @@ person: ...@@ -427,20 +433,20 @@ person:
201402: 201402:
- 【人物名称@正常】不是已经被你买走了吗?没有了没有了。你还来折腾什么? - 【人物名称@正常】不是已经被你买走了吗?没有了没有了。你还来折腾什么?
201403: 201403:
- 【人物名称@正常】我这茶具不便宜。你口袋里那几个钱可不够。
201404:
- 【人物名称@正常】别以为有两个破钱就了不起。这药不卖! - 【人物名称@正常】别以为有两个破钱就了不起。这药不卖!
201404:
- 【人物名称@正常】我这茶具不便宜。你口袋里那几个钱可不够。
201405: 201405:
- 【人物名称@正常】我没有茶具这东西,你找别人问问吧。 - 【人物名称@正常】没有没有,快走快走。
#2015: 开怀畅饮 #2015: 开怀畅饮
201501: 201501:
- 【人物名称@正常】好酒!好酒!劳您破费了,咱们不醉不归! - 【人物名称@正常】好酒!好酒!劳您破费了,咱们不醉不归!
201502: 201502:
- 【人物名称@正常】太,太,太客气了,咱们再,再,再喝。 - 【人物名称@正常】太,太,太客气了,咱们再,再,再喝。【旁白@正常】:前不久你刚和【A】畅饮过一轮,【第三人称】的酒意未消,再喝也没有效果。
201503: 201503:
- 【人物名称@正常】我的酒量不小,你的身上的钱财怕是不够,还是算了吧。
201504:
- 【人物名称@正常】咱们不熟,这顿酒还是免了吧。 - 【人物名称@正常】咱们不熟,这顿酒还是免了吧。
201504:
- 【人物名称@正常】我的酒量不小,你的身上的钱财怕是不够,还是算了吧。
201505: 201505:
- 【人物名称@正常】谢谢啊,我真不喝酒。 - 【人物名称@正常】谢谢啊,我真不喝酒。
#2016: 买回钗子 #2016: 买回钗子
...@@ -449,11 +455,11 @@ person: ...@@ -449,11 +455,11 @@ person:
201602: 201602:
- 【人物名称@正常】不是已经把钗子卖给你了吗? - 【人物名称@正常】不是已经把钗子卖给你了吗?
201603: 201603:
- 【人物名称@正常】这钗子最少得【1】文钱,你那点钱可不够!
201604:
- 【人物名称@正常】休想。这可是美人儿贴身的钗子,怎么能卖给你。 - 【人物名称@正常】休想。这可是美人儿贴身的钗子,怎么能卖给你。
201604:
- 【人物名称@正常】这钗子最少得【条件2】文钱,你那点钱可不够!
201605: 201605:
- 【人物名称@正常】别问我,我这真没钗子这样的东西。 - 【人物名称@正常】我可没有什么钗子。你怕是听错了。
#2017: 抢回钗子 #2017: 抢回钗子
201701: 201701:
- 【人物名称@正常】别,别动手,钗子在这里。给你给你。 - 【人物名称@正常】别,别动手,钗子在这里。给你给你。
...@@ -461,8 +467,8 @@ person: ...@@ -461,8 +467,8 @@ person:
- 【人物名称@正常】我,我不是已经把钗子给你了吗?哪里能给你再变个钗子出来! - 【人物名称@正常】我,我不是已经把钗子给你了吗?哪里能给你再变个钗子出来!
201703: 201703:
- 【人物名称@正常】想得美!想要回钗子,让她自己来跟我说! - 【人物名称@正常】想得美!想要回钗子,让她自己来跟我说!
201704: 201705:
- 【人物名称@正常】抢没用,我这没有钗子。 - 【人物名称@正常】我可没有什么钗子。你怕是听错了。
#2018: 追回私吞款项 #2018: 追回私吞款项
201801: 201801:
- 【人物名称@正常】别,别动手,有话好好说,钱,钱我这就给你。 - 【人物名称@正常】别,别动手,有话好好说,钱,钱我这就给你。
...@@ -470,8 +476,8 @@ person: ...@@ -470,8 +476,8 @@ person:
- 【人物名称@正常】我,我不是已经把钱给你了吗?你还想做什么?! - 【人物名称@正常】我,我不是已经把钱给你了吗?你还想做什么?!
201803: 201803:
- 【人物名称@正常】就凭你?也敢找我追账?知道死字怎么写吗? - 【人物名称@正常】就凭你?也敢找我追账?知道死字怎么写吗?
201804: 201805:
- 【人物名称@正常】你找我追什么帐,你找其他人吧。 - 【人物名称@正常】欠账?我怎么不记得。
#2019: 探听身家 #2019: 探听身家
201901: 201901:
- 【人物名称@正常】别看我平时低调,悄悄跟你说,我的身家,最少有这个数,嘿嘿。 - 【人物名称@正常】别看我平时低调,悄悄跟你说,我的身家,最少有这个数,嘿嘿。
...@@ -479,7 +485,7 @@ person: ...@@ -479,7 +485,7 @@ person:
- 【人物名称@正常】不是跟你说过了吗? - 【人物名称@正常】不是跟你说过了吗?
201903: 201903:
- 【人物名称@正常】你打听这个作什么?无可奉告! - 【人物名称@正常】你打听这个作什么?无可奉告!
201904: 201905:
- 【人物名称@正常】我这没什么可问的。 - 【人物名称@正常】我这没什么可问的。
#2020:解救被绑女孩 #2020:解救被绑女孩
202001: 202001:
...@@ -490,7 +496,7 @@ person: ...@@ -490,7 +496,7 @@ person:
- 【人物名称@正常】你不是已经把人救走了吗,还想干嘛。 - 【人物名称@正常】你不是已经把人救走了吗,还想干嘛。
202003: 202003:
- 【人物名称@正常】你在说什么,我完全听不懂! - 【人物名称@正常】你在说什么,我完全听不懂!
202004: 202005:
- 【人物名称@正常】你找错人了吧。 - 【人物名称@正常】你找错人了吧。
#2021:审问罪犯供出老巢 #2021:审问罪犯供出老巢
202101: 202101:
...@@ -500,7 +506,7 @@ person: ...@@ -500,7 +506,7 @@ person:
- 【人物名称@正常】我不是告诉你了吗,你已经得到答案。 - 【人物名称@正常】我不是告诉你了吗,你已经得到答案。
202103: 202103:
- 【人物名称@正常】呸,你休想知道。 - 【人物名称@正常】呸,你休想知道。
202104: 202105:
- 【人物名称@正常】此事与我无关,不知道你在说什么。 - 【人物名称@正常】此事与我无关,不知道你在说什么。
#2022:交出藏宝图 #2022:交出藏宝图
202201: 202201:
...@@ -510,7 +516,7 @@ person: ...@@ -510,7 +516,7 @@ person:
- 【人物名称@正常】你不是已经破解了藏宝图了吗? - 【人物名称@正常】你不是已经破解了藏宝图了吗?
202203: 202203:
- 【人物名称@正常】我的秘药可不是随便给人用的。告辞! - 【人物名称@正常】我的秘药可不是随便给人用的。告辞!
202204: 202205:
- 【人物名称@正常】不好意思,我没有这东西。 - 【人物名称@正常】不好意思,我没有这东西。
#2023:抓捕人犯 #2023:抓捕人犯
202301: 202301:
...@@ -520,17 +526,17 @@ person: ...@@ -520,17 +526,17 @@ person:
- 【人物名称@正常】我不是已经认罪了吗?你这是想做什么! - 【人物名称@正常】我不是已经认罪了吗?你这是想做什么!
202303: 202303:
- 【人物名称@正常】就凭你,还不足以让我认罪。给我滚! - 【人物名称@正常】就凭你,还不足以让我认罪。给我滚!
202304: 202305:
- 【人物名称@正常】拜托你别乱抓人好不好,别逮谁都像坏人。 - 【人物名称@正常】拜托你别乱抓人好不好,别逮谁都像坏人。
#2024:购买犯人信息 #2024:购买犯人信息
202401: 202401:
- 【人物名称@正常】嘿嘿,这还差不多,我告诉你啊,那天我刚好路过,听到一声惨叫,偷偷探头一看,发现【1】满脸鲜血,正在行凶! - 【人物名称@正常】嘿嘿,这还差不多,我告诉你啊,那天我刚好路过,听到一声惨叫,偷偷探头一看,发现【1】满脸鲜血,正在行凶!
202402: 202402:
- 【人物名称@正常】不是告诉你了吗,行凶的是【1】。 - 【人物名称@正常】不是告诉你了吗,行凶的是【A】。
202403: 202403:
- 【人物名称@正常】我这消息,最少值【1】文钱,你的钱可不够买我这消息。
202404:
- 【人物名称@正常】我跟你很熟吗?这钱我可不敢要。 - 【人物名称@正常】我跟你很熟吗?这钱我可不敢要。
202404:
- 【人物名称@正常】我这消息,最少值【条件2】文钱,你的钱可不够买我这消息。
202405: 202405:
- 【人物名称@正常】抱歉,我没有这消息。 - 【人物名称@正常】抱歉,我没有这消息。
#2025:购买物品完成 #2025:购买物品完成
...@@ -558,7 +564,7 @@ person: ...@@ -558,7 +564,7 @@ person:
202604: 202604:
- 【人物名称@正常】大夫虽然来过,但是不是你请回来的我可不确定。 - 【人物名称@正常】大夫虽然来过,但是不是你请回来的我可不确定。
202605: 202605:
- 【人物名称@正常】抱歉,我不是大夫。你找错人了。 - 【人物名称@正常】抱歉,没有确切病人的消息前我不会出诊。
#2027:寻回物品完成 #2027:寻回物品完成
202701: 202701:
- 【人物名称@正常】哎呀,这正是我丢失的。太谢谢你了。 - 【人物名称@正常】哎呀,这正是我丢失的。太谢谢你了。
...@@ -570,7 +576,7 @@ person: ...@@ -570,7 +576,7 @@ person:
202704: 202704:
- 【人物名称@正常】虽然我一直想寻回此物,但是你给的我可不敢收。 - 【人物名称@正常】虽然我一直想寻回此物,但是你给的我可不敢收。
202705: 202705:
- 【人物名称@正常】我没有让你找东西啊,你问错人了吧。 - 【人物名称@正常】你这是何意,该不是问错人了吧。
#2028:打探肥羊完成 #2028:打探肥羊完成
202801: 202801:
- 【人物名称@正常】想不到你还挺能干。很好。 - 【人物名称@正常】想不到你还挺能干。很好。
...@@ -595,7 +601,7 @@ person: ...@@ -595,7 +601,7 @@ person:
202904: 202904:
- 【人物名称@正常】无事献殷勤,来历不明的钱我可不敢收。 - 【人物名称@正常】无事献殷勤,来历不明的钱我可不敢收。
202905: 202905:
- 【人物名称@正常】别人没欠我钱,你问错人啦。 - 【人物名称@正常】你找谁催账了,弄错人了吧。
#2030:催账 #2030:催账
203001: 203001:
- 【人物名称@正常】我给,我给。别动手。 - 【人物名称@正常】我给,我给。别动手。
...@@ -604,8 +610,8 @@ person: ...@@ -604,8 +610,8 @@ person:
- 【人物名称@正常】我不是已经给你了吗?难道你想讹诈我? - 【人物名称@正常】我不是已经给你了吗?难道你想讹诈我?
203003: 203003:
- 【人物名称@正常】你算老几,敢来找我要钱。 - 【人物名称@正常】你算老几,敢来找我要钱。
203004: 203005:
- 【人物名称@正常】别找我,我可没欠任何人钱。 - 【人物名称@正常】什么?欠账?拿出证据来。
#2031:砸场子完成 #2031:砸场子完成
203101: 203101:
- 【人物名称@正常】哈哈哈,太好了。你果然没让我失望。这点钱你收下,就当是辛苦费。 - 【人物名称@正常】哈哈哈,太好了。你果然没让我失望。这点钱你收下,就当是辛苦费。
...@@ -627,8 +633,8 @@ person: ...@@ -627,8 +633,8 @@ person:
- 【人物名称@正常】你,你还来做什么,这里还有什么可以砸的吗? - 【人物名称@正常】你,你还来做什么,这里还有什么可以砸的吗?
203203: 203203:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?
203204: 203205:
- 【人物名称@正常】别乱来,你找错人了。 - 【人物名称@正常】没凭没据你可别乱来,小心吃官司。
#2033:探听隐私完成 #2033:探听隐私完成
203301: 203301:
- 【人物名称@正常】什,什么,竟有此事? - 【人物名称@正常】什,什么,竟有此事?
...@@ -651,10 +657,10 @@ person: ...@@ -651,10 +657,10 @@ person:
【旁白@正常】你悄悄爬上屋顶,掀开一片瓦片,烛光下,【1】对着镜子,正轻轻把自己的脸皮撕了下来。那居然是一张人皮面具!面具下,是一张陌生的人脸!震惊之下,你赶紧溜下了屋檐。 【旁白@正常】你悄悄爬上屋顶,掀开一片瓦片,烛光下,【1】对着镜子,正轻轻把自己的脸皮撕了下来。那居然是一张人皮面具!面具下,是一张陌生的人脸!震惊之下,你赶紧溜下了屋檐。
【旁白@正常】你成功打探到了【1】的隐私!你与【1】的友好度变为【3】点,威慑度变为【4】点。 【旁白@正常】你成功打探到了【1】的隐私!你与【1】的友好度变为【3】点,威慑度变为【4】点。
203402: 203402:
- 【人物名称@正常】你已经知道他的隐私了。 - 【旁白@正常】你已经知道他的隐私了。
203403: 203403:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?【旁白@正常】【A】挥拳朝你扑过来,你被打得鼻青脸肿。
203404: 203405:
- 【人物名称@正常】我没什么可说,你找其他人吧。 - 【人物名称@正常】我没什么可说,你找其他人吧。
#2035:试药 #2035:试药
203501: 203501:
...@@ -663,53 +669,53 @@ person: ...@@ -663,53 +669,53 @@ person:
【旁白@正常】你满面红光,感到浑身充满了力量。 【旁白@正常】你满面红光,感到浑身充满了力量。
【人物名称@正常】成,成功了??太好了。这是你的报酬。拿了钱,以后有什么头疼胸闷啥的可不许赖我。 【人物名称@正常】成,成功了??太好了。这是你的报酬。拿了钱,以后有什么头疼胸闷啥的可不许赖我。
【旁白@正常】你勇敢地帮【1】试药成功,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文酬劳。 【旁白@正常】你勇敢地帮【1】试药成功,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文酬劳。
203502: 203510:
- 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。 - 【人物名称@正常】太好了。我正在找敢试药的人呢。你且来试试。先说好,出问题了可不关我事。
【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。 【旁白@正常】你一脸视死如归地接过了那鸽蛋大的药丸,张口就吞了下去。
【旁白@正常】你眼前一黑,一头栽倒在地。 【旁白@正常】你眼前一黑,一头栽倒在地。
【旁白@正常】过了很久,你才悠悠醒过来,感到浑身像散架了一样。 【旁白@正常】过了很久,你才悠悠醒过来,感到浑身像散架了一样。
【人物名称@正常】这,这可是你自愿的。不关我事,这点钱拿着,就算我给你的补偿。 【人物名称@正常】这,这可是你自愿的。不关我事,这点钱拿着,就算我给你的补偿。
【旁白@正常】很遗憾,你帮【1】试药失败,你与【1】的友好度变为【2】点,威慑度变为【3】点。你获得【4】文补偿。 【旁白@正常】很遗憾,你帮【A】试药失败,你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。你获得【奖励】文补偿。
203503: 203502:
- 【人物名称@正常】你,你还来做什么,我没有药可以试了,快走快走。 - 【人物名称@正常】你,你还来做什么,我没有药可以试了,快走快走。
203504: 203503:
- 【人物名称@正常】我们很熟吗? - 【人物名称@正常】我们很熟吗?
203505: 203505:
- 【人物名称@正常】我药都没有,来我这试什么药。 - 【人物名称@正常】你从哪里得来的小道消息,没有没有。
#2036:证据账本完成 #2036:证据账本完成
203601: 203601:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
【旁白@正常】【1】接过账本,翻看几下,大笑起来。 【旁白@正常】【1】接过账本,翻看几下,大笑起来。
【人物名称@正常】好,好,好,【2】你这次在劫难逃!壮士果然身手不凡。小小心意,还请收下。 【人物名称@正常】好,好,好,【2】你这次在劫难逃!壮士果然身手不凡。小小心意,还请收下。
【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。 【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。
203602: 203610:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
【旁白@正常】【1】接过账本,翻看几下,脸色难看起来。 【旁白@正常】【A】接过账本,翻看几下,脸色难看起来。
【人物名称@正常】此物是假的。看来【2】早有准备。再去也无益。罢了。无论如何,多谢壮士相助,壮士身手不凡,这点心意还请收下。 【人物名称@正常】此物是假的。看来【B】早有准备。再去也无益。罢了。无论如何,多谢壮士相助,壮士身手不凡,这点心意还请收下。
【旁白@正常】你与【1】的友好度变为【3】点,威慑度变为【4】点。你获得【5】文酬劳。 【旁白@正常】你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。你获得【奖励】文酬劳。
203603: 203602:
- 【人物名称@正常】你不是已经给过我了吗?此事关联甚大,千万不要乱传。 - 【人物名称@正常】你不是已经给过我了吗?此事关联甚大,千万不要乱传。
203604: 203603:
- 【人物名称@正常】快给我看看!什么,没有?你是在戏弄我吗? - 【人物名称@正常】快给我看看!什么,没有?你是在戏弄我吗?
203605: 203604:
- 【人物名称@正常】只凭你我关系,还不足以让我认定此物真假。 - 【人物名称@正常】只凭你我关系,还不足以让我认定此物真假。
203606: 203605:
- 【人物名称@正常】你搞错了吧,我没让你去查这个啊。 - 【人物名称@正常】你搞错了吧,我没让你去查这个啊。
#2037:证据账本 #2037:证据账本
203701: 203701:
- 【人物名称@正常】你说什么? - 【人物名称@正常】你说什么?
【旁白@正常】你趁【1】不注意,一掌打晕了【2】。然后翻箱倒柜。 【旁白@正常】你趁【1】不注意,一掌打晕了【2】。然后翻箱倒柜。
【旁白@正常】你成功偷取到了【2】的账本!你与【2】的友好度变为【3】点,威慑度变为【4】点。 【旁白@正常】你成功偷取到了【2】的账本!你与【2】的友好度变为【3】点,威慑度变为【4】点。
203702: 203710:
- 【人物名称@正常】你说什么? - 【人物名称@正常】你说什么?
【旁白@正常】你假装离去,趁夜摸进了【1】的密室,翻箱倒柜。 【旁白@正常】你假装离去,趁夜摸进了【A】的密室,翻箱倒柜。
【旁白@正常】你成功偷取到了【1】的账本!你与【1】的友好度变为【2】点,威慑度变为【3】点。 【旁白@正常】你成功偷取到了【A】的账本!你与【A】的友好度变为【信任值】点,威慑度变为【威慑度】点。
203702:
- 【旁白@正常】你已经知道他的隐私了。
203703: 203703:
- 【人物名称@正常】你已经知道他的隐私了。
203704:
- 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死? - 【人物名称@正常】就凭你那三脚猫的功夫也敢来找死?
203705: 203705:
- 【人物名称@正常】不好意思,我这没有这东西。 - 【人物名称@正常】你从哪里得来的小道消息,没有没有。
#2038:证据账本类型2完成 #2038:证据账本类型2完成
203801: 203801:
- 【人物名称@正常】快让我看看。 - 【人物名称@正常】快让我看看。
...@@ -769,6 +775,65 @@ person: ...@@ -769,6 +775,65 @@ person:
- 【人物名称@正常】凭你我关系,我可不敢相信。 - 【人物名称@正常】凭你我关系,我可不敢相信。
204105: 204105:
- 【人物名称@正常】不好意思,我很忙。 - 【人物名称@正常】不好意思,我很忙。
#2042:求婚
204202:
- 【人物名称@正常】你们不是已经成亲了吗?
204203:
- 【人物名称@正常】少侠先别急,现在太早了,等破了案再说不迟。
204205:
- 【人物名称@正常】公子请自重,现在谈婚论嫁还早了点。
#2043:赌场作弊
204301:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。寒烟的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的三个六。
【人物名称@正常】不,不可能!这绝对不可能!
【寒烟@正常】三个六,一赔一百五!快,给钱!
204302:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。寒烟的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的三个一。
【人物名称@正常】不,不可能!这绝对不可能!
【寒烟@正常】三个六,一赔一百五!快,给钱!
204303:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。寒烟的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】盖盅掀开,里面红艳艳的四五六,大!
【人物名称@正常】你运气真好!来,一赔一。
【寒烟@正常】少爷,买大小赢得太少啦。不如选个赔率大的,三个六或者三个一吧!
204304:
- 【人物名称@正常】哎哟,还真敢压啊。那我就不客气啦!
【旁白@正常】快速摇晃着骰盅,左右几圈后,猛然盖倒在桌上。寒烟的食指悄无声息地在桌上敲击了两下,然后对你轻轻点了点头。
【人物名称@正常】开!
【旁白@正常】骰盅掀开,里面红艳艳的一二三,小!
【人物名称@正常】你运气真好!
【寒烟@正常】少爷,买大小赢得太少啦。不如选个赔率大的,三个六或者三个一吧!
204305:
- 【人物名称@正常】小子,会不会赌啊,我这赌桌上可没这个赌法!要么压大,要么压小,要么压三个一或者三个六!只能压一样!
204306:
- 【人物名称@正常】我的公子唉,你上次来赌,就把我输得一无所有了,您可千万别再耍我了!
204307:
- 【人物名称@正常】赌?多少人赌得倾家荡产,你可别来害我。找别人去吧。
204308:
- 【人物名称@正常】三个色子,看点数。四到十点小,十一到十七点大!买大或买小,赔率都是一赔一。
【寒烟@正常】那三点和十八点呢?
【人物名称@正常】嘿嘿。压中三个一或者三个六的话,一赔一百五!你要有这胆量,大可以试试。不过,只能压一样!
【旁白@正常】寒烟轻轻将一只手搭在赌桌上。
【寒烟@正常】公子,放心压注,有我在呢。你想要压什么?
#2044:砸场子
204401:
- 【人物名称@正常】这……这是……这是那个隐秘之地的腰牌!
【旁白@正常】【A】大惊失色,快步走上前来,想要接过去细看,又讪讪地缩回了手。
【人物名称@正常】在下有眼不识泰山。公子恕罪,恕罪。
204402:
- 【人物名称@正常】公子出身不凡,在下如雷贯耳。还请公子把这信物收回吧。
204403:
- 【人物名称@正常】恕我眼拙,认不出它的来历。
204405:
- 【人物名称@正常】你拿这个给我看什么。
#2101:买东西 #2101:买东西
210101: 210101:
- 【人物名称@正常】既然出得起价钱,就卖给你了。 - 【人物名称@正常】既然出得起价钱,就卖给你了。
...@@ -780,5 +845,261 @@ person: ...@@ -780,5 +845,261 @@ person:
210104: 210104:
- 【人物名称@正常】抱歉,不卖给信不过的人。 - 【人物名称@正常】抱歉,不卖给信不过的人。
210105: 210105:
- 【人物名称@正常】不好意思,我这不卖东西。 - 【人物名称@正常】没有没有,快走快走。
#2102:二次回复
210202:
- 【旁白@正常】你已经完成了这个任务。
210203:
- 【人物名称@正常】不要骗我,你明明还没有完成。
210204:
- 【人物名称@正常】我们之间的交情,好像还没到这地步吧?
#--------------------------------------------职场------------------------------------------------
#2051:谴责乱扔垃圾
205102:
- 【人物名称@正常】别骂了别骂了,我知道错了,我不是已经道歉过了吗!
205103:
- 【人物名称@正常】你怎么知道的?不是,我跟你又不熟,轮得到你来说我吗。
205105:
- 【人物名称@正常】你是不是搞错了什么,我从来没乱扔过垃圾。
#2052:谴责抽烟
205202:
- 【人物名称@正常】放心,我再抽也不会被你们看到。
205203:
- 【人物名称@正常】我抽我的,你管得着吗?我跟你很熟?。
205205:
- 【人物名称@正常】你是不是搞错了什么,我不吸烟的。
#2053:谴责邋遢
205302:
- 【人物名称@正常】喂,别鸡蛋里挑骨头了,我不是已经收拾干净了吗。
205303:
- 【人物名称@正常】邋遢的是我,跟你有什么关系,又不会传染。
205305:
- 【人物名称@正常】你是不是搞错人了,我看起来哪里邋遢了。
#2054:谴责颜值
205402:
- 【人物名称@正常】我都戴上面具了你还想让我怎样。
205403:
- 【旁白@正常】【A】左顾右盼,然后转向旁边的同事,假装你说的是其他人。
【人物名称@正常】喂,他说你长得丑,是我就不忍了。
205405:
- 【人物名称@正常】你这么说就很不礼貌了,我这颜值哪里差了?
#2055:谴责骂人
205502:
- 【人物名称@正常】我不是说过了么,我以后不会再骂人了,除非实在忍不住。
205503:
- 【人物名称@正常】我没有骂人,老祖宗几千年留下的国粹,你怎么能说是骂人呢。
205505:
- 【人物名称@正常】你是不是搞错人了,我从来没骂过人啊。
#2056:谴责完成
205602:
- 【人物名称@正常】你刚才已经告诉过我了。
205603:
- 【人物名称@正常】你明明就没有,我看着呢。
205604:
- 【人物名称@正常】你说的话我不太相信。
205605:
- 【人物名称@正常】我不知道你在说什么,我没有找你帮过忙啊。
#2057:打探
205702:
- 【人物名称@正常】刚才跟你分享的那些,你回去记得要看哦,超有意思的。
205703:
- 【人物名称@正常】小帅同学,上班时间就要好好工作,别整这些有的没的。
205705:
- 【人物名称@正常】这是秘密,我是不会告诉你的。
#2058:打探完成
205802:
- 【人物名称@正常】你刚才已经告诉过我了。
205803:
- 【人物名称@正常】你这打探的都是什么啊,完全不是我想要的,你再去打探一次。
205804:
- 【人物名称@正常】不听不听王八念经。
205805:
- 【人物名称@正常】你搞错人了吧,我没有想知道这些啊。
#2059:质问打小报告
205902:
- 【人物名称@正常】你还是放过我吧,我下次不会再这样了。
205903:
- 【人物名称@正常】没有啊,不是我干的,你有什么证据吗。
205905:
- 【人物名称@正常】你搞错人了吧,我没有做过这种事啊。
#2060:质问甩锅
206002:
- 【人物名称@正常】行了我知道错了,我会好好道歉的。
206003:
- 【人物名称@正常】你是住海边的吧,管得这么宽。
206005:
- 【人物名称@正常】你搞错人了吧,我没有做过这种事啊。
#2061:质问完成
206102:
- 【人物名称@正常】嗯,我知道,但你刚才已经说过一遍了。
206103:
- 【人物名称@正常】没有吧,我盯着呢,你明明就没搞定。
206104:
- 【人物名称@正常】我觉得你不像个好人,不管你说什么,我是不会信的。
206105:
- 【人物名称@正常】你在说什么,我没有委托过这种事啊。
#2062:买高档耳机
206202:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206203:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206204:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206205:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2063:买运动手环
206302:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206303:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206304:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206305:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2064:买巧克力
206402:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206403:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206404:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206405:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2065:买茶叶
206502:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206503:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206504:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206505:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2066:买化妆品
206602:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206603:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206604:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206605:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2067:买玩偶
206702:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206703:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206704:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206705:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2067:买精致餐具
206802:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206803:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206804:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206805:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2069:买感冒药
206902:
- 【人物名称@正常】【物品名】已经卖断货了哦。
206903:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
206904:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
206905:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2070:买红糖
207002:
- 【人物名称@正常】【物品名】已经卖断货了哦。
207003:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
207004:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
207005:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2071:买烟
207102:
- 【人物名称@正常】【物品名】已经卖断货了哦。
207103:
- 【人物名称@正常】抱歉先生,根据您的信用评级,本商场无法为您提供服务。
207104:
- 【人物名称@正常】抱歉先生,您身上的钱可能没有带够。
207105:
- 【人物名称@正常】要买东西你应该去商场找导购员,不应该找我。
#2072:送礼
207202:
- 【人物名称@正常】谢谢,我很喜欢。
207203:
- 【人物名称@正常】抱歉,我从不贸然收别人礼物。
207205:
- 【人物名称@正常】很抱歉,我好像不需要这个,你还是送给其他人吧。
#2073:恭维
207302:
- 【人物名称@正常】好了好了别夸了,你再夸我可要上天了。
207303:
- 【人物名称@正常】无事献殷勤,非奸即盗,我跟你又不熟,你说这话到底有什么目的。
207305:
- 【人物名称@正常】
#2074:把柄(偷窃)
207402:
- 【人物名称@正常】真的,大哥,别说出去,东西我已经还回去了。
207403:
- 【人物名称@正常】什么偷东西?你亲眼看见了?
207405:
- 【人物名称@正常】你是不是搞错了什么?我没有偷过东西。
#2075:把柄(打游戏)
207502:
- 【人物名称@正常】大哥,别说出去,我真的会给你打掩护。
207503:
- 【人物名称@正常】拜托,大哥我跟你又不熟,你管得着吗。
207505:
- 【人物名称@正常】你是不是记错人了?我从来不打游戏的。
#2076:把柄(做兼职)
207602:
- 【人物名称@正常】你别说出去,我以后保证不会再犯了。
207603:
- 【人物名称@正常】你听谁说的,我不承认。
207605:
- 【人物名称@正常】你是不是搞错人了?我从来不做兼职的。
#2077:把柄(泄密)
207702:
- 【人物名称@正常】好处费我一会就转给你,千万别说出去。
207703:
- 【人物名称@正常】话可不能乱说,小心我告你诽谤。
207705:
- 【人物名称@正常】你是不是搞错了什么,我没有做过这种事情。
#2078:把柄(早退)
207802:
- 【人物名称@正常】我是不会认错的,你想怎样随便你。
207803:
- 【人物名称@正常】不管你怎么说,我是不可能承认的。
207805:
- 【人物名称@正常】我从来没早退过啊,你记错人了吧。
#2079:举报
207902:
- 【人物名称@正常】你已经举报过了,不用再举报一遍。
207903:
- 【人物名称@正常】我没理解你想要举报什么,你最好先和当事人核对清楚再过来举报。
207904:
- 【人物名称@正常】我现在对你还不够信任,举报的事情晚点再说吧。
#2080:澄清
208002:
- 【人物名称@正常】你已经澄清过了,这件事我会处理的。
208003:
- 【人物名称@正常】你这么解释没有说服力,我建议你先找当事人当面对峙一下,再来找我汇报。
208004:
- 【人物名称@正常】你的风评已经差成这样了,还指望我会相信你?
#2081:澄清
208102:
- 【人物名称@正常】你刚才不是说过了吗?难道还有间谍,这不可能吧。
208103:
- 【人物名称@正常】真的是这样吗?你要不再确认一下吧,这么大的事要讲证据。
208104:
- 【人物名称@正常】我不太相信,总不能你说什么就是什么吧。
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