public DamageLogic(ModernD20Library library) : base(library)
 {
     this._massiveDamageThresholdEffectId = this._library.GlobalDefinitions.FindEffectId(typeof(ImprovedDamageThresholdEffectBuilder));
     this._immuneToCriticalDamageEffectId = this._library.GlobalDefinitions.FindEffectId(typeof(ImmuneToCriticalDamageEffectBuilder));
     this._disabledEffectId = this._library.GlobalDefinitions.FindEffectId(typeof(DisabledEffectBuilder));
     this._dyingEffectId    = this._library.GlobalDefinitions.FindEffectId(typeof(DyingEffectBuilder));
 }
Exemple #2
0
        private void CreateLibraries()
        {
            string workingDbPath = Path.GetFullPath(@"..\..\..\..\CommonContent\moderngame.db"); // TODO: separate DB per library?
            string futureDbPath  = Path.GetFullPath(@"..\..\..\..\CommonContent\futuregame.db"); // TODO: separate DB per library?

            this._modernDB = new ModernDbConnect(workingDbPath);
            this._futureDB = new FutureDbConnect(futureDbPath);

            // TODO: version upgrading code is something else

            this._globalNotifier = new DesignTimeNotifier(this);
            this._modernLib      = new ModernD20Library(this._globalNotifier, this._modernDB);
            this._futureLib      = new FutureD20Library(this._modernLib, this._futureDB);
        }
Exemple #3
0
        protected override void UpdateWithRest(ModernD20Library environment, Character character, RestTypeEnum restType)
        {
            switch (restType)
            {
            case RestTypeEnum.Single8Hours:
            case RestTypeEnum.Full24Hours:
            {
                this.Value--;
                environment.CoreNotifications.ReportCharacterAbilityRestored(character, this.AffectedAbility);
                if (this.Value <= 0)
                {
                    environment.RestorationLogic.RemoveEffect(character, this);
                }
                break;
            }

            default:
                throw new ArgumentOutOfRangeException(nameof(restType), restType, null);
            }
        }
 public FutureD20Library(ModernD20Library moderLogicRef, IFutureDatabase futureDb) : base(futureDb)
 {
     this._moderLogicRef = moderLogicRef;
     this._futureDb      = futureDb;
     this._moderLogicRef.GlobalDefinitions.RegisterLibrary(this.GetType().Assembly);
 }
Exemple #5
0
 protected virtual void UpdateWithRest(ModernD20Library environment, Character character, RestTypeEnum restType)
 {
     // nothing in base class
 }
Exemple #6
0
 protected override void UpdateRound(ModernD20Library environment, Character character)
 {
     // nothing, this does not change during round
 }
 protected LogicCore(ModernD20Library library)
 {
     this._library = library;
 }
Exemple #8
0
        protected virtual void UpdateRound(ModernD20Library environment, Character character)
        {
            // TODO: if finite time - just lower remaining rounds

            throw new NotImplementedException();
        }
 public SavingThrowsLogic(ModernD20Library library) : base(library)
 {
 }
Exemple #10
0
 public RestorationLogic(ModernD20Library library) : base(library)
 {
 }
Exemple #11
0
 public GlobalState(ModernD20Library modernD20Library)
 {
     this._modernD20Library = modernD20Library;
 }
 protected override void UpdateWithRest(ModernD20Library environment, Character character, RestTypeEnum restType)
 {
     // nothing, does not restore during rest
 }
 public ActionPointsLogic(ModernD20Library library) : base(library)
 {
 }