コード例 #1
0
ファイル: Execute.cs プロジェクト: jenn0108/CourtIntrigue
        public void Execute(EventResults result, Game game, EventContext context)
        {
            if (XmlHelper.IsSpecialName(varName))
                throw new InvalidOperationException("Cannot assign to special properties: " + varName);

            context.OffsetVariable(context.CurrentCharacter, varName, offset.Calculate(context, game));
        }
コード例 #2
0
ファイル: Execute.cs プロジェクト: jenn0108/CourtIntrigue
        public double Evaluate(Game game, EventContext context, Weights weights)
        {
            if (XmlHelper.IsSpecialName(varName))
                throw new InvalidOperationException("Cannot assign to special properties: " + varName);

            context.OffsetVariable(context.CurrentCharacter, varName, offset.Calculate(context, game));
            return 0.0;
        }