docs & feat: add license & attribution notice (Apache-2.0 / GPL-3.0) and core system enhancements
This commit is contained in:
1 parent
507836d367
commit
ce6aabfc55
47 files changed
+5674
-724
No files matched your search
@@ -9,7 +9,17 @@ import (
|
||||
pb "gac-hkrpg-go/protocol/proto"
|
||||
)
|
||||
|
||||
const benchFirstPos uint32 = 14
|
||||
func cwRoleOnBoard(c *common.CurrencyWarsCatalog, role *pb.CDEAABODKCP) bool {
|
||||
if role == nil || role.Pos == 0 {
|
||||
return false
|
||||
}
|
||||
front, err := c.IntegerRule("GridFight_Front_AvatarMaxNum")
|
||||
if err != nil || front < 0 {
|
||||
return false
|
||||
}
|
||||
back, err := c.IntegerRule("GridFight_Back_AvatarMaxNum")
|
||||
return err == nil && back >= 0 && uint64(role.Pos) <= uint64(front)+uint64(back)
|
||||
}
|
||||
|
||||
func cwCalculateBoardTraits(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEMCEFH) []*pb.FBNGHMHHHLL {
|
||||
if catalog == nil || run == nil {
|
||||
@@ -27,7 +37,7 @@ func cwCalculateBoardTraits(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEM
|
||||
tallies := make(map[uint32]uint32)
|
||||
members := make(map[uint32][]uint32)
|
||||
for _, role := range team.GridGameRoleList {
|
||||
if role == nil || role.Pos >= benchFirstPos {
|
||||
if !cwRoleOnBoard(catalog, role) {
|
||||
continue
|
||||
}
|
||||
variant, err := catalog.CapturedRoleVariant(role.Id, role.RoleStar)
|
||||
@@ -46,7 +56,7 @@ func cwCalculateBoardTraits(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAEM
|
||||
equipMap, _ := common.LoadCurrencyWarsEquipment(catalog)
|
||||
if equipMap != nil {
|
||||
for _, role := range team.GridGameRoleList {
|
||||
if role == nil || role.Pos >= benchFirstPos {
|
||||
if !cwRoleOnBoard(catalog, role) {
|
||||
continue
|
||||
}
|
||||
for _, uid := range role.PNJIPHJJONG {
|
||||
@@ -180,7 +190,7 @@ func cwCalculateBattleTraits(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAE
|
||||
tallies := make(map[uint32]uint32)
|
||||
members := make(map[uint32][]*pb.MHFNFINKJKP)
|
||||
for _, role := range team.GridGameRoleList {
|
||||
if role == nil || role.Pos >= benchFirstPos {
|
||||
if !cwRoleOnBoard(catalog, role) {
|
||||
continue
|
||||
}
|
||||
variant, err := catalog.CapturedRoleVariant(role.Id, role.RoleStar)
|
||||
@@ -199,7 +209,7 @@ func cwCalculateBattleTraits(catalog *common.CurrencyWarsCatalog, run *pb.MPIMAE
|
||||
equipMap, _ := common.LoadCurrencyWarsEquipment(catalog)
|
||||
if equipMap != nil {
|
||||
for _, role := range team.GridGameRoleList {
|
||||
if role == nil || role.Pos >= benchFirstPos {
|
||||
if !cwRoleOnBoard(catalog, role) {
|
||||
continue
|
||||
}
|
||||
for _, uid := range role.PNJIPHJJONG {
|
||||
|
||||
Reference in new issue
Block a user