Exemple #1
0
class Building(object):
    木屋 = BuildingBase('木屋', Category.住宅, Quality.普通, 1.0, Ability.木材厂(1.0))
    居民楼 = BuildingBase('居民楼', Category.住宅, Quality.普通, 1.0, Ability.便利店(1.0))
    钢结构房 = BuildingBase('钢结构房', Category.住宅, Quality.普通, 1.0, Ability.钢铁厂(1.0))
    平房 = BuildingBase('平房', Category.住宅, Quality.普通, 1.1, Ability.住宅(0.2))
    小型公寓 = BuildingBase('小型公寓', Category.住宅, Quality.普通, 1.18, None)
    人才公寓 = BuildingBase('人才公寓', Category.住宅, Quality.稀有, 1.4,
                        AbilitySet([Ability.在线(0.2),
                                    Ability.工业(0.15)]))
    花园洋房 = BuildingBase('花园洋房', Category.住宅, Quality.稀有, 1.02,
                        Ability.商贸中心(1.0))
    中式小楼 = BuildingBase('中式小楼', Category.住宅, Quality.稀有, 1.0,
                        AbilitySet([Ability.在线(0.2),
                                    Ability.住宅(0.15)]))
    空中别墅 = BuildingBase('空中别墅', Category.住宅, Quality.史诗, 1.0,
                        AbilitySet([Ability.民食斋(1.0),
                                    Ability.在线(0.2)]))
    复兴公馆 = BuildingBase('复兴公馆', Category.住宅, Quality.史诗, 1.0, Ability.离线(1.0))

    便利店 = BuildingBase('便利店', Category.商业, Quality.普通, 1.0, Ability.居民楼(1.0))
    五金店 = BuildingBase('五金店', Category.商业, Quality.普通, 1.0, Ability.零件厂(1.0))
    服装店 = BuildingBase('服装店', Category.商业, Quality.普通, 1.0, Ability.纺织厂(1.0))
    菜市场 = BuildingBase('菜市场', Category.商业, Quality.普通, 1.0, Ability.食品厂(1.0))
    学校 = BuildingBase('学校', Category.商业, Quality.普通, 1.0, Ability.图书城(1.0))
    图书城 = BuildingBase('图书城', Category.商业, Quality.稀有, 1.0,
                       AbilitySet([Ability.学校(1.0),
                                   Ability.造纸厂(1.0)]))
    商贸中心 = BuildingBase('商贸中心', Category.商业, Quality.稀有, 1.0,
                        Ability.花园洋房(1.0))
    加油站 = BuildingBase('加油站', Category.商业, Quality.稀有, 1.2,
                       AbilitySet([Ability.人民石油(0.5),
                                   Ability.离线(0.1)]))
    民食斋 = BuildingBase('民食斋', Category.商业, Quality.史诗, 1.52,
                       AbilitySet([Ability.空中别墅(1.0),
                                   Ability.在线(0.2)]))
    媒体之声 = BuildingBase('媒体之声', Category.商业, Quality.史诗, 1.615,
                        AbilitySet([Ability.离线(0.1),
                                    Ability.所有(0.05)]))

    木材厂 = BuildingBase('木材厂', Category.工业, Quality.普通, 1.0, Ability.木屋(1.0))
    食品厂 = BuildingBase('食品厂', Category.工业, Quality.普通, 1.0, Ability.菜市场(1.0))
    造纸厂 = BuildingBase('造纸厂', Category.工业, Quality.普通, 1.0, Ability.图书城(1.0))
    水厂 = BuildingBase('水厂', Category.工业, Quality.普通, 1.26, Ability.离线(0.1))
    电厂 = BuildingBase('电厂', Category.工业, Quality.普通, 1.18, Ability.在线(0.1))
    钢铁厂 = BuildingBase('钢铁厂', Category.工业, Quality.稀有, 1.0,
                       AbilitySet([Ability.钢结构房(1.0),
                                   Ability.工业(0.15)]))
    纺织厂 = BuildingBase('纺织厂', Category.工业, Quality.稀有, 1.0,
                       AbilitySet([Ability.服装店(1.0),
                                   Ability.商业(0.15)]))
    零件厂 = BuildingBase('零件厂', Category.工业, Quality.稀有, 1.0,
                       AbilitySet([Ability.五金店(1.0),
                                   Ability.企鹅机械(0.5)]))
    企鹅机械 = BuildingBase('企鹅机械', Category.工业, Quality.史诗, 1.33,
                        AbilitySet([Ability.零件厂(1.0),
                                    Ability.所有(0.1)]))
    人民石油 = BuildingBase('人民石油', Category.工业, Quality.史诗, 1.0,
                        AbilitySet([Ability.加油站(1.0),
                                    Ability.离线(0.1)]))
