Navigation

    forum

    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    1. Home
    2. bometo
    • Flag Profile
    • block_user
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Groups
    • Blog

    bometo

    @bometo

    1
    Posts
    958
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    bometo Follow

    Posts made by bometo

    • RE: How are we upgrading our creeps?

      My code

      for each role define parts percent in the body and cost. totalPercent is the max amount of a room energy it will use
          parts: {
              pieces:[
                  {typeName:WORK, percent:0.5, cost:100},
                  {typeName:CARRY, percent:0.25, cost:50},
                  {typeName:MOVE, percent:0.25, cost:50}
              ],
              totalPercent:0.67
          },

       

      then you just have to go through parts.pieces the amount of each part is percent * energyRoom * totalpercent /cost

      And then loop pushing each typeName in an array

      posted in General Discussion
      bometo