예제 #1
0
        public void Execute(EventResults result, Game game, EventContext context)
        {
            if (XmlHelper.IsSpecialName(varName))
                throw new InvalidOperationException("Cannot assign to special properties: " + varName);

            context.SetVariable(context.CurrentCharacter, varName, newValue.Calculate(context, game));
        }
예제 #2
0
        public double Evaluate(Game game, EventContext context, Weights weights)
        {
            if (XmlHelper.IsSpecialName(varName))
                throw new InvalidOperationException("Cannot assign to special properties: " + varName);

            context.SetVariable(context.CurrentCharacter, varName, newValue.Calculate(context, game));
            return 0.0;
        }