Skip to content
Snippets Groups Projects
Select Git revision
  • 49063d057153e7f44e3e00ee5ebd8509fe0aa948
  • main default protected
  • feat_dma230_dataio
  • feat_qspi_rom
  • feat_extio
  • feat_dmax4
  • feat_dma350
  • feat_nanosoc_regions
  • feat_accel_decouple
  • dev
  • feat_accel_hash_stream
  • nanosoc-2023
12 results

nanosoc_adp_manager.v

Blame
  • CharacterInterface.java 2.39 KiB
    package Character;
    
    public class CharacterInterface {
        //Create character values
        private static final String name = "Jarren White";
    
    
        //Create character elements
        private static final Attributes attributes = new Attributes(new int[]{7,1,7, 20,1,11, 1,1,5});
        private static final Abilities abilities = new Abilities(new int[]{10,10,10,10,10,10,10,10,10,10}, new int[]{10,10,10,10,10,10,10,10,10,10}, new int[]{10,10,10,10,10});
        private static final Motes motes = new Motes(10, 5, 40, 3, 8);
        private static final Health health = new Health(new int[]{0,0,0,-1,-1,-2}, new int[]{-2, -2, -2, -4}, 5);
        private static final KnownCharms knownCharms = new KnownCharms();
        private static final Willpower willpower = new Willpower(1, 2, 3, 4);
        private static final StaticValues staticValues = new StaticValues();
        private static final Soak soak = new Soak();
    
        public CharacterInterface() {
    
        }
    
        /**
         * Spend the cost of a charm
         * motes, willpower, bashing health, lethal health, agg health
         * True if personal
         */
        public static void spendCost(int[] cost, boolean personal, boolean commits){
            //Spend the motes
            if(!commits) {
                if (personal) {
                    motes.spendPersonal(cost[0]);
                } else {
                    motes.spendPeripheral(cost[0]);
                }
            } else {
                if (personal) {
                    motes.commitPersonal(cost[0]);
                } else {
                    motes.commitPeripheral(cost[0]);
                }
            }
    
            //Spend the willpower
            willpower.spendWillpower(cost[1]);
    
            //Spend bashing, lethal and agg
            health.aggDamage(cost[4]);
            health.lethalDamage(cost[3]);
            health.bashingDamage(cost[2]);
        }
    
        public static String getName() {
            return name;
        }
        public static Attributes getAttributes() {
            return attributes;
        }
        public static Motes getMotes() {
            return motes;
        }
        public static Abilities getAbilities() {
            return abilities;
        }
        public static Health getHealth() {
            return health;
        }
        public static KnownCharms getKnownCharms() {
            return knownCharms;
        }
        public static StaticValues getStaticValues() {
            return staticValues;
        }
        public static Willpower getWillpower() {
            return willpower;
        }
        public static Soak getSoak() {
            return soak;
        }
    
    }