MCPcopy Create free account
hub / github.com/FloatTech/ZeroBot-Plugin-Playground / openFire

Method openFire

plugin/partygame/sessionAct.go:166–181  ·  view source on GitHub ↗

开火

()

Source from the content-addressed store, hash-verified

164
165// 开火
166func (cls Session) openFire() bool {
167 // 压出头部
168 bullet := cls.Cartridges[0]
169 cls.Cartridges = cls.Cartridges[1:]
170 if bullet == 1 {
171 return true
172 }
173 // 获取开枪人
174 user := cls.Users[0]
175 // 人员轮转
176 cls.Users = cls.Users[1:]
177 cls.Users = append(cls.Users, user)
178
179 saveItem(dataPath, cls)
180 return false
181}
182
183// 打乱参与人顺序
184func (cls Session) rotateUser() {

Callers 1

initFunction · 0.80

Calls 1

saveItemFunction · 0.85

Tested by

no test coverage detected