gaodayihao / qsanguosha Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mogara/qsanguosha
An open source online version of the famous board game Sanguosha
Home Page: http://www.qsanguosha.com/
This project forked from mogara/qsanguosha
An open source online version of the famous board game Sanguosha
Home Page: http://www.qsanguosha.com/
贯石斧应该在提示弃牌时自动处于选中状态,考虑一下是贯石的技能归类不对还是UI的问题,如果是前者则修改服务器端
1.Estimate is not only Qixing has this problem. When a card move from PlaceSpecial, the UI will go wrong.
2.The pile button of self player, it 's menu should always visible, but now it is hide.
As 0t1's FAQ,it should be confimed that whether damage.from's Kindom is "qun" at the same time as Kuanggu(confirm the distance).
it will make a wrong that :
when Zuoci use Huashen to change to a General whose Kingdom isn't "qun" and do a damage to Caiwenji,if Caiwenji is Dead in this way,Zuoci will turn to himself because of Duanchang(also turn to "qun"),it cannot trigger Baonue in fact,and now it can trigger.
一局遊戲結束后點擊返回主菜單就會出現按鈕錯位的問題。
Need to implement a way to hide oneself's role in dashboard when mouse clicked.
myview_card=sgs.CreateSkillCard{
name="myview_card",
target_fixed=false,
will_throw = false,
once = true,
filter=function(self,targets,to_select,player)
return #targets<3
end,
on_use=function(self,room,player,targets)
--nothing
return false
end,
}
myview=sgs.CreateViewAsSkill{
name="myview",
n=0,
view_filter = function(self,selected, to_select)
return true
end,
view_as=function(self, cards)
if #cards==0 then
local acard=myview_card:clone()
acard:setSkillName(self:objectName())
return acard
end
end,
enabled_at_play=function(self,player)
return true
end,
enabled_at_response=function(self,player,pattern)
return false
end,
}
最简单的视为技能,里面没有任何代码,就一个空壳子,但是运行的时候报错程序崩溃
今天最新的源代码,32位xp系统+QT Creator编译。
麻烦帮忙看一下,这个代码哪里出问题了。
adjust equip point/suit font in compact skin.
for a user-mod, we can put everything into one folder, it's easy to manage. (add, remove)
<source>/package/
<name>/
extenions/
ai/
image/
audio/
RX: [782,0,1,23,["amazing_grace","sgs5","sgs5"]]
QSanguosha: src/jsoncpp/src/json_value.cpp:692: const char* Json::Value::asCString() const: Assertion `type_ == stringValue' failed.
Aborted (core dumped)
RX is the packet received.
RT
身份局中,一旦點擊了自己的身份,就會變成臉譜,然後沒有辦法再顯示。。
不可取消。
I found bug in QSanInvokeSkillDock::update()
at src/ui/qsanbutton.cpp L390 : " int btnWidth = _m_width / btnNum[i] "
program crashed when btnNum[i] equals zero.
it will happen when player lost all skills.
I fixed the bug in this commit:
https://github.com/hejun442001/QSanguosha/commit/686129feb5c0ca35dced20e9bf4b026c9c3a0bdc
(btw: I cannot send pull request to this project, so I send this issues)
程序是 07-28 commit 75fbff6 最新代码编译的。 windows xp sp2
貌似我听说 程序崩溃后 dmp 目录会生成一些调试文件,但是我这次没有,dmp目录是空的。
Replace the current background image with a lighter color one. Besides, adjust opacity of the infoPlane(chatbox and logbox) to 255 in qss.
Background image should be seperate from that of the start scene. Start scene can use fixed bg rather than the one user specified.
待修复。
神憤后會出現手牌-1張的情況。具體出現原因不明。
Here is another way to write skill, trigger, etc. which using object-oriented programming.
Tuxi = class("Tuxi", ViewAsSkill, {
initialize = function(self)
ViewAsSkill.initialize(self)
self.name = "foo"
self.n = 0
end,
view_as = function(self, skill, cards)
...
end
})
tuxi = Tuxi:create() -- need at file scope
zhangliao:addSkill(tuxi)
TuxiCard = class("TuxiCard", SkillCard, {
initialize = function(self)
SkillCard.initialize(self)
self.name = "tuxi"
self.target_fixed = false
end,
on_effect = function(self, card, effect)
...
end
})
tuxi_card = TuxiCard:create() -- need at file scope
There are a lot benefit, For example, zhangchunhua's shangshi.
Shangshi = class("Shangshi", TriggerSkill, {
initialize = function(self)
TriggerSkill.initialize(self)
self.frequency = sgs.Compulsory
end,
on_trigger = function(self)
...
end
})
ShangshiStateChanged = class("ShangshiStateChanged", Shangshi, {
initialize = function(self)
Shangshi.initialize(self)
self.events = {sgs.PostHpReduced, ..}
self.priority = -1
end,
})
ShangshiCardMove = class("ShangshiCardMove", Shangshi, {
initialize = function(self)
Shangshi.initialize(self)
self.events = {sgs.CardsMoveOneTime, ..}
self.priority = 2
end,
})
Any comments are welcome. Current it's in lua branch, I'll merge it into master if everyone feels fine about it.
EDIT: Actually I prefer this syntax to replace the old one. Use one syntax is better than two.
目前对于包的类型定义,有下列几种:
S_SERVER_REQUEST,
S_SERVER_REPLY,
S_SERVER_NOTIFICATION,
S_CLIENT_REQUEST,
S_CLIENT_REPLY,
S_CLIENT_NOTIFICATION,
实际上,需要描述的有三个层面的信息:
现有情况下,因为只考虑了 SERVER to CLIENT 以及 CLIENT to SERVER 的信息,所以,2x3 只有六种类别。
但是,如果 SERVER to SERVER 需要考虑,再加上,ROOMSERVER 与 LOBBYSERVER 两种不同的 SERVER,所以,实际上来源变成了三种:ROOM,LOBBY,CLIENT
实际就会有三个层面:3x3x3 = 27 种类别。
现在有几种方案实现:
哪个比较合适呢?
孙尚香两手牌,用两张梅花杀和孙权结姻
然后曹植发动四次落英,收进四张梅花杀(相同的两组)
尚香手牌变为-2
原因不明
Our github history has been screwed up. So we are not able to find who's "guilty" for each line of code in current repository. Specifically I find that there is an unreferenced CompareByActionOrder function in gamerule.cpp. It's originally called by case CardUsed of gamerule::trigger. Figure out if the original sorting is really necessary; i yes, add it back; if not, delete the CompareByActionOrder function.
Crossbow
lua/ai/smart-ai.lua:1159: bad argument #1 to 'min' (number expected, got nil)
activate
stack traceback:
lua/ai/smart-ai.lua:122: in function <lua/ai/smart-ai.lua:102>
We have to create a new UI to solve some problem such as got one's cards in a time. If all gose wll, part of the skills also can use the interface, e.g. qixing.
which: invalid option -- 's'
/usr/bin/qmake
which: invalid option -- 's'
/usr/bin/swig
Generate lua binding code
Generating Makefile using project file
WARNING: Failure to find: src/core/statistics.cpp
WARNING: Failure to find: src/core/statistics.h
Compile it
make: *** No rule to make target `src/core/statistics.cpp', needed by `statistics.o'. Stop.
Updating '/home/guten/game/nsanguosha/sanguosha.qm'...
Generated 708 translation(s) (708 finished and 0 unfinished)
Well, everything is OK. You can run it with ./QSanguosha
Currently there are at least 5 places you need to change simply to add one more miniscene, across several lua, cpp, ini, txt files in all different places; including:
Even the most experienced programmers should be frustrated by all these mess intended for nothing but trapping them. This is seriously a shame and needs to be untangled.
1.头像处勾玉对齐
2.mark显示位置
3.自由弃牌按钮
4.托管状态的字体显示
5.获得技能时文字移动位置
6.左慈化身牌显示
无懈的狮子之类的都是从下面飞过的,被盖住了
2人局(非KOF),我主孙权,对面翼曹仁, 曹仁结束回合(已经出现了回合分界线),游戏崩溃。
too ugly。
bug现象 神周瑜发动原大业炎时程序崩溃
bug频率:必现(AI和玩家都会)
我调试发现 崩溃点在 CompareByActionOrder ()函数中的 a->getRoom(); 上。 (调试时传入的a并非合理值也非NULL。)
呃还是曹植
落英收了一张梅花杀(上一个issue里重复收的一张)
有连弩
用该杀指定目标会出现指示线,有杀的效果
但是不会离手
弃牌阶段弃不掉
嗯就是这样
貂蝉头上贴着梅花乐
于禁拆了
然后曹植发动落英收走了
@gutenye @yinlin09 When upload new images, please ensure case.
当前版本在 Linux 下有大量图片无法载入,因为新传的文件常常跟旧文件大小写不同。
主要为了提高测试效率.
$ ./QSanguosha [command] [options]
command ::= roomserver lobbyserver client local
options
-h, --help
--test
--limit <secs>
--mode <mode>
有--test命令的, 就会多出 '自由弃牌', '蛊惑', '仁德', '直谏', '拿来', '天道', '咆哮' 的按钮. (并且这些按钮可以是激活或不激活状态-激活或不激活这个技能. e.g. 默认不激活的有'天道', '咆哮‘)
嘛。。总之是有问题了。。
when use Lijian ,the costs won't be discarded.
Somehow dashboard's phase icon is now in the center rather than the right. Is this intentional? If not, change the skin settings to move it to the side.
不解释-=-
曹操奸雄一張方片Q的火攻。。。已經攻了幾十次了。。。。還在攻呢。。。
必须换掉
Currently viewAs and viewFilter are only for client side usage. To make it usable on server side for anti-cheating and other purposes. Do following things:
我是吕布,联军三个是电脑,没有开暗将模式,但是联军有一个选择了暗将。
你的回环地址是 127.0.0.1,这个地址仅对你的本机有效
你的局域网地址: 192.168.1.105, 这个地址仅对处于同于同一局域网的用户可用
绑定的端口号: 9527
游戏模式为 4 人局 [虎牢关1v3]
玩家人数为 4
操作时间是 15 秒
自由选将是 启用
双将模式未启用
禁用场景模式
禁用同将模式
暗将模式已关闭
国战模式已关闭
服务器启用了 AI,AI 的延迟是 1000 毫秒
服务器启用了 AI 聊天
127.0.0.1:3435 已连接
QSanguosha AI 20120405 (V0.8 Stable), Powered by Lua 5.1
sgs1 断开
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.