Exemple #2
0
    Building.造纸厂(4),
    Building.水厂(3),
    Building.电厂(3),
    Building.钢铁厂(3),
    Building.纺织厂(2),
    Building.零件厂(2),
    Building.企鹅机械(1),
    Building.人民石油(1),
]


global_abilities = {
    '照片': AbilitySet([
        Ability.所有(1.2),
        Ability.在线(1.2),
        Ability.离线(1.4),
        Ability.住宅(2.4),
        Ability.商业(2.4),
        Ability.工业(2.1),
    ]),
    '政策': AbilitySet([
        Ability.所有(0.55),  # 家国之光
        Ability.所有(1.00),  # 一带一路建设[5]
        Ability.商业(3.00),  # 自由贸易区建设[5]
        Ability.住宅(3.00),  # 区域协同发展[5]
        Ability.所有(2.00),  # 全面深化改革[5]
        Ability.在线(1.50),  # 全面依法治国[4]
        Ability.离线(2.00),  # 科教兴国[5]
        Ability.工业(6.00),  # 创新驱动[5]
        Ability.工业(0.00),  # 制造强国[0]
        Ability.所有(0.40),  # 减税降费[1]
        Ability.商业(1.20),  # 普惠金融[1]
Exemple #3
0
    building.造纸厂.star(5),
    building.水厂.star(5).ability(Ability.离线固定(0.3)),
    building.电厂.star(5).ability(Ability.在线固定(1.4)),
    building.钢铁厂.star(5),
    building.纺织厂.star(4),
    building.零件厂.star(4),
    building.企鹅机械.star(3),
    building.人民石油.star(4),
]


global_abilities = {
    '照片': AbilitySet([
        Ability.所有(4.3),
        Ability.在线(4.2),
        Ability.离线(4.0),
        Ability.住宅(7.2),
        Ability.商业(8.4),
        Ability.工业(8.1),
    ]),
    '政策': AbilitySet([
        Ability.所有(0.55),  # 家国之光
        Ability.所有(1.00),  # 一带一路建设[5]
        Ability.商业(3.00),  # 自由贸易区建设[5]
        Ability.住宅(3.00),  # 区域协同发展[5]
        Ability.所有(2.00),  # 全面深化改革[5]
        Ability.在线(2.00),  # 全面依法治国[5]
        Ability.离线(2.00),  # 科教兴国[5]
        Ability.工业(6.00),  # 创新驱动[5]
        Ability.工业(12.0),  # 制造强国[5]
        Ability.所有(4.00),  # 减税降费[5]
        Ability.商业(12.0),  # 普惠金融[5]
Exemple #4
0
    1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 14, 17, 21, 27, 33, 42, 53, 66, 83, 104, 130
]


class Quality(Enum):
    Normal = '普通'
    Rare = '稀有'
    Epic = '史诗'


Info = namedtuple('Info',
                  ('name', 'category', 'quality', 'coefficient', 'ability'))

infos = [
    Info('木屋', Category.House, Quality.Normal, 1.0,
         AbilitySet(Ability(Target('木材厂'), 1.0))),
    Info('平房', Category.House, Quality.Normal, 1.1,
         AbilitySet(Ability(Target.House, 0.2))),
    Info('居民楼', Category.House, Quality.Normal, 1.0,
         AbilitySet(Ability(Target('便利店'), 1.0))),
    Info('钢结构房', Category.House, Quality.Normal, 1.0,
         AbilitySet(Ability(Target('钢铁厂'), 1.0))),
    Info('小型公寓', Category.House, Quality.Normal, 1.18, AbilitySet.Empty),
    Info(
        '人才公寓', Category.House, Quality.Rare, 1.4,
        AbilitySet(Ability(Target.All, 0.2, Status.OnlineOnly),
                   Ability(Target.Industry, 0.15))),
    Info('花园洋房', Category.House, Quality.Rare, 1.02,
         AbilitySet(Ability(Target('商贸中心'), 1.0))),
    Info(
        '中式小楼', Category.House, Quality.Rare, 1.4,
Exemple #5
0
from building import Building, Category
from photo import Photo
from policy import PolicySet, Policy, Light
from task import Task
from common import Status

units = ['', 'K', 'M', 'B', 'T']

policies = PolicySet(Policy.一带一路建设(5), Policy.自由贸易区建设(5), Policy.区域协调发展(5),
                     Policy.全面深化改革(5), Policy.全面依法治国(4), Policy.科教兴国(5),
                     Policy.创新驱动(5), Light(0.55))

photos = Photo(
    AbilitySet(Ability(Target.All, 1.2),
               Ability(Target.All, 1.2, Status.OnlineOnly),
               Ability(Target.All, 1.4, Status.OfflineOnly),
               Ability(Target.House, 2.4), Ability(Target.Business, 2.4),
               Ability(Target.Industry, 2.1)))

all_buildings = [
    Building.造纸厂(4, 350),
    Building.菜市场(4, 400),
    Building.木材厂(4, 175),
    Building.木屋(3, 200),
    Building.平房(3, 150),
    Building.食品厂(3, 375),
    Building.人才公寓(2, 50),
    Building.图书城(2, 175),
    Building.媒体之声(1, 100),
    Building.居民楼(4, 425),
    Building.便利店(4, 200),
Exemple #6
0
        ratio = self.base_ratio * \
            building_ratio * \
            star_ratios[self.stars] * \
            self.global_ratio[online]
        return ratio, details


木屋 = Building('木屋', Category.住宅, Quality.普通, 1.0,
              Ability.木材厂(1.0))
居民楼 = Building('居民楼', Category.住宅, Quality.普通, 1.0,
               Ability.便利店(1.0))
钢结构房 = Building('钢结构房', Category.住宅, Quality.普通, 1.0,
                Ability.钢铁厂(1.0))
平房 = Building('平房', Category.住宅, Quality.普通, 1.1,
              Ability.住宅(0.2))
小型公寓 = Building('小型公寓', Category.住宅, Quality.普通, 1.18, AbilitySet())
人才公寓 = Building('人才公寓', Category.住宅, Quality.稀有, 1.4,
                AbilitySet([Ability.在线(0.2), Ability.工业(0.15)]))
花园洋房 = Building('花园洋房', Category.住宅, Quality.稀有, 1.02,
                Ability.商贸中心(1.0))
中式小楼 = Building('中式小楼', Category.住宅, Quality.稀有, 1.0,
                AbilitySet([Ability.在线(0.2), Ability.住宅(0.15)]))
空中别墅 = Building('空中别墅', Category.住宅, Quality.史诗, 1.0,
                AbilitySet([Ability.民食斋(1.0), Ability.在线(0.2)]))
复兴公馆 = Building('复兴公馆', Category.住宅, Quality.史诗, 1.0,
                Ability.离线(0.1))

便利店 = Building('便利店', Category.商业, Quality.普通, 1.0,
               Ability.居民楼(1.0))
五金店 = Building('五金店', Category.商业, Quality.普通, 1.0,
               Ability.零件厂(1.0))
Exemple #7
0
# coding: utf-8
from collections import namedtuple

from ability import Ability, Target, AbilitySet
from building import Category
from common import IncomeUp

Info = namedtuple('Info', ('name', 'ability'))

infos = [
    Info('反腐风暴', Ability(Target.All, 0.2)),
    Info('服务示范区', Ability(Target('便利店', '菜市场'), 1.5)),
    Info(
        '绿色工厂',
        AbilitySet(Ability(Target('食品厂'), 1.0), Ability(Target('造纸厂'), 1.0),
                   Ability(Target('电厂'), 1.5))),
    Info(
        '保税商圈',
        AbilitySet(Ability(Target.Business, 0.3),
                   Ability(Target('商贸中心'), 1.0, Ability(Target('便利店'), 1.5)))),
    Info(
        '工业综合体',
        AbilitySet(Ability(Target.Industry, 0.3), Ability(Target('企鹅机械'), 1.0),
                   Ability(Target('木材厂'), 1.0))),
    Info('文明城市',
         AbilitySet(Ability(Target.All, 0.2), Ability(Target.House, 0.3))),
    Info(
        '美丽街区',
        AbilitySet(
            Ability(Target('花园洋房', 2.0), Ability(Target('钢结构房'), 1.0),
                    Ability(Target('平房'), 1.0)), )),