Skip to content

Commit

Permalink
Move cm_castles
Browse files Browse the repository at this point in the history
  • Loading branch information
SerVB committed Jan 7, 2019
1 parent e61f2d2 commit c93953c
Show file tree
Hide file tree
Showing 8 changed files with 916 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.github.servb.pph.pheroes.common.castle

import com.github.servb.pph.pheroes.common.common.MineralSetC

const val CTL_INCOME: Int = 500

@ExperimentalUnsignedTypes
data class CTCNSTCAP(val siz: CastleSizeMask, val type: Int) {

constructor(siz: CastleSizeMask, type: CastleTypeMask) : this(siz, type.v)

fun Support(_type: CastleType, _siz: CastleSize) =
(type and (1 shl _type.v)) != 0 &&
(siz.v and (1 shl _siz.v)) != 0
}

@ExperimentalUnsignedTypes
data class CTLCNST_DESC_STRUCT(
val name: String,
val type: CastleConstructionType,
val price: MineralSetC,
val depend: Set<CastleConstruction>,
val caps: CTCNSTCAP,
val fparam: Int,
val sparam: Int
)
Loading

0 comments on commit c93953c

Please sign in to comment.