<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ivony.TableGame.SimpleGames.Rules
{
  public class ReboundCard : SimpleGameCard
  {
    public async override Task UseCard( SimpleGamePlayer user, SimpleGamePlayer target )
    {
      AnnounceSpecialCardUsed( user );
      user.DefenceEffect = new CardEffect();
    }

    public override string Name
    {
      get { return "反弹"; }
    }

    public override string Description
    {
      get { return "到下一次发牌之前，您遭受的第一次伤害将反弹给攻击者"; }
    }

    private class CardEffect : IDefenceEffect, IAroundEffect
    {
      public async Task<bool> OnAttack( SimpleGamePlayer user, SimpleGamePlayer target, int point )
      {
        target.DefenceEffect = null;
        user.HealthPoint -= point;
        user.PlayerHost.WriteWarningMessage( "您对 {0} 发起的攻击被反弹了，您的 HP 减少 {1} 点，目前 HP {2} 点", user.PlayerName, point, user.HealthPoint );
        target.PlayerHost.WriteMessage( "您遭受了 {0} 点攻击，伤害已经反弹给攻击者，反弹效果已失效。", point );
        return false;
      }

      public string Name
      {
        get { return "反弹"; }
      }
<commit_msg>修正反弹效果的文案<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Ivony.TableGame.SimpleGames.Rules
{
  public class ReboundCard : SimpleGameCard
  {
    public async override Task UseCard( SimpleGamePlayer user, SimpleGamePlayer target )
    {
      AnnounceSpecialCardUsed( user );
      user.DefenceEffect = new CardEffect();
    }

    public override string Name
    {
      get { return "反弹"; }
    }

    public override string Description
    {
      get { return "到下一次发牌之前，您遭受的第一次伤害将反弹给攻击者"; }
    }

    private class CardEffect : IDefenceEffect, IAroundEffect
    {
      public async Task<bool> OnAttack( SimpleGamePlayer user, SimpleGamePlayer target, int point )
      {
        target.DefenceEffect = null;
        user.HealthPoint -= point;
        user.PlayerHost.WriteWarningMessage( "您对 {0} 发起的攻击被反弹了，您的 HP 减少 {1} 点，目前 HP {2} 点", target.PlayerName, point, user.HealthPoint );
        target.PlayerHost.WriteMessage( "您遭受了 {0} 点攻击，伤害已经反弹给攻击者，反弹效果已失效。", point );
        return false;
      }

      public string Name
      {
        get { return "反弹"; }
      }

{'fraction_non_alphanumeric': 0.09254498714652956, 'fraction_numerical': 0.003427592116538132, 'mean_word_length': 2.8981636060100167, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '521806', 'n_tokens_mistral': 797, 'n_tokens_neox': 861, 'n_words': 180}